Concluding Example
The following example demonstrates some simple EQUEL/Pascal declarations:
## program Concluding_Example( input, output );
## const
## MAX_PERSONS = 1000;
## type
## ShortShortInteger = [byte] -128 .. 127;
## ShortInteger = [word] -32768 .. 32767;
{same as Indicator type}
## String9 = packed array[1..9] of Char;
## String12 = packed array[1..12] of Char;
## String20 = packed array[1..20] of Char;
## String30 = packed array[1..30] of Char;
## VarString = varying[40] of Char;
## record Datatypes_Rec = {Structure of all types}
## d_byte : ShortShortInteger;
## d_word : ShortInteger;
## d_long : Integer;
## d_single : Real;
## d_double : Double;
## d_string : String20;
## end;
## record Persontype_Rec = {Variant record}
## age : ShortShortInteger;
## flags : Integer;
## case married : Boolean of
## TRUE : (spouse_name : String30);
## FALSE : (dog_name : String12);
## end;
## var
## empform, deptform : [external] Integer; {Compiled forms}
## dbname : String9;
## formname, tablename, columnname : String12;
## salary : Real;
## d_rec : Datatypes_Rec;
## person : Persontype_Rec;
## person_store : array[1..MAX_PERSONS]
## of Persontype_Rec;
## person_null: array[1..10] of Indicator;
## begin
dbname := 'personnel';
...
## end. {Concluding_Example}