FutureBasic Logo

<<    Index    >> FutureBasic 5

local   statement



Syntax:
[clear] local [MODE]

Description:
This statement is an alternative way to indicate the beginning of the scope of a local function. If used, it must appear somewhere above the local fn statement. All non-global variables which are declared between the local statement and the local fn statement have a scope local to the function. Adding the clear and/or MODE keywords has the following additional effects:
Note:
dim is the only kind of statement that you should put between the local statement and the local fn statement. Executable statements placed between local and local fn will never be executed.
You cannot declare any of the the variables in the function's parameter list using a dim statement after the local statement.
A compiler preference allows you to fill local fns with $A5A5 for debugging. With this item checked, all functions that do not begin with clear local have every variable filled with this value. It's a great debugging tool.

See Also:
local fn; end fn; dim; begin/end globals