Hello,
If you create a sub that takes its input from a global variable then you
get into 2 problems:
1. You cannot use recursion in your program since all recursed subs will
work on the same data which will be a pain to debug or verify
correctness.
2. Higher error probability since you have t
TED]
<[EMAIL PROTECTED]>
Date: Sunday, July 29, 2001 11:24 AM
Subject: Re: Question about subs and functions
>> What should cause me to have to pass variables to a subroutine through
>> arguments?
>
>One of the answers could be reusability and modularity. If you use
>
> What should cause me to have to pass variables to a subroutine through
> arguments?
One of the answers could be reusability and modularity. If you use
arguments, you can call this subroutine whenever you like and from different
programs too and not be dependent on the main program to define gl