TB=Terrence Brannon,RH=Roger Hui
TB>  how might you create a single character string 
TB>  of these letters in alphabetical order? 

The first 127 elements of primitive noun  a.  comprise the ASCII alphabet*.  
Therefore, given:

TB>  a-z are ascii 97 to 122

            97 { a.
        a
           122 { a.
        z
        
           (97 + i. 1 + 122 - 97) { a.
        abcdefghijklmnopqrstuvwxyz


TB>   you can ignore the knowledge of the ascii range
TB>   if there  is something simple like 'a' .. 'z' in J.

There is.  Re-read Roger's recent response to you; it contains a clue:

RH>     _10 ]\ a.i.t
RH>  52  32 115  99 111 114 101  32  97 110

To be a bit more explicit:

           a. i. 'a'
        97
           a. i. 'z'
        122
        
           'a' ([ + i.@:-.@:-)&:(a.&i.) 'z'
        97 98 99 100 101 102 103 104 105 106 107 108 ...
        
           a. {~ 'a' ([ + i.@:-.@:-)&:(a.&i.) 'z'
        abcdefghijklmnopqrstuvwxyz
           
           'a' ([ + i.@:-.@:-)&.:(a.&i.) 'z'
        abcdefghijklmnopqrstuvwxyz
        
           ([ + i.@:-.@:-)/&.:(a.&i.) 'az'
        abcdefghijklmnopqrstuvwxyz
           
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

Reply via email to