Im A newb.
Im A newb.
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?
-
- Veteran
- Posts: 399
- Joined: Wed Mar 02, 2005 9:01 pm
- Location: Nashville, Tennessee
- Contact:
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:
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...
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!
Neither do I but if adding strings together is the last thing in the book -it should be a short book .That was the last thing in the book... i dont know where to go, or what to do from here.
Have you checked out the tutorials on Petes?
http://www.petesqbsite.com/sections/tut ... ials.shtml
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Download
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
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
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
String Modifying
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!
(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!
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Got scooby snax?
You are an apparrent asshole!
Wanna roll over and play dead? ARF
You are an apparrent asshole!
Wanna roll over and play dead? ARF
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
how sweet.. swear words..
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!
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!
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.