literal data-item Parenthesized-expression non-parameterized-member-access method-invocation-expression chained-constructor object-creation-expression delegate-invocation-expression subscript-expression reference-modification-expression concatenation-expression cast-expression type-of-expression anonymous-method-expression method-group-expression arithmetic-expression size-of-expression table-of-expression unary-expression binary-expression conditional-expression
|
Any parameter defined by the method that does not correspond either to one of the positional arguments, or to one of the named arguments, must be an optional parameter (i.e. a parameter with a default value).
|
None of positional-argument, named-argument, or property-initializer should reference instance data or local data. Typically they reference arguments of the current constructor.
Any parameter defined by the constructor that does not correspond either to one of the positional arguments, or to one of the named arguments, must be an optional parameter (i.e. a parameter with a default value).
Any parameter defined by the delegate that does not correspond either to one of the positional arguments, or to one of the named arguments, must be an optional parameter (i.e. a parameter with a default value).
|
myArray[5] *> sixth item in the array
Square brackets can also be used to pass the parameters to an indexer expression.
myArray(5) *> fifth item in the array
The primary expression must be of type string. The offset must be of integral type. The length expression may be omitted but, if specified, must be of integral type.
The result of a reference modification expression is a string value formed by taking a substring of the original string starting from the specified offset (0 based), for the specified length, or until the end of the original string if length expression is omitted.
If the offset expression, or the sum of the offset expression and the length expression, is greater than the original string length an exception is thrown.
where the right-hand primary-expression is not itself a concatenation expression. The result of a concatenation expression is a string value formed by concatenating all the operands. If any operand is not itself of type string, the ToString (.NET) or toString(JVM) method is applied to the operand before it participates in the concatenation.
The cast expression is used to specify an explicit conversion, for example, reference type conversion and explicit user conversions. See section Types and Type conversions.
DELEGATE procedure-division END-DELEGATE
The procedure division may start with a procedure division header, which can specify zero or more parameters and an optional returning item.
The expression represents any of the methods with the given name belonging to the specified type. For instance methods, the method group expression also encapsulates an object instance.
Method group expressions are implicitly converted to a delegate type by selecting the member of the method group which is compatible with the delegate type.
01 del type MyDelegate. 01 o type MyType. set del to method o::Meth1
The compiler will set del to point to the override of Meth1 in MyType, which has the same signature as MyDelegate.
An arithmetic expression may be either a unary expression or a binary expression. In both cases, the expressions which are subject to operations may be:
Helps create an array inline in managed COBOL.
For example:
set myArray to table of ( "abc", "bcd" )
This is equivalent to:
set content of myArray to ( "abc", "bcd" )
An example of creating a multi-dimensional array:
declare myArray as string occurs any any = table of string ( ("abc", "def") ("ghi", "jkl") )
|
Where binary-operator is one of '+', '-', '*', '/', '**', 'b-and', 'b-or', 'b-xor', 'b-left', or 'b-right'.
The order of evaluation can be modified by making use of parenthesized expressions.
A conditional expression may be a primary conditional expression or a combined conditional expression.
A primary conditional expression may be:
A relational operator is one of the following, where each line includes variants for the same operator.
= | EQUALS | |
<> | NOT= | NOT EQUALS |
> | GREATER [THAN] | |
< | LESS [THAN] | |
>= | NOT< | GREATER [THAN] OR EQUAL |
<= | NOT> | LESS [THAN] OR EQUAL |
An INSTANCE OF expression is of the form:
A CONTAINS expression is of the form:
where expression-1 evaluates to either: