Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVALUATE not support null parameter
Message
 
 
To
24/10/2003 04:34:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00841002
Message ID:
00842067
Views:
33
Fabio,

You can use #defines to create a language more to your liking:
#define Evaluate FabioEvaluate

? evaluate( null )

function FabioEvaluate( pcExp )
if ( isnull( pcExp ) )
   return .null.
else
   return evaluate( pcExp )
endif
Personally I'd prefer that every function NOT be rewritten to allow nulls to be passed, because it'll only serve to slowdown the language. Nulls are in general much less frequently occuring than real values so why should everyone be penalized on every function call? In the places where nulls can occur that you want to pass to a function that is not designed to support null parameters you can use an if test before calling the function, or as I've shown above wrap all the functions with your own code.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform