|
Re: Just Starting Programming
| quote: | Originally posted by meneedit
thats right i'm just starting programming in quick basic.
lol! so very old...
anyways, what have I done wrong here:
==========================================================
CLS
PRINT "How are You?"
INPUT answer$
IF UCASE$(answer$) = "GOOD" THEN
PRINT "thats good"
ELSE
IF UCASE$(answer$) = "BAD" THEN
PRINT "why?"
ELSE
PRINT "what the hell?"
END IF
END IF
PRINT "what are you doing today?"
IF UCASE$(answer$) = "listening to music" THEN
PRINT "cool, what type of music are you into"
IF UCASE$(answer$) = "electronic" THEN
PRINT "no way!!!! me too!"
PRINT
PRINT "hmmm, which artists do you like?"
IF UCASE$(answer$) = "sonic animation"
or "prodigy"
or "the prodigy"
or "hybrid"
or "moby"
or "crystal method"
or "chemical brothers" THEN
PRINT "yep! good stuff"
PRINT
PRINT "so whats your favourite choon?"
IF UCASE$(answer$) = "music response"
==========================================================
|
-for one thing, your long IF statement at the end, there is no END IF clause ender to tell the parser where the END IF is ending. I don't know about QBasic, but in regular VB, you can set a one-line if statement without setting an "end if" clause by typing "then:" rather than "then".
-this line :
PRINT "what are you doing today?"
you did not have a input() statement set to wait for user input.
you can replace the input with PRINT like this :
INPUT "what are you doing today", $answer
-close this IF STATMENT CLAUSE :
IF UCASE$(answer$) = "electronic" THEN
that way, you can exclude the other statements you want.
- you could be getting improper output that you did not want.
|