The following was posted by a user:

Hi, All

Look at this sample:

REQUEST HB_CODEPAGE_RU866

func main

hb_SetCodepage( "RU866" )
? hb_SetCodepage()
? Upper('abc_абвгд') // national characters

return nil

The compiler is translated this prg to pcode:

HB_FUNC( MAIN )
{
   static const BYTE pcode[] =
   {
        HB_P_PUSHSYMNEAR, 2,    /* HB_SETCODEPAGE */
        HB_P_PUSHNIL,
        HB_P_PUSHSTRSHORT, 6,   /* 6 */
        'R', 'U', '8', '6', '6', 0,
        HB_P_DOSHORT, 1,
        HB_P_PUSHSYMNEAR, 3,    /* QOUT */
        HB_P_PUSHNIL,
        HB_P_PUSHSYMNEAR, 2,    /* HB_SETCODEPAGE */
        HB_P_PUSHNIL,
        HB_P_FUNCTIONSHORT, 0,
        HB_P_DOSHORT, 1,
        HB_P_PUSHSYMNEAR, 3,    /* QOUT */
        HB_P_PUSHNIL,
        HB_P_PUSHSTRSHORT, 10,  /* 10 */
        'A', 'B', 'C', '_', 160, 161, 162, 163, 164, 0,
        HB_P_DOSHORT, 1,
        HB_P_PUSHNIL,
        HB_P_RETVALUE,
        HB_P_ENDPROC
/* 00043 */
   };

   hb_vmExecute( pcode, symbols );
}

Instead of HB_UPPER call, compiler translated string 'abc_абвгд' into
upper case (for optimization ?).

What is compiler flags to supress this optimization ?

Best regards, Pavel Tsarenko 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to