Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

Overview Variable Names Variable Types Variable Length Variable Classification Data Division Statements System Variables

Variable Names

Variable names are alphanumeric descriptions of specific memory locations. Variable names must begin with a letter (A through Z, upper/lowercase) and may contain upper/lowercase letters, numbers, and imbedded periods, but no blank spaces or other imbedded special characters.

Variable names may be any number of characters long, although the MTB compiler recognizes only the first 32 characters of the name. Therefore, the first 32 characters of a variable name must be unique within a given program.

String variable names must include a dollar sign ($) as the final character of the name. Numeric variable names do not have any special character at the end. Thus, the MTB compiler recognizes the difference between string names and numeric names based on the "$" at the end of string variable names.

Subscripted variable names end with parentheses, where the values inside of the parentheses represent the index(es) to the array/matrix.

Also see:

Variable types
Variable length
Variable classification

Examples:

  String variable names       Numeric variable names
  =====================       ======================
  A$, B$, C$                  A, B, C
  a$, b$, c$                  a, b, c
  XYZ123$                     QRS456
  VALUE$                      VALUE
  ZIPCODE$                    CRLIMIT
  ZIP.CODE$                   CREDIT.LIMIT
  Zip.code$                   Credit.limit
  TABLE$(5,8)                 HISTORY(10,3,2)