VMS Help
PASCAL, Declaration Section, Routine Declaration, formal_parameter_list, mechanism_specifier

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  Compaq Pascal provides the foreign mechanism specifiers  %IMMED,
  %REF,  %DESCR, and %STDESCR, which precede a formal parameter in
  the declaration of an external routine.  If the formal parameter
  does  not  represent  a  routine,  the  mechanism specifier must
  precede the parameter name.  If the formal parameter  represents
  a   routine,  the  specifier  must  precede  the  reserved  word
  PROCEDURE or FUNCTION in the parameter declaration.

  In addition,  it  is  possible  to  use  the  passing  mechanism
  attributes  [IMMEDIATE]  and [REFERENCE] in a formal parameter's
  attribute list to obtain the same behavior as  %IMMED  or  %REF,
  respectively.

  A  %REF  or  [REFERENCE]  formal   parameter   requires   actual
  parameters  to  be  passed  by  reference.   %REF or [REFERENCE]
  implies variable semantics unless the  actual  parameter  is  an
  expression; in that case, it implies foreign value semantics.

  An  %IMMED  or  [IMMEDIATE]  formal  parameter  requires  actual
  parameters  to  be  passed with the by immediate value mechanism
  and always  implies  value  semantics.   %IMMED  or  [IMMEDIATE]
  cannot  be  used  on  formal  parameters  of type VARYING, or on
  conformant array and conformant VARYING parameters.

  A %DESCR formal  parameter  requires  actual  parameters  to  be
  passed  with  the  by  descriptor  mechanism  and interprets the
  semantics as %REF or [REFERENCE] does.

  A %STDESCR formal parameter requires  actual  parameters  to  be
  passed  with  the  by  string  descriptor  mechanism.  An actual
  parameter variable of type PACKED ARRAY OF CHAR implies variable
  semantics.  An actual parameter expression of either type PACKED
  ARRAY OF CHAR or type VARYING  OF  CHAR  implies  foreign  value
  semantics.   You  cannot  use  %STDESCR  on formal procedure and
  function parameters.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.