Array Subscript Operator

From RAD Studio
Jump to: navigation, search

Go Up to Postfix Expression Operators Index


Brackets ([ ]) indicate single and multidimensional array subscripts. The expression

<exp1>[exp2]

is defined as

*((exp1) + (exp2))

where either:

  • exp1 is a pointer and exp2 is an integer or
  • exp1 is an integer and exp2 is a pointer