On functions:
The name of the function must be unique in each module.
On function arguments:
One thing is important: Arguments that are passed to a function can be modified inside the function, but they can't be output to the calling function. If for example there is a line of code like this:
MyNumber = 10 I = MyFunction ( MyNumber )
Where MyFunction is defined as follows:
Function MyFunction ( Arg1 As Numeric ) As Numeric
Dim N As Numeric Arg1 = 0 N = Arg1 * 10 Return N EndFunction
The value of MyNumber is modified on the line "Arg1 = 0". In fact the argument has now value zero, where before it was equal to 10. This modification will not influence the caller function. Once the control in not in MyFunction, it will have a value of 10, as before. This is because in fact Aft1 is not really MyNumber but only its copy.
|