[Gambas-user] Terminal input without newline?

T Lee Davidson t.lee.davidson at gmail.com
Mon Nov 20 19:45:04 CET 2023


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


-- 
Lee



More information about the User mailing list