Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check the type of a parameter
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to check the type of a parameter
Miscellaneous
Thread ID:
00508539
Message ID:
00508539
Views:
55
I need a procedure that will accept one parameter. This parameter may contain the value I want or it may contain the name of a variable that contains the value that I want. Here are some examples.

PROCEDURE cMyFunc( uMyVar )
... What code goes here?
RETURN cReturnValue
ENDPROC

x = "test"
cMyFunc( x ) should return 'C'

x = 5
cMyFunc( x ) should return 'N'

x = "5"
cMyFunc( x ) should return 'C'

x = .T.
y = "x"
cMyFunc( y ) should return 'L'

How do I figure out if a character parameter contains the name of another variable?

Any ideas?
Shane Murdoch
Next
Reply
Map
View

Click here to load this message in the networking platform