Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing form in INIT method
Message
De
08/02/2001 17:37:02
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
08/02/2001 15:24:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00473278
Message ID:
00474231
Vues:
25
>You assigned the init to receive a parameter. When no parameters are passed the routine will assume the parameter value is .F., thereform pcount() = 1
>Test for a valid parameter instead. something like
>if VARTYPE("lcstkno") # "C"
> return .F.
>endif

Quote from "Hacker's Guide":

"Parameters(), PCount()
These functions tell you how many parameters were passed to a procedure or function", so pcount() will give 0 if none are passed.

With more parameters, it's easier and cleaner to do some checking for each one and provide defaults (just like you suggested).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform