Data Definition Language (DDL) Reference Manual

DDL Compiler Commands
Data Definition Language (DDL) Reference Manual529431-004
9-89
PASCALBOUND (D-Series Systems Only)
PASCALBOUND (D-Series Systems Only)
The PASCALBOUND command sets the lower bound for Pascal arrays.
Default: PASCALBOUND 1
0
assigns any subsequent Pascal arrays a lower bound of 0.
1
assigns any subsequent Pascal arrays a lower bound of 1.
The DDL compiler stores the value of the lower bound in the dictionary with the field or
group definition.
You can use the PASCALBOUND command as often as you need to set different
bounds for different arrays.
The DDL compiler uses the value in the PASCALBOUND command when writing an
element to the dictionary. After an element is in the dictionary, changing the
PASCALBOUND value has no effect on the Pascal output for that element. To change
the PASCALBOUND value for an entered element, you must replace the element in
the dictionary.
Pascal arrays are declared for fields and groups described with an OCCURS clause,
for fields described as TYPE CHARACTER, and for all fields described with an
alphanumeric picture.
If you specify PASCALBOUND 0, the array bounds are:
[0:number - 1]
DDL Output (CUSTOMER Record in PASSRC)
?Section CUSTOMER
{ Definition for CUSTOMER Record }
{ Contains customer information for each customer }
TYPE CUSTOMER_DEF = RECORD
{FILE IS "$data.sales.customer" KEY-SEQUENCED.}
CUSTNUM : CUSTNUM_DEF;
CUSTNAME : NAME_DEF;
ADDR : ADDR_DEF;
END;
CONST CUSTOMER_CUSTNUM_KEY = 0;
CONST CUSTOMER_CUSTNAME_KEY = 25454;
PASCALBOUND { 0 | 1 }
Example 9-43. PASCAL Command