Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who Called Me?
Message
From
02/11/2000 17:49:34
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436100
Message ID:
00437443
Views:
23
Michael:

>
Without knowing the details of what the code is doing, I'm not sure that you can categorically make these statements. They seem to say that parameter passing should not be considered, as the parameters will affect what the function does. It may simply be that the requirement for knowing the calling program is just to put a message on the screen stating the calling program. The function is still doing just one thing, depending on the situation it may be more reliable for the function to determine for itself the calling program, rather than trust the programmer to correctly pass the information as a parameter. One situation that comes to mind is for error reporting, is it bad practice for an error reporting routine to determine as much information for itself, including the calling program, rather than rely on information passed by parameters, which could be passed wrongly (deliberately or by mistake).

It may be that what is being done is bad programming practice, but without details of what the code is doing, I really don't think someone should be told that he is using bad programming practices.
>

True, especially when you consider that VFP does not have the Friend keyword. Checking the calling object type may be used to restrict methods to some specified classes.

I will use this to make my critical public methods more secure.

Thanks for reminding me to think outside the box!

Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform