Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HOW TO CONVERT A LOGICAL VARIABLE TO STRING
Message
De
04/11/1998 12:30:42
Bill Gravell
Indoor Purification System
Menifee, Californie, États-Unis
 
 
À
03/11/1998 17:33:52
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00154129
Message ID:
00154412
Vues:
15
>Hello everyone:
>I want to display the content of a logical variable(.T. .OR. .F.) AS FOLLOWS :
>
>WAIT WINDOW 'THIS IS THE VALUE'+lMyvariable
>
>but I get an error: operator/operand type mismatch.
>
>How can I convert this variable to character so I can display it with the WAIT WINDOW command.
>
>Thanks,
>Sergio

Sergio,

All the previous answers are great. But, remember, you're not limited to just a ".T." or ".F.". Using the IIF illustrated in the 1st response, you can use any string...i.e.

WAIT WINDOW 'THIS IS THE VALUE '+IIF(lMyvariable,"True","False") or

WAIT WINDOW 'The value, '+IIF(lMyvariable,"True","False")+' was entered')

Bill
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform