Ayuda con función I2HEX

Post Reply
ricardog
Posts: 158
Joined: Tue Oct 11, 2005 3:10 pm

Ayuda con función I2HEX

Post by ricardog »

Buenas noches, tengo un modulo para que utiliza la función I2HEX, pero me manda el siguiente error de ejecución.
[img][IMG]http://img220.imagevenue.com/loc617/th_558997966_ErrorI2HEX_122_617lo.jpg[/img][/img]

Y mi proyecto contiene la FIVEHC.LIB

[img][img=http://img237.imagevenue.com/loc471/th_559347689_errormaindllp.c_122_471lo.jpg][/img]

Gracias por su ayuda. :) :) :)
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Ayuda con función I2HEX

Post by Antonio Linares »

I2Hex() es una función de FWH

Que versión de FWH estás usando ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
ricardog
Posts: 158
Joined: Tue Oct 11, 2005 3:10 pm

Re: Ayuda con función I2HEX

Post by ricardog »

Buenas tardes Antonio, FWHX 9.11
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Ayuda con función I2HEX

Post by Antonio Linares »

Necesitas actualizarte a una versión más reciente

Mientras tanto aqui tienes el código:

Code: Select all | Expand

static char * u2Hex( WORD wWord )
{
    static far char szHex[ 5 ];

    WORD i= 3;

    do
    {
        szHex[ i ] = 48 + ( wWord & 0x000F );

        if( szHex[ i ] > 57 )
            szHex[ i ] += 7;

        wWord >>= 4;

    } while( i-- > 0 );

    szHex[ 4 ] = 0;

    return szHex;
}

//----------------------------------------------------------------------------//

HB_FUNC( I2HEX ) // nValue --> cHexValue
{
  hb_retc( u2Hex( hb_parni( 1 ) ) );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply