Page 1 of 1

Im A newb.

Posted: Thu Jan 17, 2008 3:20 pm
by Cman
I've programmed for about 7 months. Ive learned the basics up to MID$, LEFT$, RIGHT$. I can input data, and thats about it. Im having troubles learning these things like strin1$ + string2$ etc. not that they're very challenging, but that im not receiving proper instruction. Can anyone help?

Posted: Thu Jan 17, 2008 4:51 pm
by Patz QuickBASIC Creations
Well, first off, welcome to the QuickBASIC community! If you ever have anything to ask, we're usually pretty friendly here and get things sorted out.

As for your question, I don't understand exactly what you mean, but doing string1$ + string2$ makes the text of string2$ be appended to the end of string1$. For example:

Code: Select all

string1$ = "foo"
string2$ = "bar"
string3$ = string1$ + string2
Print string3
'Output: foobar

sweet...

Posted: Thu Jan 17, 2008 11:29 pm
by Cman
yea... umm that was fairly simple, now where do i go from there? I purchased a book from the internet... its the basics. That was the last thing in the book... i dont know where to go, or what to do from here. * You guys a friendly, thanks!

Posted: Fri Jan 18, 2008 4:42 am
by BadMrBox
That was the last thing in the book... i dont know where to go, or what to do from here.
Neither do I but if adding strings together is the last thing in the book -it should be a short book :wink:.

Have you checked out the tutorials on Petes?
http://www.petesqbsite.com/sections/tut ... ials.shtml

Download

Posted: Fri Jan 18, 2008 8:31 am
by burger2227
I have an instruction demo for Quickbasic at QbasicStation.com Member files that has many examples with code for qbasic.

http://www.qbasicstation.com/index.php? ... &filecat=3

Q-BASICS.ZIP covers everything from PRINT to graphics functions.

Uses QB4.5 available in Member File Utilities section.

Ted

Posted: Fri Jan 18, 2008 9:48 am
by BDZ
In my experience, the best way to learn programming is to start some sort of project. In the process of trying to make it, you'll probably come up with some specific questions you can ask. Until then, just check out those tutorials.

String Modifying

Posted: Mon Apr 07, 2008 12:54 am
by Kiyotewolf
When you make something longer, you repeat the statement of this style.

(nul means no character, no output and no nothing.. an empty string.)

?Wolf$ [output: nul]
^__ ? is short for PRINT in QBasic
^_____ the outcome of the operation
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - -- - -- - - -

code examples.:

Wolf$="cat"
Wolf$ = Wolf$ + "thingy"
?Wolf$ [output: catthingy]

Wolf$="dog"
Fox$="hog"
Wolf$=LEFT$(Fox$,1) + MID$(Wolf$,2,2)
?Wolf$ [output: hog]

Wolf$=""
Wolf$ = Wolf$ + Wolf$ + Wolf$ + Wolf$
?Wolf$ [ output: nul]

Wolf$="cow "
Wolf$=Wolf$ + Wolf$ + Wolf$ + Wolf$
?Wolf$ [ output: cow cow cow cow ]

Wolf$="134dog"
FoxCode=VAL(Wolf$)
?FoxCode [ output : 134]

Wolf$="dog143"
FoxCode=VAL(Wolf$)
?FoxCode [output : 0 ]
^____ zero


Any more questions?

Kiyote!

Posted: Wed Apr 09, 2008 12:23 am
by burger2227
Got scooby snax?

You are an apparrent asshole!

Wanna roll over and play dead? ARF

how sweet.. swear words..

Posted: Sat Apr 12, 2008 11:17 pm
by Kiyotewolf
I treat you nicely no matter what you do and you continue to be degrading..

Please don't bug me anymore.

I'll stay away from the forum unless I'm really tempted to post, but you have officially made yourself clear that you "own" the forum and are going to defend it from intruders,.. such as myself..

Go fly a kite man.. and take some pills or something..

Kiyote!