next up previous contents
Next: External Function Example Up: Program Units Previous: External Subroutine Example

Function Syntax

Syntax of a (non-recursive) function:

 
 [ tex2html_wrap_inline43037  prefix  tex2html_wrap_inline43039 ] FUNCTION  tex2html_wrap_inline43037  procname  tex2html_wrap_inline43039 ( [ tex2html_wrap_inline43037  dummy args  tex2html_wrap_inline43039 ])

tex2html_wrap_inline43037  declaration of dummy args tex2html_wrap_inline43039

tex2html_wrap_inline43037  declaration of local objects tex2html_wrap_inline43039

...

tex2html_wrap_inline43037  executable stmts, assignment of result tex2html_wrap_inline43039

[ CONTAINS

tex2html_wrap_inline43037  internal procedure definitions tex2html_wrap_inline43039 ]

END [ FUNCTION [ tex2html_wrap_inline43037  procname tex2html_wrap_inline43039 ] ]

here tex2html_wrap_inline43037  prefix tex2html_wrap_inline43039 , specifies the result type. or,
 
 FUNCTION  tex2html_wrap_inline43037  procname  tex2html_wrap_inline43039 ( [ tex2html_wrap_inline43037  dummy args  tex2html_wrap_inline43039 ])

tex2html_wrap_inline43037  declaration of dummy args tex2html_wrap_inline43039

tex2html_wrap_inline43037  declaration of result type tex2html_wrap_inline43039

tex2html_wrap_inline43037  declaration of local objects tex2html_wrap_inline43039

...

tex2html_wrap_inline43037  executable stmts, assignment of result tex2html_wrap_inline43039

[ CONTAINS

tex2html_wrap_inline43037  internal procedure definitions tex2html_wrap_inline43039 ]

END [ FUNCTION [ tex2html_wrap_inline43037  procname tex2html_wrap_inline43039 ] ]

here, tex2html_wrap_inline43037  procname tex2html_wrap_inline43039 must be declared.

For more information, click here gif


next up previous contents
Next: External Function Example Up: Program Units Previous: External Subroutine Example

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.