Futurebasic/Language/Reference/local

< Futurebasic < Language < Reference

LOCAL

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 MODEkeywords 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 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

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.