INIT

Initialize a named data structure to its default values

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
INIT data_structure [, ...]

data_structure

A named record, group, structfield, or individual field. (a)

The INIT statement initializes a named data structure to its declared default values, if provided, or to the defaults for the specified types. When an array is initialized, all elements in the array are initialized.

In general, if INIT is used on an argument, an error will be generated. The only exception to this is non-arrayed structfield arguments that do not contain objects.

The INIT statement below initializes field1 to 0, field2 to 028, field3 to “Initial value       ” (with seven spaces), and field4 to 00000000.

record myrecord
    field1      ,i4
    field2      ,d3     ,28
    field3      ,a20    ,"Initial value"
    field4      ,d8.2
proc
    .
    .
    .
    init myrecord
    .
    .
    .