Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EVALUATE not support null parameter
Message
 
 
À
24/10/2003 04:34:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00841002
Message ID:
00842067
Vues:
34
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform