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>10 character values</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 10  Character Values
--------------------------------------------------------------------------------

     As noted, a VALUE cannot directly contain character data; instead,
     it contains an OREF that allows the data to be located when it is
     needed.  As with arrays, assigning a character value to a variable
     simply overwrites the variable's VALUE with a new VALUE containing
     an OREF to the character data.  Note that, as with arrays,
     assigning a character value from one variable to another simply
     duplicates the VALUE (i.e., the OREF); the character data itself is
     not duplicated.

     Note that this reference-based memory management technique is the
     same for strings, arrays, and code blocks.  Clipper's garbage
     collector monitors OREFs.  When there are no longer any references
     to a particular piece of data, the space occupied by that data is
     automatically reclaimed.

     For arrays, the reference technique is easily observed at the
     Clipper level: if the same array reference is assigned to two
     variables, either variable can be used to modify the array.

     With character data, however, the reference handling is not noticed
     at the Clipper level.  This is simply because Clipper operators and
     functions never act directly on character data--they always create
     a new character value as their result.

     Although unnoticed at the Clipper level, the reference technique
     does have an effect at the Extend system level.  This is discussed
     below.

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