AL syntax
AL syntax is relatively simple and straightforward. The basic structure of most AL statements is essentially similar to what you learned with other programming languages. AL is modeled on Pascal and tends to use many of the same reserved words and syntax practices as Pascal.
Assignment and punctuation
Assignment is represented with a colon followed by an equal sign, the combination being treated as a single symbol. The evaluated value of the expression, to the right of the assignment symbol, is assigned to the variable on the left-hand side, as shown in the following line of code:
Customer."Phone No." := '312-555-1212';
All statements are terminated with a semicolon. Multiple statements can be placed on a single program line, but that makes the code hard for others to read.
Fully qualified data fields are prefaced with the name of the record variable that they are a part of (see the preceding code line as an example wherein the record variable...