Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
brackets
◄Operator Summary► ◄Summary►
──────────────────────────────────────────────────────────────────────────────
Syntax: expression1[expression2]
[expression2]
In the syntax above, the brackets are intended literally. The
expression outside the brackets is optional.
The brackets (also called the "index operator") return the sum of
expression1 and expression2. If expression in brackets is a register,
then the brackets indicate an indirect memory operand rather than a
register-direct operand.
Two direct memory operands cannot be added. Typically, the expression
outside the brackets is an array address, and the expression inside is
an offset to an array element (always in terms of bytes).
See Also: plus (+), period (.)
-♦-