Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Release Notes - <b>173 changed: aliases</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 173 CHANGED: Aliases
--------------------------------------------------------------------------------

     1. Statements can begin with an alias:  Unlike Summer '87, you
        can now specify statements beginning with an alias.  This allows
        you to execute an alias expression on a line by itself as shown
        below:

        <alias>->(<exp>)

     2. Referencing work areas with an expression:  In Clipper 5.0,
        you can reference a work area using an expression as the left
        operand of the alias (->) operator if the expression is enclosed
        by parentheses.  This expression is a numeric value representing
        the work area number.  The intent is to allow work area numbers
        to be used as handles (not numeric values).  It is useful for
        passing references to work areas without using macros, aliases,
        names, etc.  For example:

        USE Customers NEW
        nWork := SELECT()
        .
        .
        .
        ? (nWork)->(FIELDGET(1))

     3. Undefined aliases:  Clipper 5.0 does not allow an alias to
        be used before it is defined.  Summer '87 allowed this usage in
        certain cases.  The most common example is to test if a database
        is in USE in another work area with a construct.  For example:

        ? MyTable->( USED() )

        In Clipper 5.0, this generates a runtime error.  There are
        numerous workarounds, but the simplest is to use the
        SELECT() function to check for the existence of a particular
        alias:

        ? SELECT("MyTable") != 0

        Another case is where undefined aliases were used in some Summer
        '87 programs with the M-> alias in an aliased expression.  For
        example:

        ? M->( MyFunc() )

        Clipper 5.0 generates an error with this expression.  The
        workaround is simply to select an unoccupied work area before
        evaluating the expression.  This can be done with a #translate,
        if desired:

        #translate M->( <expr> )  =>   (0)->( <expr> )

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