transfer var type Hexadecimal

transfer var type Hexadecimal

Postby goosfancito » Wed Mar 29, 2006 11:52 am

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  Expand view  RUN
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?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby Antonio Linares » Thu Mar 30, 2006 7:05 am

Comandocem( nHex( cHex ) )

and from Comandocem():

LONG lValue = hb_parnl( 1 );
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby goosfancito » Thu Mar 30, 2006 7:35 am

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?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby Antonio Linares » Thu Mar 30, 2006 9:43 am

Gustavo,

ComandoCEm( nhex( "101" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 34 guests