Previous Topic Next topic Print topic


Expressions

An expression is a sequence of operators and operands.

expression

unary-expression binary-expression

unary-expression

unary-operator

binary-expression

binary-operator

method-invocation-expression

type-specifier method-arguments

Where:

method-arguments
The method arguments are values or variable references that are passed to a method. The actual values of the arguments are specified when the method is invoked. Each argument and its type is specified in the method’s procedure division header in the USING clause.

When you invoke a method, you specify the arguments in the invocation. The invoked method receives the arguments in the same order as in the invocation.

subscript-expression

[ subscript ] ( subscript )

Where:

[ subscript ]
Square brackets [ ] indicate that the subscript is zero based. For example:
     myArray[5]   *> sixth item in the array

Square brackets can also be used to pass the parameters to an indexer expression.

( subscript )
Round parentheses ( ) indicate that the subscript is one based. For example:
     myArray(5)   *> fifth item in the array

literal

identifier

Previous Topic Next topic Print topic