Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #59752

Re: The Forth console and cursor management

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: The Forth console and cursor management
Date 2017-05-23 11:50 -0400
Organization A noiseless patient Spider
Message-ID <og1li1$6pk$1@dont-email.me> (permalink)
References <og17st$lfa$1@dont-email.me> <9722a154-6aa3-490c-974b-a43c1ad65763@googlegroups.com>

Show all headers | View raw


minforth@arcor.de wrote:
> Am Dienstag, 23. Mai 2017 13:57:32 UTC+2 schrieb Alex:
>> <quote>
>> 6.1.0695 ACCEPT
>>
>> Because external system hardware and software may perform the ACCEPT
>> function, when a line terminator is received the action of the cursor,
>> and therefore the display, is implementation-defined. It is recommended
>> that *the cursor remain immediately following the entered text* after a
>> line terminator is received.
>> </quote>
>>
>> Which is very elegant, but unfortunately with a standard Windows console
>> an absolute swine to implement. Using file reads through stdin, Windows
>> treats the enter key as a CR LF, and moves the cursor appropriately. A
>> quick straw poll:
>>
>> Does your favourite Forth do this (the > and < are meta chars to
>> indicate input and output, the underscore is the cursor caret)
>>
>>    >1 2 3 .s
>>    <[3] 1 2 3  ok[3]
>>    <_
>>
>>
>> or this?
>>
>>    >1 2 3 .s [3] 1 2 3  ok[3]
>>    <_
>>
>>
>> And which is preferable?
>>
>> --
>> Alex
>
> The Win console API allows for setting cursor positiona and size. So it is text mode only. Win32Forth uses its own more universal console AFAIK (don't know whether it could do graphics too)

The Win32Forth console gets confused a lot.  I don't normally see issues 
with typing commands, but some of the advanced features like command 
history are problematic.  I have seen issues with I/O but I believe that 
is usually blamed on the user's program mucking outside its own variable 
space.


> ACCEPT should not echo the return key internally. At least backspace and escape should work in any line input. For "text mode luxury" one would expect moving cursor left/right and toggle insert/overwrite. Cursor up/down for scrolling through the input history is a nice feature nice too. There is even a console API function that could be used for it.
>
>


-- 

Rick C

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

The Forth console and cursor management Alex <alex@rivadpm.com> - 2017-05-23 12:57 +0100
  Re: The Forth console and cursor management Raimond Dragomir <raimond.dragomir@gmail.com> - 2017-05-23 05:18 -0700
  Re: The Forth console and cursor management anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-23 12:48 +0000
    Re: The Forth console and cursor management Alex <alex@rivadpm.com> - 2017-05-23 15:45 +0100
    Re: The Forth console and cursor management albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-23 20:48 +0200
      Re: The Forth console and cursor management anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-24 10:16 +0000
  Re: The Forth console and cursor management minforth@arcor.de - 2017-05-23 06:22 -0700
    Re: The Forth console and cursor management Mark Wills <markwills1970@gmail.com> - 2017-05-23 06:27 -0700
  Re: The Forth console and cursor management minforth@arcor.de - 2017-05-23 06:44 -0700
    Re: The Forth console and cursor management rickman <gnuarm@gmail.com> - 2017-05-23 11:50 -0400
  Re: The Forth console and cursor management Matthias Trute <matthias.trute@gmail.com> - 2017-05-23 09:20 -0700
    Re: The Forth console and cursor management rickman <gnuarm@gmail.com> - 2017-05-23 17:46 -0400
  Re: The Forth console and cursor management peter.m.falth@gmail.com - 2017-05-23 12:12 -0700
  Re: The Forth console and cursor management Rob Sciuk <rob@controlq.com> - 2017-05-26 12:44 -0400

csiph-web