home .. forth .. colorforth mail list archive ..

[ColorForth] Equality


A jump table may be cleaner construct. Define a map function such that a
number maps to a jump table index. Then you can do something like:

map jump default 5thing 11thing 38thing

where default, 5thing, 11thing, and 38thing are forth words. How the map
funcion works depends on your input. If you expect only the numbers 0 5 11
38, there is a simple mapping. Notice the first two bits of each number
are uniquie, use this as an index. For example:

3 and jump default 5thing 38thing 11thing

Hope that gives you some ideas.

Mark

------------------------

To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems   -   List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site   -   http://www.colorforth.com