[<<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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson