User Tools

Site Tools


reference_to_arrays.htm
Navigation:  Clarion.Net (Clarion#) > Clarion# Language Extensions > Special Data Types >====== Reference to Arrays ====== Previous pageReturn to chapter overviewNext page

NewCNet.jpg

References to arrays are new to Clarion .NET. Declaration of a variable of this type has the following syntax:

label <;base type>[, ',]

Example:

ArrLg      LONG[]   !reference to LONG array with 1 dimension.

ArrLg3     LONG[,,] !reference to LONG array with 3 dimensions.

The declaration below means “ a reference to an array of references to a LONG with 1 dimension.”

ArrRefLg &amp;LONG[]

As you can see, unlike usual reference types, the “&amp;” symbol isn't used in this declaration.

NoteBox.jpg

Clarion# now uses zero based indexes for all arrays and collections. But FILEs and QUEUEs will still use 1-based indexes. The rationale behind this change is that this makes it easier to work with the core Framework objects, 3rd-party .Net libraries, shared libraries you may write, as well as make it easier to translate code samples from C# or VB.

reference_to_arrays.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1