You can enter multiline text exactly as you listed. In processing that, J
interpreted the line
text =: 0 : 0 as the instruction to read the characters input in the
following lines, including the line feeds until it received a line beginning
with ). At that point it assigned the input to the name text. if you
then enter a line with the characters text it displays what you entered.
If you copy those lines in the term window and paste them into the window
it does not reexecute the whole set of lines. Each line now appears as a
separate line in the window but it does not execute them
If you space back and and re-execute the line
text =: 0 : 0
it begins the process again and expects input to follow which will be
terminated as before by a right parenthesis.
Within the term window you can think of each line as a J sentence to be
executed, except in some cases when using explicit definition using the :
conjunction.
As Henry said, it is simpler to enter such text in a script window (
*.ijs). If having entered it in a term window you want to copy it to a
script window you can select the lines and do the usual copy and paste.
----- Original Message -----
From: "Asdasd Asdasd" <tr...@outlook.com>
To: <programm...@jsoftware.com>
Sent: Sunday, February 16, 2014 7:06 AM
Subject: [Jprogramming] Beginner - multiline paste
Hi, I'm a novice in J and I was trying to define a noun as a multi-line
text like this:
txt =: 0 : 0
ab
cd
fg
hi
jk
ij
)
I tried first executing the first line (txt =: 0 : 0) and then pasting
(ctrl v) my text. The result was only 'ij'.
I tried then to execute the first line and press F8 (run clipboard),
getting 0!:101 inputx_jrx_ as a result.
So, is there a way to assign multiline text to a noun without having to
create a new ijs and running from there?
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