FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour transfer var type Hexadecimal
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
transfer var type Hexadecimal
Posted: 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:

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/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
transfer var type Hexadecimal
Posted: Thu Mar 30, 2006 07:05 AM

Comandocem( nHex( cHex ) )

and from Comandocem():

LONG lValue = hb_parnl( 1 );

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
transfer var type Hexadecimal
Posted: Thu Mar 30, 2006 07: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/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
transfer var type Hexadecimal
Posted: Thu Mar 30, 2006 09:43 AM

Gustavo,

ComandoCEm( nhex( "101" ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion