Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure return value not logical
Message
De
26/03/2003 06:12:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Procedure return value not logical
Divers
Thread ID:
00770147
Message ID:
00770147
Vues:
62
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform