Initialize global/shared/protected variables on declaration
Posted: Fri May 30, 2003 10:16 pm
It would be nice to be able to do this:
All too often I find my procedures' upper portions getting cluttered up by lots of lines from having to declare variables, then initialize them on 2 separate lines each. It would be great to do it all on one line each and save space.
Code: Select all
Declare MyProc()
OpenConsole()
Global MyVar = 5
PrintN("MyVar="+ Str(MyVar))
MyProc()
CloseConsole()
End
Procedure MyProc()
Shared MyVar = 10
Protected ProcVar = 12
PrintN("MyVar="+ Str(MyVar))
PrintN("ProcVar="+ Str(ProcVar))
EndProcedure