QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: eddy498 on March 16, 2019, 01:06:04 am
-
I have a question. when you code an input and it pops that ? is there a way for you put code for input but not have to have that ? show up
-
Yes...
INPUT "My message here ", myvariable
instead of INPUT "My message here "; myvariable
So just use a "," instead of a ";" in front of your variable. (Comma = no question mark. Semicolon = question mark.)
... but for string input, you can do it either way, and no question mark will appear...
LINE INPUT "No question mark "; myvariable$
LINE INPUT "No question mark ", myvariable$
Pete
-
what i usually do is
print "my message here"
input myvariable$
that prints the question mark. is there a way of making it this way without the questionmark? i feel its a bit more organized since im placing alot of my coding with numbers in front to be able to use goto to move from one to another. its mainly to build like text based adventure game
-
Welcome to forum!
-
Or...
PRINT "my message here"
LINE INPUT myvariable$
As I mentioned in my first post, LINE INPUT doesn't use a question sign. If you strictly want a numeric variable, then use what BPlus posted but with...
PRINT "my message here"
INPUT myvariable
If you still want to use PRINT and INPUT, but want the input on the same line, use...
PRINT "my message here ";
INPUT myvariable
or
PRINT "my message here ";
INPUT myvariable$
or
PRINT "my message here ";
LINE INPUT myvariable$
Pete
-
thanks that makes it alot better