I'd agree with Dan that something like:
LCALPHA=: 'abcdefghijklmnopqrstuvwxyz'
is the simplest and perhaps most portable way to do this
because it avoids dependency on a particular alphabet.
In fact, I use this name and definition along with others I
swiped from Dan to avoid re-inventing the wheel. My startup
customization function includes these lines:
NB. These are the elements I'm usually interested in from a. (from
danutils.ijs)
QUOTE=: ''''
UCALPHA=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
LCALPHA=: 'abcdefghijklmnopqrstuvwxyz'
ALPHA=: LCALPHA,UCALPHA
DIGITS=: '0123456789'
ALPHANUM=: ALPHA,DIGITS
WHITESPACE=: ' ', TAB, CR, LF
PRINTABLE=: WHITESPACE , a. {~ 33 ([ + i.@:>:@:-~) 126 NB. a. ];.0~ 33 ,: 94
PRIMITIVES=: ;: '! !. !: " ". ": # #. #: $ $. $: % %. %: & &. &.: &: * *. *:
+ +. +: , ,. ,: - -. -: . .. .: / /. /: 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: : :.
:: ; ;. ;: < <. <: = =. =: > >. >: ? ?. @ @. @: A. C. D. D: E. H. L. L: S:
T. [ [. [: \ \. \: ] ]. ]: ^ ^. ^: _1: _2: _3: _4: _5: _6: _7: _8: _9: _: `
`: a. a: b. c. d. e. f. i. i: j. m. n. o. p. p: q: r. s: t. t: u. u: v. x.
x: y. { {. {: {:: | |. |: } }. }: }:: ~ ~. ~: NB.'
On 5/18/07, Dan Bron <[EMAIL PROTECTED]> wrote:
...
TB> I just want to get the job done.
Then why did you not just use 'abcdefghijklmnopqrstuvwxyz' ?
-Dan
PS: Actually, the definition of a. says:
"a. is a list of the elements of the alphabet ...
The content of a. as well as the ordering of its elements
may differ on different computing systems."
http://www.jsoftware.com/help/dictionary/dadot.htm
Which makes using the simple 'abcdefghijklmnopqrstuvwxyz' an even more
compelling strategy.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm