Qbasicnews.com
April 06, 2020, 11:41:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: if yes/no question  (Read 1735 times)
Placeborick
Member
*
Posts: 35



« on: March 03, 2003, 10:20:42 AM »

i want to be able to use the if and then commands to instanciate a list of events rather than just print something, eg:

if yes then ==> i wantb a certain list of events to happen rather than one thing

if no then ==> another list of events different to the above.

iv only managed to get it to print a line after this command...can u help me?
Logged

-p
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #1 on: March 03, 2003, 11:20:59 AM »

May you want to check QB help and some tutorials...

Code:
IF  <condition>   THEN
   <do things if YES>
ELSE
   <do things if NO>
ENDIF


Where <do things if YES> and <do things if NO> are commands...
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #2 on: March 07, 2003, 07:53:56 PM »

Na_th_an is correct  Shocked  (like always hehe  Cheesy )   At least you're getting help here, PlaceBorick or whatever yer name is I used to do stupid things like

if ans$ = "yes" then x = x + 1: do: loop until inkey$ <> "": print "Afterawhile": circle (320,240): end

lol in a big long chain but the good people from QUE (Qbasic By Example Book) taughted me how to not do that cuase it makes your program look all runny.  Hope you like QB-ing,
-Nova
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Placeborick
Member
*
Posts: 35



« Reply #3 on: March 09, 2003, 05:55:19 PM »

hehe stupid indeed, but thats how iv learned as to yet, until i find better ways.. i jus wana make somet work before i start to tidy it all up hehe....im really cruddy lol, il get it
....some day lol
Logged

-p
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!