Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define data type for integer,binary & hexadecima
Message
 
To
24/01/1999 10:04:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179567
Message ID:
00179645
Views:
30
Hi Chang,

>How do i defining a variable as an integer ?

You can't. Variables are always numeric. Only a field in a table and the parameter to a FLL/DLL function can be an integer. You can use INT(), FLOOR() and CEILING() though to create some sort of integer values.

>I want to pass a parameters as binary and hexadecimal, how can i do it ?

VFP doesn't support binary values directly, but you can pass a hexadecimal just like a numeric:

MyFunc( 0x1FDE2aC4 )

0x makes it a hexadecimal.

>How can i change the data type from character to integer, binary and hexadecimal ?

integer: VAL("123456")
binary: not possible
hexadecimal string: TRANSFORM(VAL("123456"),"@0")

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform