TranceAddict Forums

TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- Just Starting Programming


Posted by meneedit on Aug-18-2004 02:22:

Just Starting Programming

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"
==========================================================


Posted by Boomer187 on Aug-18-2004 02:39:

stop learning this and learn php...




then I can help you


Posted by TweeK on Aug-18-2004 02:44:

I was taking C++ classes in high school but i sucked and quit.


Posted by D-res on Aug-18-2004 02:46:

NERD!!!


im just joking. i am one myself. i dont know basic. i know calculator programming and im a flash master...sometimes


i suggest just buying a book.


Posted by meneedit on Aug-18-2004 02:50:

1. "doh!"
2. "doh!"
3. "doh!"

oh well it was worth a shot.

its too old isnt it


Posted by MOSCHINO on Aug-18-2004 03:01:

I pretty much make my living by looking at code (.NET mostly) I don't like it but it's good to know and if you really good you can pretty much write your own ticket. I work with people who take home over 120k and those guys not ever 30.


Posted by itsTrueSonic on Aug-18-2004 04:09:

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.


Posted by ShadoWolf on Aug-18-2004 04:11:

Turing ownz u all


Posted by Mike Vicious on Aug-18-2004 04:13:

Don't waste your time with QBasic, Learn C and C++ if anything..


Posted by itsTrueSonic on Aug-18-2004 04:15:

quote:
Originally posted by meneedit
1. "doh!"
2. "doh!"
3. "doh!"

oh well it was worth a shot.

its too old isnt it



yes this is old .. actually, c++ was invented before qbasic, if anyone wants to know that.. hahahhaha .. why doesn't anyone want to talk about that, huh???






even though qbasic is very primitive in a structural programmer's way, it is a very good language to start off with if one has no computer language skills. one can consider it the pebble to start on before getting on the big rock.

by the ways, the structure of qbasic is the same as php, even though php uses c++ language.


Posted by Matt Jay on Aug-18-2004 04:18:

I'm scared of programming ever since I did a course on Java, i'm gonna stick to networking & hardware


Posted by itsTrueSonic on Aug-18-2004 04:18:

quote:
Originally posted by Mike Vicious
Don't waste your time with QBasic, Learn C and C++ if anything..



i think java would suit better for the guy.

java is easier to understand, rather than c/c++, and the fundamentals of programming is easier to implement into java than c.c++. c is a great language to use, for his type, java is better.


Posted by Orbax on Aug-18-2004 05:43:

stop, stop right now and walk away. Forget all that you know and leave it.


Posted by Mike Vicious on Aug-18-2004 06:08:

Learn visual basic, You can create cool apps just like in windows!


Posted by A.J. on Aug-18-2004 08:02:

Sub OmgHi2U()

'Declarations

Dim TA, COR, InB4DaLock, PicsOrSTFU, Yes, ROFL, X

'Assignments

TA = "Title"

Yes = "Yes"

InB4DaLock = "Thread Closed..."

COR = Val(InputBox("How cool is the Chill Out Room? Answer in numbers", TA, "1000000", 5000, 0))

If COR > 0 Then
MsgBox "BRICKEDDDDDDDDDD!!!!! AAHAHAHA" & vbCr & "i am 1337"
Else: MsgBox "DJ Sammy is teh #1 techno DJ!"
End If

MsgBox "Tiesto", , InB4DaLock

MsgBox "Armin", , InB4DaLock

MsgBox "Do you think they are good?"

ROFL = InputBox("Do you like Armin or Tiesto? YES/NO", "WHO IS TEH #1?", "Yes", 5000, 0)

If ROFL = "Yes" Then
MsgBox "ROOM RAVE!!!!!!! DISCO BOOMER, Trancebrat and the" & Chr(13) _
& "rest of the Sensation grey crew!!!!!!!!!!!!!!!"
Else: MsgBox "You are lamer than torontotrance & Mr Mystery combined!"
End If

PicsOrSTFU = InputBox("Do you have nekkid pics?" & vbCr & "Yes/No", pwned, "Yes", 5000, 0)

If PicsOrSTFU = Yes Then
MsgBox "CAN I SEE THEM!!!!?!!!!!!!!!", , "OMGOMGOMGHI2UKTHXBIE"
Else: MsgBox "Damn!"
End If

X = InputBox("Ball in Parking Lot. Do you wish to play again? Yes/No" _
, "Lee Carvino's Putting Challenge", , 5000, 0)


MsgBox "You have selected NO"

' I am such a 1337 Ta. ph33r m4 VBA skillz!!!!!
'BRICKED!!!!!!!!!!!!!! HAHAHAHAHA
'PICS OR STFU N00B!!!!!1



End Sub

---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------



hehehehe i've just started learning VBA (Visual Basic for Applications) in Excel for one of my classes

If you are really bored and want to see this little macro run, open up Microsoft Excel, Go to Tools --> Macro --> Visual Basic Editor
Next, copy and past all the code i just posted above. Finally, to see it all in action and answer some lame (read:funny) questions, push the play button - it looks like the triange play sign off a walkman, it's up the top on the line of icons


Posted by A.J. on Aug-18-2004 10:56:

^ ^ ^ ^ ^ ^ ^

hahahaha check out the 1337 code that i just wrote!


follow the instructions to play it


Posted by noikeee on Aug-18-2004 13:23:

pascal is the best language to start. useless, but way more logical and simple than most languages

i'm now used to java and think c++ is a pain in the ass :\ the hell with pointers


Posted by itsTrueSonic on Aug-18-2004 14:25:

quote:
Originally posted by paranoik0
pascal is the best language to start. useless, but way more logical and simple than most languages

i'm now used to java and think c++ is a pain in the ass :\ the hell with pointers



what do you mean the HELL with pointers??

pointers are cool, and that's what makes c++ so cool..
the world of pointers!

hahahahaha


Posted by loconet on Aug-18-2004 14:31:

quote:
Originally posted by itsTrueSonic
what do you mean the HELL with pointers??

pointers are cool, and that's what makes c++ so cool..
the world of pointers!

hahahahaha


pointers are what makes C so cool. References for C++ people!


Posted by Thunder5 on Aug-18-2004 15:01:

quote:
Originally posted by Boomer187
stop learning this and learn php...



Agreed...


Posted by Laszlo on Aug-18-2004 16:15:

Like everybody said, PHP rocks!

Either way, programming is a lot of fun, but it also means a lot of frustration - but when you finally solve a huge problem you've been trying to figure out for the past 15-20 hours you'll feel like God..!


Posted by loconet on Aug-18-2004 16:20:

Blah.. I've done php for 5 years , do it everyday. It is NOT a programming language.. scripting yes, programming no., If it is a programming language, it SUCKS large! As a scripting language, it's good. it gets the job done.


Posted by Boomer187 on Aug-18-2004 16:23:

quote:
Originally posted by loconet
Blah.. I've done php for 5 years , do it everyday. It is NOT a programming language.. scripting yes, programming no., If it is a programming language, it SUCKS large! As a scripting language, it's good. it gets the job done.





gah I remember reading that it was scripting...but it seems sooo much like programming.




PHP 4 life./


Posted by SID133 on Aug-18-2004 16:44:

i learned visual basics but i want to learn php and c++ maybe even sql but thats all shit im learning on my own outside of school work

edit
i just read my post and realized how sad that sounded i am a nerd


Posted by Dr. Cfire on Aug-19-2004 00:30:

Re: Just Starting Programming

You didnt reinput the answer variable after some of the questions.

I also do not remeber if you can redefine strings like this in Qbasic so if this does not work you need to change each answer into a diffrent vairable.


==========================================================
CLS

PRINT "How are You?"
INPUT answer$

IF LCASE$(answer$) = "good" THEN
PRINT "thats good"
ELSE
IF LCASE$(answer$) = "bad" THEN
PRINT "why?"
ELSE
PRINT "what the hell?"
END IF
END IF

PRINT "what are you doing today?"
INPUT answer$
IF LCASE$(answer2$) = "listening to music" THEN
PRINT "cool, what type of music are you into"
END IF
INPUT answer$
IF LCASE$(answer2$) = "electronic" THEN
PRINT "no way!!!! me too!"
END IF
PRINT "hmmm, which artists do you like?"
INPUT answer$
IF LCASE$(answer$) = "sonic animation"
or "prodigy"
or "the prodigy"
or "hybrid"
or "moby"
or "crystal method"
or "chemical brothers" THEN
PRINT "yep! good stuff"
END IF
PRINT "so whats your favourite choon?"
INPUT answer$
IF LCASE$(answer$) = "music response"

==========================================================

also you want to change the UCASE$ to LCASE$ since you are using lower case strings to compair too.

example:
answer$ = "foo"

UCASE$(answer$) will return FOO

answer$ = "$BAR"

LCASE($answer$) will return bar

you also did not end most of your IF statments.



Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.