Posts: 3,368
Threads: 195
Joined: Jan 2003
I see. I tested it. Good work.
BTW,
The reason I came up with this challenge is because I was trying to split up 1300 megabytes or so to make them fit on two CDs.. took me a bit of time to come up with the right files for each CD..
PS:
"byval" in a QB sub prolly works in 7.1, but I'm not sure if it works in 4.5. I got rid of the BYVALs (because I couldn't start the program with 'em) and put in each sub call the Total variable in parentheses, which accomplishes the same thing.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 53
Threads: 13
Joined: Feb 2004
Quote:PS:
"byval" in a QB sub prolly works in 7.1, but I'm not sure if it works in 4.5. I got rid of the BYVALs (because I couldn't start the program with 'em) and put in each sub call the Total variable in parentheses, which accomplishes the same thing.
Just wondering, what does byval do anyways.
pen your other eyes.........
Posts: 6,419
Threads: 74
Joined: Mar 2002
Quote:Just wondering, what does byval do anyways.
Explained in QB help.
Code:
BYVAL Clause
Syntax
BYVAL variable [AS type]
The BYVAL attribute in the parameter list of a DECLARE statement causes
the value of the specified variable to be passed to the procedure, rather
than the variable's address. BYVAL can only be used in DECLARE statements
for non-BASIC procedures, and cannot be applied to string parameters.
Posts: 309
Threads: 15
Joined: Jul 2003
I realize that this is old, but I have been busy for a while.
In 7.1 BYVAL can be used by BASIC as well as non-BASIC procedures. It has two advantages:
1) Since it only passes the value, The variable in the calling procedure isn't changed.
2) Variables in the calling and called procedure don't have to be the same type. This saves having to rewrite procedures for different variable types.
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)
For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Posts: 3,368
Threads: 195
Joined: Jan 2003
Oh great...
Another reason to use qb7.1... :evil: [/i]
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.