BASICHELP.HLB  —  Variables
  BASIC accepts these general types of variables:

   o  Floating-point
   o  Integer
   o  String
   o  RFA
   o  Packed Decimal
   o  Record

  The name given to a variable depends on whether the variable  is  internal
  or  external  to  the  program  and  whether the variable is implicitly or
  explicitly declared.

  The name of an internal or  external,  explicitly  declared  variable  can
  consist of from 1 to 31 characters.  The first character must be an upper-
  or lowercase alphabetic character.

  The name of an internal, implicitly declared variable can consist of  from
  1  to  31  characters;  the first character must be an upper- or lowercase
  alphabetic character, and the last character  can  be  a  dollar  sign  to
  indicate  a  string  variable  or  a  percent  sign to indicate an integer
  variable.  If the last character is not a dollar sign or percent sign, the
  name indicates a variable of the default type.

  A program cannot have external, implicitly declared  variables  since  all
  implicitly  declared names except SUB subprogram names are internal to the
  program.  In all cases, no variable name can have embedded spaces.

  You can use any combination of alphanumeric characters except keywords for
  a  variable name.  Using keywords generates compilation errors.  Variables
  are initialized to  zero  or  a  null  string  at  the  start  of  program
  execution.  Variable names cannot start with FN.
Close Help