Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combinatorics Algorithm
#11
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.
Reply
#12
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.........
Reply
#13
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.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#14
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)
Reply
#15
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)