Re: [Jprogramming] one element list of an integer to an atom

2012-03-30 Thread Simon Barker
software.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: 30 March 2012 07:32 To: 'Programming forum' Subject: Re: [Jprogramming] one element list of an integer to an atom What fun! When I saw this: <'Qsc' +---+ �Qsc� +---+ and visualize

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Linda Alvord
in. I knew there was an easier way! Linda -Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Simon Barker Sent: Thursday, March 29, 2012 10:26 AM To: 'Programming forum' Subject: Re: [Jprogramming] one elemen

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Simon Barker
x27;N' 1 0 0 0 0 0 0 0 0 Simon -Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: 29 March 2012 15:01 To: 'Programming forum' Subject: Re: [Jprogramming] one element list of an integer to an atom

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Linda Alvord
. Linda -Original Message----- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Simon Barker Sent: Thursday, March 29, 2012 6:47 AM To: 'Programming forum' Subject: Re: [Jprogramming] one element list of an integer to an atom The old APL idiom

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Simon Barker
ng-boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: 29 March 2012 09:20 To: 'Programming forum' Subject: [Jprogramming] one element list of an integer to an atom a=:1$3    a 3    3= 2 3 5 3 4 0 1 0 1 0 a= 2 3 5 3 4 |length error | a=2 3 5 3 4 ".a |domain error

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Linda Alvord
tware.com] On Behalf Of Linda Alvord Sent: 29 March 2012 09:20 To: 'Programming forum' Subject: [Jprogramming] one element list of an integer to an atom a=:1$3    a 3    3= 2 3 5 3 4 0 1 0 1 0 a= 2 3 5 3 4 |length error | a=2 3 5 3 4 ".a |domain error | ".a

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Henry Rich
Original Message- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord > Sent: 29 March 2012 09:20 > To: 'Programming forum' > Subject: [Jprogramming] one element list of an integer to an atom > > a=:1$3 >

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Simon Barker
rogramming forum' Subject: [Jprogramming] one element list of an integer to an atom a=:1$3    a 3    3= 2 3 5 3 4 0 1 0 1 0 a= 2 3 5 3 4 |length error | a=2 3 5 3 4 ".a |domain error | ".a a+5 8 Clearly, a is numeric. How can I change a to a numeric atom 3

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Ric Sherlock
To reduce the dimensions of an array in J I tend to use ( ,/ myarray) $ ,3 1 $ ,/ ,3 On Thu, Mar 29, 2012 at 9:19 PM, Linda Alvord wrote: >   a=:1$3 >    a > 3 >    3= 2 3 5 3 4 > 0 1 0 1 0 >   a= 2 3 5 3 4 > |length error > |   a    =2 3 5 3 4 > >   ".a > |domain error > |       ".a >  

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Boyko Bantchev
> Clearly, a is numeric. How can I change  a  to a numeric atom  3 , rather > than a one element list  3 ? > I need to find where the 3's are in a list. The result of executing some > expression has produced a one item list of a  3 . Take the head of it: ({., a) = 2 3 5 3 4 0 1 0 1 0 (even if

Re: [Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Tom Arneson
$ , 3 1 $ 3 $ 0{ , 3 -Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: Thursday, March 29, 2012 03:20 To: 'Programming forum' Subject: [Jprogramming] one element list of an int

[Jprogramming] one element list of an integer to an atom

2012-03-29 Thread Linda Alvord
a=:1$3    a 3    3= 2 3 5 3 4 0 1 0 1 0 a= 2 3 5 3 4 |length error | a=2 3 5 3 4 ".a |domain error | ".a a+5 8 Clearly, a is numeric. How can I change a to a numeric atom 3 , rather than a one element list 3 ? I need to find where the 3's are in a list. The result