INIT

Initialize a named data structure to its default values

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
INIT data_structure [, ...]

Arguments

data_structure

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

Discussion

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.

Examples

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
    .
    .
    .