01-26-2024, 04:17 PM
Before creating a function I normally would Dimension x as Double BEFORE I actually call the function. For example
Dim x as Double
...code..
...code..
x = Event
...
Function Event(x)
...code...
End Function
But, dimensioning on an "as needed basis" or "on the run" what is the correct syntax
Function Event (x as Double) as Double or Function Event(x) as Double or Function Event (x as Double)??
It's hard to give up on the old ways, if they worked, to learn a new more efficient way. (by efficient I mean to reduce all those Dim Shared variables I have at the beginning of my code to only creating them when they are actually called for service.
Dim x as Double
...code..
...code..
x = Event
...
Function Event(x)
...code...
End Function
But, dimensioning on an "as needed basis" or "on the run" what is the correct syntax
Function Event (x as Double) as Double or Function Event(x) as Double or Function Event (x as Double)??
It's hard to give up on the old ways, if they worked, to learn a new more efficient way. (by efficient I mean to reduce all those Dim Shared variables I have at the beginning of my code to only creating them when they are actually called for service.