.ARRAY

Indicate System.Array access is 0-based

 

 

 

NSupported in Synergy .NET
.ARRAY value

value

One of the following values:

0 = System.Array access uses 0-based indices.

1 = System.Array access uses 1-based indices.

C# assumes arrays are 0-based. The .ARRAY directive can be added to the top of a source module to indicate that all System.Array access uses 0-based indices instead of the default Synergy 1-based indices. This allows converted code to operate correctly.

Note

.ARRAY is not applicable to Synergy pseudo arrays; it only applies to System.Array (dynamic) arrays.

Once .ARRAY is declared, it is valid until the end of the source file. If more than one .ARRAY directive is present in the same source file, a “Duplicate directive” error (DUPDRCTV) will occur.

If value is something other than 0 or 1, a “0 or 1 expected” error (NOARYBASE) will occur.

.array 0
main
record
    arr, [#] int    ;Dynamic array is 0-based
proc
    .
    .
    .
end