programming-for-all-al

Chapter 4: Data Types and Variables in AL

Primitive Data Types

AL supports various primitive data types, including:

Complex Data Types

In addition to primitive types, AL includes complex data types such as:

Variable Declaration and Initialization

Variables in AL are declared using the var keyword and can be initialized at the time of declaration. For example:

var
    customerName: Text[100];
    totalAmount: Decimal;
begin
    customerName := 'John Doe';
    totalAmount := 1000.50;
end;