Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to define data type for integer,binary & hexadecima
Message
 
À
24/01/1999 10:04:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00179567
Message ID:
00179645
Vues:
31
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform