Click or drag to resize

Usual.Item Property (Long)

X#
Get/Set array elements with a ZERO based array index.

Namespace:  XSharp
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 PROPERTY SELF[
	index AS LONG
] AS USUAL GET SET 
Request Example View Source

Parameters

index
Type: Long
This indexer is ZERO based, however in your PRG code you can use ONE based array indices. The compiler will recognize that this property is part of a type that implements a special interface and will subtract one from the indexes, unless the /az compiler option is enabled.

Return Value

Type: Usual
The element stored at the indicated location in the collection.

Implements

ItemLong
ItemLong
Remarks
In your PRG code you can assess the elements with a ONE based index. The compiler will recognize that this property is part of a type that implements a special interface and will subtract one from the indexes, unless the /az compiler option is enabled.
Remarks
When the contents of the USUAL is not an array or does not support indexed access then a runtime error is generated.
See Also