Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Undefine data type (u)
Message
From
02/12/2001 07:53:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/12/2001 23:05:45
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00588474
Message ID:
00588492
Views:
20
>how do i convert undefine (U) data type to character data type (C)

I will assume you want to assign a default value when the variable doesn't exist.

Let's say, also, that you want to be sure the expression is always of type "C" (not numeric, etc.).
MyVariable = iif(type("MyVariable" = "U"), "???", transform(MyVariable))
transform(), as used here, requires VFP 6 or later.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform