Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing form in INIT method
Message
From
08/02/2001 17:37:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
08/02/2001 15:24:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00473278
Message ID:
00474231
Views:
24
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform