Thanks to all who responded to this question. 
The info about pasting 
and ctrl + E were particularly helpful. 


-Don Mintz 





----- Original Message ----- 
From: "Bo Jacoby" <[email protected]> 
To: "Programming forum" <[email protected]> 
Sent: Wednesday, September 29, 2010 8:46:57 PM 
Subject: Re: [Jprogramming] quadratic equation primer example gives syntax 
error 

I pasted the lines into the ijx window, then highlight the lines and pressed 
ctrl+E for execute. Then I got 

|spelling error 

| 'a b c' =: y. 

Then I removed the dot after y and it worked. 
rq 
3 : 0 
'a b c' =: y 
((-b) (+,-) %: (b^2)-4*a*c) % (2*a) 
) 
rq _1 1 1 
_0.618034 1.61803 
p. |. _1 1 1 
┌──┬─────────────────┐ 
│_1│1.61803 _0.618034│ 
└──┴─────────────────┘ 

--- Den ons 29/9/10 skrev Dan Bron <[email protected]>: 

Fra: Dan Bron <[email protected]> 
Emne: Re: [Jprogramming] quadratic equation primer example gives syntax error 
Til: "J Programming" <[email protected]> 
Dato: onsdag 29. september 2010 18.51 

You can't copy/paste multiple lines into the IJX window. [1] 

For multi-line explicit definitions, paste it into a IJS window (a J script: 
try CTRL+N), then run the window (try CTRL+W or CTRL+SHIFT+W). 

Also, replace y. with y (delete the trailing dot). Do this everywhere you see 
any one of y. x. u. v. m. or n. . 


-Dan 

[1] For some reason, the J frontend distinguishes between the keystroke <ENTER> 
and the character newline. 

The next version of J, J7, has a frontend that fixes this problem. 



Please excuse typos; composed on a handheld device. 

-----Original Message----- 
From: [email protected] 
Sender: [email protected] 
Date: Wed, 29 Sep 2010 16:31:11 
To: <[email protected]> 
Reply-To: Programming forum <[email protected]> 
Subject: [Jprogramming] quadratic equation primer example gives syntax error 



Does anyone know why I get this syntax error? 




rq =: 3 : 0 
'a b c' =: y. 
((-b) (+,-) %: (b^2)-4*a*c) % (2*a) 
) 
|syntax error 
| ) 

Thank you, 

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


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

Reply via email to