Skip to Content

LOCAL

A statement to declare variables for local use inside a function (FN) or procedure (PROC). A null list of variables is not permitted.

LOCAL A$,X,Y%

LOCAL saves the values of its arguments in such a way that they will be restored at ’=’ or ENDPROC.

If a function or a procedure is used recursively, the LOCAL variables will be preserved at each level.

The LOCAL variables are initialised to zero/null.

See the keyword ON ERROR LOCAL for details of local error trapping.

Syntax

LOCAL <n-var>|<s-var>{,<n-var>|<s-var>}

Associated Keywords

DEF, ENDPROC, FN, PROC

Last updated on