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>length of variable names</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
    Length of Variable Names
------------------------------------------------------------------------------

    Instance variable and class variable names in Clipper are effectively
    only significant to 9 characters.  This is in contrast to the usual
    limit of 10 characters which applies to normal variable and function
    names.  This means that all variables in a class should have names
    which can be distinguished from each other by their first 9 characters.
    Failure to do this will result in unpredictable results.


 Technical Note:

    This limitation is due to the way assignment to instance and class
    variables is implemented in Clipper 5.01.  There are two messages
    associated with each member (instance or class) variable - the name of
    the variable as specified in the class declaration, and the same name
    with an underscore prepended.  The Clipper compiler converts
    assignments to member variables into a message send using the modified
    instance variable name.  Due to the ten character width of the Clipper
    symbol table, a variable with a ten character name effectively has the
    last character truncated for assignment purposes.  This means that
    although it is possible to have two variables in a class distinguished
    only by the tenth character of their name, assignment will only be
    possible to one of them.

    The sample file provided on the Class(y) distribution disk,
    TENCHAR.PRG, demonstrates this.

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