Hi,
the character below is probably cut-and-paste error from the IBM
language reference manual.
These things happen sometimes when cut-and-pasting from PDF files. Not
so important really.
My memory told me this:
[⎕5] print lines 0-5
[5⎕] print lines 5-end-of-function
[3⎕5] print lines 3-5.
But that was on another interpreter (APL68000) and around 1979 or so,
so i could be wrong.
In those days we used to hack the terminal driver to improve the
editing capabilities of the machine.
I am using cursor up-and-down from readline to recall the line. If you
enter eg: 1 2 3 and 4:
∇foo
[1] 1
[2] 2
[3] 3
[4] 4
[5]
then you can recall 4, 3, 2, and 1 by pressing the cursor up key
repeatedly (by virtue of readline).
After that you can edit the line and ENTER will make it the new line
5. Same for existing lines you only
need to insert a different [line] at the beginning.
It's not that I am tool lazy to implement the other [a⎕b]. It is more
that I see more problems than benefits.
There are other components in GNU that I believe are interfacing to
readline (emacs mode ?) and fixing
this rather tiny incompatibility could break a lot. For a multi
platform program like GNU APL it is much more
difficult to get this right that for a single operating system (say
windows) program. Consider, for example,
methods for positioning the cursor in [a⎕b]. Normally you would print
the line and then backspace to the
desired columns. But some terminals delete rather than backspace, some
clear to end of line after backspace,
and so on.
It would rather leave things as they are. The initial posting from
Peter was actually a fault because the new
line should have been 10 rather than a new line at the end of the
function (another mishap of my memory),
but [a⎕b] with 'a' meaning a coloum position is a different story
/// Jürgen
On 04/27/2014 01:14 AM, enz...@gmx.com wrote:
Hi Jürgen,
What is the character below? after the / the cursor?
I'm a bit confused - please straighten me out on this if you could
what are you using so that a cursor can be on a line and have the
ability to edit the line?
---
from my memory (or imagination now ...) i thought
[⎕2] displays line 2 and opens up line 3
[2⎕] displays line 2 and puts cursor at front of the line
[2⎕10] displays line 2 and puts cursor at position 10 not
needed if readline isn't a required lib as you say below - ? maybe
any right side number moves cursor to end of the line?
[⎕2-4] displays lines 2-4 and opens up line 5
enztec
On Sat, 26 Apr 2014 19:47:00 +0200
Juergen Sauermann <juergen.sauerm...@t-online.de> wrote:
Hi,
I changed it to what the example in the IBM language reference manual
seems to suggest
(there are other places suggesting different things):
"
Prompting for an additional
line following the display of
line 2:
∇ENTER[⎕2]
[2] TAB←TAB,(I>ρTAB)/,NAME
[3]
"
Starting editing in the middle of the line is somewhat complicated
because we have
different input options (with readline, without readline, testcase
files
etc.) that are
difficult to bring in line.
/// Jürgen