◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── Syntax: LOCAL name [[count]][:qualifiedtype] [, name [[count]] [:qualifiedtype]]... See also: LOCAL in Macros, PROC Description: Generates code to create one or more stack (automatic) variables, which can be accessed only within the current procedure. The assembler uses the same method used by high-level languages to create local variables. The <name> parameter is the name of the variable, and <count> is an optional expression (which must appear in square brackets) indicating the number of elements to allocate. The <qualifiedtype> parameter is any qualified type appropriate to <name>. The default <qualifiedtype> is WORD in a 16-bit segment and DWORD in a 32-bit segment. See: ◄qualified type► Once declared in a LOCAL statement, local variables can be referred to by name. The assembler translates references to these variables into references to their actual location on the stack using the BP indirect addressing mode. The assembler will generate an error if you have already defined <name> as a label. Example: LOCAL array[20]:BYTE -♦-