GENSYM exposes the variable gensym.number
A Logo programming environment for Microsoft Windows
Brought to you by:
david_costanzo
Hi,
If I run the command GENSYM I expect to get a unique word.
I do get a unique word, however, the environment now has a variable called gensym.number
That is not documented as an expected behavior, and I opened this ticket so that gensym.number is buried by GENSYM...
but maybe it shouldn't be, because when we save the environment and load it at a later time we might want to keep guaranteeing unique words. I believe this is an unlikely use of this command.
I'm leaning towards:
gensym.number"Outputs a unique word each time it is invoked during the current session. The words are of the form G1, G2, etc. When a fresh session is open the counter restarts at 1"
UCBLogo 6.2.3 buries the variable and I don't see any plausible compatibility problems in doing that.
Your proposed update to the documentation sounds reasonable, too.
It's interesting that the names are documented as "G1, G2, etc." but generated as lowercase "g1, g2, etc.". I wonder if there's a story behind that. I may change the documentation to match the implementation.
This is fixed by [r6087], which buries
gensym.number. The help entry was also fixed, along the lines you suggested.The fix will be available in whatever version follows 8.4.0.
Related
Commit: [r6087]