BASICHELP.HLB  —  SUB
  The SUB  statement  marks  the  beginning  of  a  BASIC  subprogram  and
  specifies its parameters by number and data type.

  Example

  SUB SUB3 (BYTE Age, DOUBLE Wage(20,20), STRING Emp_name)
       .
       .
       .
  END SUB

1  –  Syntax

      SUB sub-name [ pass-mech ] [ ( [ formal-parm ],... ) ]
          [ statement ]...
      { END SUB }
      { SUBEND  }

        pass-mech:    { BY DESC  }
                      { BY REF   }
                      { BY VALUE }

                                {unsubs-var-name            }
        formal-parm:
        [data-type]{array-name([int-const],...)}[=int-const][pass-mech]
                                {          [ ,       ]...   }
Close Help