Re: Deck of Cards Question...
- Posted by Al Getz <xaxo at AOL.COM> Nov 19, 2000
- 405 views
Hello Ck, One way to handle these kinds of problems is to use the 'pass the buck' method: pass the variables to the function, return the same variables, altered by the function's routines. This achieves encapsulation at the cost of an added global function name to the program (usually very tolerable). global function shuffle(sequence deck) --pass deck to be shuffled --place shuffle routine here: -- return deck --returns shuffled deck end function Good luck with it. --Al