[Gambas-user] Terminal input without newline?

Bruce Steers bsteers4 at gmail.com
Mon Nov 20 20:00:40 CET 2023


On Mon, 20 Nov 2023 at 18:46, T Lee Davidson <t.lee.davidson at gmail.com>
wrote:

> On 11/20/23 11:40, Bruce Steers wrote:
> > Trying to use ; at the end of Print so it does not use a linefeed but
> stays on the same line does not work.
> > The text "Type something here: " does not show until after the user
> types something and presses return.
> >
> > Is there a way around that?
>
>    Dim sTxt As String
>    Print "type something here: ";
>    Flush #File.Out
>    sTxt = File.In.ReadLine()  ' read a line from stdin
>
>    Print "the text typed was: " & sTxt
>

Excellent, thank you kindly sir :)


BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231120/807d37e3/attachment.htm>


More information about the User mailing list