Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Class(y) - <b>symbol class</b> - method http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Symbol Class - Method
 exec()
------------------------------------------------------------------------------

 exec( <parameter list> )

    Executes the function referred to by the Symbol object receiving the
    message.  If the executing application contains a function which has
    the same name as the symbol referred to by the receiving Symbol object,
    then that function will be executed with the specified parameters.
    Otherwise, no action will be taken.  For example:

        // create a symbol object referring to the QOUT symbol
        LOCAL oSym := Symbol():new( "QOUT" )

        ? "Now test the :exec() method"

        oSym:exec( "This string is being printed by QOUT" )
        oSym:exec( "which is being invoked by the :exec()" )
        oSym:exec( "method in the Symbol class." )

    This allows Symbol objects to be used for more than just sending
    messages to objects.  If object-oriented data-driven systems are being
    developed which make use of the Symbol class, the exec() method can
    be useful to maintain consistency when dealing with functions as well
    as methods.

    Note:

    At present, no error is generated if no function exists with the name
    referred to by the Symbol object.  This may change in future versions.

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