Hi, what follows is a list of simple uses for Symbol (defined as s: in J). I get that using symbols is a bit like an enum, and that searching for a number is faster than searching for a string. Perhaps there's also a btree or something similar in the background as well for string to symbol mapping.
At the end of this list of simple uses there's a domain error and a syntax error. The domain error occured while trying to use `symname instead of s: ' symname'. I guess this is not defined (pity). The syntax error occurs when I try to be sneaky and define ` as a verb. Probably this is not allowed. Please confirm. thanks, -Steven btw: thanks for the helpful comments on some of the previous posts NB. key: F=fields [F=: s: ' fred john patrick patricia' `fred `john `patrick `patricia NB. normal index-of usage 'abcdef' i. 'c' 2 F i. (s: ' john') NB. space infront of 'john' is important 1 john=. (s: ' john') F i. john 1 F i. `john |domain error | F i.`john NB. so lets try to define ` as a verb. Is there a limit on which characters can form a verb? `=: s: |syntax error | `=:s: ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
