next up previous contents index search.gif
Next: 8.3 Parameter lists Up: 8. Using functions and Previous: 8.1 Procedure declaration

8.2 Function declaration

A function declaration defines an identifier and associates it with a block of code. The block of code will return a result. The function can then be called inside an expression, or with a procedure statement.

Function declaration

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{function\ de...
...}
\synt{function\ header} \lit* ;
\synt{subroutine\ block} \lit *;\end{syntdiag}

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{function\ he...
...t*{string} \)\begin{displaymath}\synt{modifiers} \end{displaymath}\end{syntdiag}

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{subroutine\ ...
...ynt{external\ directive}\\
\synt{asm\ block}\\
\lit*{forward}
\)\end{syntdiag}


root
1999-06-10