~Shared Sources~ We are only human =^.^=

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
QT-Pi
Coder
Posts: 15
Joined: Sun Apr 10, 2005 4:36 pm
Location: We are from Venus!

~Shared Sources~ We are only human =^.^=

Post by QT-Pi » Sun Apr 17, 2005 12:59 pm

How is the SHARED statement used to pass values between a main program and a subprogram? What I mean is .... do I place the statement in the main program or the subprogram?
Mercy! This can be confusing.
Life is Sweet!
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always

User avatar
mundofr
Coder
Posts: 34
Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:

Post by mundofr » Sun Apr 17, 2005 1:04 pm

yeah u put the statement:

Code: Select all

 COMMON SHARED variable, variable2, variable3 
before anythin else in your program, u delcare your sub and then right after that u put the common shared statement, of course u put it in the main program.
hope this helps... :D
<b><i> "Rock is the first thing in life, after rock comes the comp...." Rock on Big M</i></b>
<img src="http://www.freewebs.com/mundofr/bigm2.bmp">

User avatar
lurah-
Veteran
Posts: 206
Joined: Mon Nov 01, 2004 10:47 am
Location: Finland
Contact:

Post by lurah- » Sun Apr 17, 2005 1:56 pm

yah, mundofr is right.

Code: Select all

DECLARE MySub ()
DIM SHARED variable AS INTEGER
and so on

User avatar
QT-Pi
Coder
Posts: 15
Joined: Sun Apr 10, 2005 4:36 pm
Location: We are from Venus!

Post by QT-Pi » Mon Apr 18, 2005 10:46 am

LoL.... We knew that :wink: Hehe, just kidding, thanks for the help!
Life is Sweet!
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows » Mon Apr 18, 2005 11:08 am

Hmmm "we knew that"? Are you speaking like a queen, or is there more than one of you? lol
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Mon Apr 18, 2005 11:34 am

ya I noticed that too.....look at her location <--
"But...It was so beutifully done"

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows » Mon Apr 18, 2005 12:13 pm

LOL well if there's more than one, or three very different looking of the same I want pics for PROOF !!!! roflmao my friends ain't ever gonna believe this LOLOL
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Mon Apr 18, 2005 1:17 pm

QT-Pi is using this site to pass school assignments, with its friends.

I thought that was fairly obvious.


Let me guess, VB course next semester?
I have left this dump.

User avatar
QT-Pi
Coder
Posts: 15
Joined: Sun Apr 10, 2005 4:36 pm
Location: We are from Venus!

Post by QT-Pi » Tue Apr 19, 2005 11:56 am

We = 3, and no we come here for the hell of it and yeah, some help too. LoL o Z!re.. too much coffee today? We still like you anyway :D We have had some positive output, well for the most part. And us 3 , We Thank-You!
Life is Sweet!
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Tue Apr 19, 2005 1:37 pm

I dont drink coffe.


EDIT: Keep your replies to the topic where the post was made.
Stop spamming the boards.
I have left this dump.

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Tue Apr 19, 2005 3:03 pm

Z!re wrote:QT-Pi is using this site to pass school assignments, with its friends.

I thought that was fairly obvious.


Let me guess, VB course next semester?
Ya, I noticed that too....you know Z!re I'm not totally clueless :wink:

Ya I generally believe that off-topic posting is ok, but really QT-Pi, you guys are just posting shit.
"But...It was so beutifully done"

Post Reply