Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure return value not logical
Message
From
26/03/2003 06:12:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Procedure return value not logical
Miscellaneous
Thread ID:
00770147
Message ID:
00770147
Views:
61
I generally don't use Return command in object method or procedures. I use if necessary Return .F. and then I checks return value come from object method.

While I debuging, if procedure don't back a Return command. Return value comes zero numeric value and following command error with 'Data Type Mismatch'. Because return value not logical.

IF NOT objXXXX.yyyyy()
....
ENDIF

I tested this situation many times.
This situation occurs When procedure not include return command and Debug Window is active.

But While Debug window not active above cammand working with no error.

In VFP8.0 help says "If you do not include a RETURN command, an implicit RETURN is automatically executed when the function quits. If the RETURN command does not include a return value (or if an implicit RETURN is executed), Visual FoxPro assigns .T. (True) as the return value."

But VFP not working expecting or I'm setting something in anywhere and program doesn't work right.


Where do I make mistake.

Thanks for any help or suggestions.
Next
Reply
Map
View

Click here to load this message in the networking platform