Consider the following snippet:
Each time the program accesses this sub, "Wheel" gets reset to zero and would always have a value of one.
There are times when I don't want this to happen. The only way I know of to keep incrementing "Wheel" in this sub to declare it GLOBAL(ly) earlier in the program.
What I would like is to LOCAL(ly) declare a variable, as shown above but not reset it. It would apply exclusively to this procedure.
Maybe an example:
This would go a long way to cleaning up the start of code and after the procedure is set, I don't have to worry about it any more.
BTW: I really LOVE the "Preview Post" button. Nice!
Code:
Sub DoSomething ' Applies to Functions as well Local Wheel as Long Incr Wheel ....Process ....Process End Sub
There are times when I don't want this to happen. The only way I know of to keep incrementing "Wheel" in this sub to declare it GLOBAL(ly) earlier in the program.
What I would like is to LOCAL(ly) declare a variable, as shown above but not reset it. It would apply exclusively to this procedure.
Maybe an example:
Code:
Sub DoSomething Local (wheel) as long ' or tag something in the line to keep the current value. Incr Wheel ....Process ....Process End Sub
BTW: I really LOVE the "Preview Post" button. Nice!
Comment