Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optional parameters
Message
From
21/04/1997 13:43:33
 
 
To
21/04/1997 13:38:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00029127
Message ID:
00029130
Views:
28
>I have a form that I would like to open either with or without parameters. Some forms call this form with a specific record in mind, from other forms, the form should open and go to a default record. The problem is, if I have issued a lparameters statement, and there were no parameters passed the seek attempts to seek on an .F. and crashes. My question is, is there a way to set a default value for a variable? When I try "If myvar = .F. then myvar = 1 endif" it fails because myvar has already been assigned a boolean datatype by default. How can I work around this?

IF TYPE('myvar')='C'
we have a parameter
ENDIF
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform