| Top Level Words |
|
: SGfirst ( ele -- ) SG-init >SGtable SGsweep SG. ; |
Use this for first element to initialize the table |
: SGnext ( ele -- ) >SGtable SGsweep SG. ; |
Use this for remaining elements |
When I first introduced these words, I was using the conventions of the 1990 version. In the 1990 system, they had a slightly different form, using GETE to get the input element from the input stream -- so one would use "SGfirst B" to start a subgroup with element B. The examples below were produced using the current version of Groups32. It is necessary to add the constants.
0 CONSTANT /A 1 CONSTANT /B 2 CONSTANT /C 3 CONSTANT /D 4 CONSTANT /E 5 CONSTANT /F 6 CONSTANT /G 7 CONSTANT /H 8 CONSTANT /I 9 CONSTANT /J 10 CONSTANT /K 11 CONSTANT /L 12 CONSTANT /M 13 CONSTANT /N 14 CONSTANT /O 15 CONSTANT /P 16 CONSTANT /Q 17 CONSTANT /R 18 CONSTANT /S 19 CONSTANT /T
The input is in the form "/B SGfirst". This output also assumes the new numbering of groups.
32 >GROUP /B SGfirst B C D A /E SGnext B C D A E F G H /I SGnext B C D A E F G H I J K L M N O P