a prompt for input in c.l. application
Posted
#1
(In Topic #1137)
Trainee
In Basic it would be
Input "Invitation phrase",#filenumber, variable. In Gambas it seems there is no "invitation phrase". Is there any way to achieve the same result?
Posted
Guru

ail_gu said
Sorry for an elementary question. I am programming for 50 years, but it is my first experience with Gambas. How can I ask user to enter a number and get their input on the same line of the terminal?
In Basic it would be
Input "Invitation phrase",#filenumber, variable. In Gambas it seems there is no "invitation phrase". Is there any way to achieve the same result?
for a terminal applications look at File.In and File.Out and the File.In.ReadLine() Method.
File.In and File.Out point to stdin and stdout respectively.
Something like this should work…
I am not sure how to not put in a linefeed with the output text, if i used
Print "question: "; then the end semicolon should not make it insert a linefeed but it makes the text not show at all :-\
Posted
Guru

BruceSteers said
I am not sure how to not put in a linefeed with the output text, if i used
Print "question: "; then the end semicolon should not make it insert a linefeed but it makes the text not show at all :-\
Okay i got the answer for single line method now…
Note: some gambas native commands like Read , Write, Flush, etc require the hash # prefix with their arguments to denote a file pointer.
hence the
Flush #File.Out
Posted
Regular

1 guest and 0 members have just viewed this.


