If the integers you wish to convert are of a limited domain the fastest way
would be:
d=:'1 ';'2 ';'3 ';'4 ';'5 ';'6 ';'7 ';'8 ';'9 ';'1 0 ';'1 1 ';'1 2 ';'1 3
';'1 4 ';'1 5 ';'1 6 ';'1 7 ';'1 8 ';'1 9 ';'2 0 '
}:;d{~i.20
Simon
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Vaughan
Sent: 08 September 2011 16:42
To: [email protected]
Subject: [Jprogramming] Turn list into string
Hi,
I want to turn a list of integers into string. I've tried this:
1":>:i.20
123456789***********
But I want it to look like: 1234567891011121314151617181920
Also, I was wondering what the limit might be for how long this string is.
Alternatively (preferably actually), I'd like to retain the list but with
each element being one digit in length. For example, 18 is split into 1 8.
So for >:i.20 I'd want: 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1
8 1 9 2 0
Thanks.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm