BASICHELP.HLB  —  LSE Topics, Compilation unit, FUNCTION program unit
  A FUNCTION subprogram cannot be executed unless  linked  with  a  main
  program  unit.   Unlike SUB subprograms, FUNCTION subprograms return a
  value.  FUNCTION subprograms are  called  from  the  main  program  by
  referencing the FUNCTION name.

  FUNCTION subprograms must be declared with the EXTERNAL  statement  in
  the  main program.  You must specify the data type for the function in
  both the main program EXTERNAL statement and the  subprogram  FUNCTION
  statement.

  The FUNCTION statement marks the beginning of  a  FUNCTION  Subprogram
  and defines the subprogram's parameters.
Close Help