Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the secret meaning of this piece of code?
Message
From
04/08/1997 22:33:31
 
 
To
02/08/1997 12:47:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00042899
Message ID:
00043155
Views:
35
> parameter Cmd_Param > > if type("Cmd_Param") = "C" > TempVar = Cmd_Param > release Cmd_Param > private Cmd_Param > Cmd_Param = TempVar > endif I would check all other instances of this variable name in the application, or of the entire application calling itself recursively. Since there is no type defined with it, it could be something other than character. And since parameters that are passed through the .EXE command line are character, then one possibility is that this code is checking to see if it may be called from somewhere else. Another alternative is that entire application may be called, either from the Command Window during testing or from another application, and this variable may exist as some other type and with a scope of something other than the main application here (for example PUBLIC). This code ensures that that instance of the variable is released, and that only the current instance of it exists. However, since the check is for the TYPE of variable, and not for its existence in any other type, I would suggest that this was written by a novice. Hope the value of help derived from this is more than the confusion it introduces. /Paul
Paul Russell
EMail: prussell@fox.nstn.ca
Phone: (902) 499-5043
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform