Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input with variables
#1
Hello, before than all i'm argentinian so my english might be a bit weak, but i can read it very well.

I need to make an input with a variable... just that...
if you don't know what i'm saying, here's an example:

Code:
INPUT "What's your name "; name$

but instead to show the text "what's your name" i need to show a variable... i tried many things like these:

Code:
question$ = "How are you"
input question$;answer$

but no one worked Sad

Ok, thanks.-

Sorry if someone else asked this before, but i've searched in the forum and i haven't seen anything.
Reply
#2
AS I was going to say before whitetiger typed his response 2 seconds before me,

use PRINT..

PRINT question$;
INPUT answer$
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
Try something like
Code:
PRINT question$;
INPUT answer$
The semicolon at the end of the print statement makes it so the line cursor doesn't go down a line.


Just run this and look at the results
Code:
PRINT "moo"
INPUT moo$

PRINT "moo";
INPUT moo$

PRINT "moo"
INPUT ; moo$

PRINT "moo";
INPUT ; moo$



Sorry If I wasn't very helpful. I'm getting sleepy
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#4
Completely helpful, I think. I was going to say the same thing, but I needed to make sure of something so I edited my post first..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#5
Thank you so much, people Big Grin
Reply
#6
thank you also because i was wondering the same thing recently. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)