Library /sys$common/syshlp/helplib.hlb  —  PASCAL  Declaration Section, Routine Declaration, directive
  A  directive  is  the  alternative  to  a  block  in  a  routine
  declaration.  A directive provides the compiler with information
  about either a routine whose heading is declared separately from
  its  body (indicated by the FORWARD directive) or a routine that
  is external to the Pascal program (indicated  by  the  EXTERNAL,
  EXTERN  or FORTRAN directives).  To specify a directive, include
  it immediately after the routine heading and follow  it  with  a
  semicolon.    The   following   describes  the  two  classes  of
  directives.

   o  The FORWARD directive indicates a  routine  whose  block  is
      specified  in  a  subsequent  part of the same procedure and
      function section, allowing you to call a routine before  you
      specify  its routine body.  As an extension, VSI Pascal will
      allow the body to be in a different  declaration  part.   If
      the  body  and  heading are specified in different procedure
      and function sections, a FORWARD  declared  function  should
      not be used as an actual discriminant to a schema type.

      When you specify the body of the routine in subsequent code,
      include   only   the   FUNCTION   or  PROCEDURE  predeclared
      identifier, the routine-identifier,  and  the  body  of  the
      routine.    Do   not   repeat   the   formal-parameter,  the
      attribute-list, or the result-type-id.

   o  The EXTERNAL, EXTERN and FORTRAN directives indicate that  a
      routine  is  external to a Pascal program.  They are used to
      declare independently compiled Pascal  routines  written  in
      other  languages.   For  portability  reasons,  the  FORTRAN
      directive should only be used for external routines  written
      in FORTRAN.
Close Help