Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <b>shared declare global variables</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SHARED                   Declare Global Variables

 SHARED varlist

    Declares one or more variables in a procedure or function global.

     varlist    A comma-delimited list of valid variable and/or array
                names; array names should be followed by empty
                parentheses.

   --------------------------------------------------------------------------

      Notes:    The SHARED statement may be used only within a procedure
                or function definition, and makes main program variables
                available to the current procedure or function definition
                without passing them as parameters.

                The SHARED statement must appear before any executable
                statements in a procedure or function definition.

                In the current implementation of Turbo Basic, procedure
                and function variables are SHARED by default, but Borland
                advises explicit declaration nevertheless.

See Also: LOCAL STATIC

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson