Page 1 of 1

transfer var type Hexadecimal

Posted: Wed Mar 29, 2006 11:52 am
by goosfancito
Hello all,

I need make one function in FWH that transfer one data of type Hexadecimal to one function in xHarbour,

I traid it:

Code: Select all

HB_FUNC ( COMANDOCEM ){
   char *mensaje = hb_parcx( 01 ); 
then... COMANDOCEM("65")

My question is: "65" when i send to function COMANDOCEM is type string?
what i do to send "65" like Hexadecimal?

Posted: Thu Mar 30, 2006 7:05 am
by Antonio Linares
Comandocem( nHex( cHex ) )

and from Comandocem():

LONG lValue = hb_parnl( 1 );

Posted: Thu Mar 30, 2006 7:35 am
by goosfancito
Antonio,

Entonces: hb_parnl( 1 ) devuelve un valor de tipo LONG?

Seria entonces que un Hexadecimal se lo puede almacenar en un dato de tipo LONG?


Como ser:

ComandoCEm(nhex( 101 ) )

...
Al hacer esto:
LONG lValue = hb_parnl( 1 );

lValue guardaria el 65 ( que es el valor hexadecimal del decimal 101 )

Es asi?

Posted: Thu Mar 30, 2006 9:43 am
by Antonio Linares
Gustavo,

ComandoCEm( nhex( "101" ) )