Jack Ort wrote:
>    s2i =: 6 s: s:
>    s2i ' NY'
>to return the corresponding code value (2) [...]

Mind you:  that will return a singleton list with the corresponding code.

> [...] and use that to query.

which can, depending on the code you use, propagate into a singleton
result list.  Just something one should be aware of.

>But what if I want to see all my coded strings, to find out if a string has
>been coded already?

All symbols are in a common pool.  A symbol which is present might
be present because your application used it, because some library
used it, or because both did.  There is no way to tell the origin
of a symbol, and I wouldn't base my code on a symbol's status.

I simply assume that "all symbols are there", used or not, just like
I don't care whether the character vector  'foo'  has been ever
used by me before.

                                                        Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to