Gentee Programming Language > Documentation > Syntax Download documentation

Array Element Operation

The majority of structures and objects can contain other structure types. Square brackets [] are used to get and set values of object items ( array elements, string characters ). It is the expression of uint type, that should be enclosed in square brackets. If a multidimensional object is used, its dimensions are separated by commas. The index numbers start at 0. The result of the defined evaluation will be an lvalue.

<parameters> ::= <expression> {','<expression>}
<array element> ::= <object>'['<parameters>']'

arr myarr[ 10, 10, 10] of byte
str mystr = "abcdef"

myarr[ i, k+3, 4 ] = 'd'
myarr[ 0, 0, 0 ] = mystr[i])

See also

    Table Of Operator Precedence


 Copyright © 2004-2006 Gentee Inc. All rights reserved.