Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

C/AL

From Wikipedia, the free encyclopedia
Programming language
Not to be confused withCAL (programming language).
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(December 2009) (Learn how and when to remove this message)
This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources.
Find sources: "C/AL" – news ·newspapers ·books ·scholar ·JSTOR
(March 2024)
C/AL
ParadigmImperative
Designed byMichael Nielsen
DeveloperMicrosoft
Influenced by
Pascal

C/AL (Client/serverApplicationLanguage) was the programming language used within C/SIDE theClient/ServerIntegratedDevelopmentEnvironment inMicrosoft Dynamics NAV (formerly known as Navision Attain) andMicrosoft Dynamics 365 Business Central up until (and including) version 14. It has been replaced byAL. C/AL is a Database specific programming language, and is primarily used for retrieving, inserting and modifying records in aNavision database. C/AL resembles thePascal language on which it is based. The original C/AL compiler was written by Michael Nielsen.[1]

Examples

[edit]

Hello World

[edit]

This is the classicHello World example. Since theC/SIDE (Client/Server Integrated Development Environment) does not have a console to output text, this example is made using a dialog box as the visual interface.

MESSAGE('hello, world!');

Filtering and retrieving record

[edit]

Variables in C/AL are not defined through code, but are defined via the variable declaration menu in the C/AL editor. In this exampleItem is assumed to be a variable of type Record.

IFItem.GET('31260210')THENMESSAGE(STRSUBSTNO('Item name is: %1',Item.Description));Item.RESET;Item.SETRANGE("No.",FromItem,ToItem);Item.FINDLAST;

Looping and data manipulation

[edit]

Looping over a recordset and modifying the individual records is achieved with only a few lines of code.

Item.RESET;Item.SETRANGE("Blocked",TRUE);IFItem.FINDSETTHENREPEATIFItem."Profit%"<20THENBEGINItem."Profit%":=20;Item.MODIFY(TRUE);END;UNTILItem.NEXT=0;Item.MODIFYALL("Blocked",FALSE);

See also

[edit]

References

[edit]
  1. ^Studebaker, David, "Programming Microsoft Dynamics NAV 2009," p. 8 (2009)

External links

[edit]
Dialects
Compilers
Current
Discontinued
API
Microcomputer
Comparisons
Designer
Related to
ALGOL (1958)
Modula-2 (1977)
Ada (1983)
Oberon (1986)
Modula-3 (1988)
Oberon-2 (1991)
Component Pascal (1991)
Microsoft development tools
Development
environments
Visual Studio
Others
Languages
APIs and
frameworks
Native
.NET
Device drivers
Database
SQL Server
SQL services
Other
Source control
Testing and
debugging
Delivery


Stub icon

Thiscomputer-programming-related article is astub. You can help Wikipedia byexpanding it.

Retrieved from "https://en.wikipedia.org/w/index.php?title=C/AL&oldid=1255496036"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp