|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] Is there a way to clear the screen? |
Date: | Wed, 28 May 2014 07:54:39 +0800 |
That's because control-l is a readline feature.
Regards,
Elias
Hi,
in immediate execution mode you can do:
)HOST tput clear
which is rather portable. In programs, you can do the same:
'lib_file_io.so' ⎕FX 'FILE_IO' ◊ FILE_IO[25] FILE_IO[24] 'tput clear > /dev/tty'
Interestingly the ^L (aka ⎕AV[13]) is printed::
address@hidden:~/projects/juergen/apl-1.3/src$ ./apl > x
... typing blindly ...
address@hidden:~/projects/juergen/apl-1.3/src$ vi x
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.3 / 6786
Copyright (C) 2008-2014 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: ./apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
^[[30m^[[47m^[[K ⎕AV[13]
^[[30m^[[48m^[[K^L
^[[30m^[[47m^[[K )off
^[[m^[(B^[[K^[[30m^[[48m^[[K
Goodbye.
"x" 23L, 1104C 11,24 All
If I "cat" the same file then the screen is not cleared.
On 05/27/2014 02:46 AM, Elias Mårtenson wrote:
That's a very alluring thing. :-) It's bad though, since it will come out as garbage if the output device does not support it.
Regards,
EliasOn 27 May 2014 08:43, "Frederick H. Pitts" <address@hidden> wrote:
Blake,
If you are looking for instant gratification,
⍞ ← (⎕UCS 27), '[2J'
will do the job on any terminal that honors ansi escape sequences.
Regards,
Fred
Retired Chemical Engineer
On Mon, 2014-05-26 at 19:29 -0500, Blake McBride wrote:
> Dear Elias,
>
>
> On one hand, I would still love to see a basic ^L ability without
> having to get into external code.
>
>
> On the other hand, perhaps I should start to take a look at library
> code. (I actually have over 20 years of C experience.) I fear my
> reaction once I see how it works. I'm sure the possibilities are
> endless. I haven't even looked at it yet. Is there a hello world
> sample?
>
>
> Thanks.
>
>
> Blake
>
>
>
>
> On Mon, May 26, 2014 at 6:47 PM, Elias Mårtenson <address@hidden>
> wrote:
> The correct way to do that is to use the native interface to
> provide an interface to Curses. It should be fairly trivial to
> implement.
>
>
> On 27 May 2014 07:32, "Blake McBride" <address@hidden>
> wrote:
> >
> > If I execute ⎕AV[8] the terminal sounds the bell. If I type
> ^L my xterm screen clears. I need one of the ⎕AV characters
> to do what ^L does. That gives me the absolute basics of
> screen IO.
> >
> > Thanks.
> >
> > Blake
> >
>
>
>
>
>
[Prev in Thread] | Current Thread | [Next in Thread] |