PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

strange effects

Hi,

i had some weird 'side effects' when trying to progam my first 'hello world application' with EasyCE 1.5 . Some variables got changed without me touching them ! I debugged a little bit and encountered the following problem:

The redir-table in the EasyCE-function initcharset() is a char-array. When your compiler uses char as signed char you will get negative indices when performing 'for ( i = 0; i < 57; i++ ) m_transl[c[i]] = i;' because of some characters that have a set d7-bit (for example 'ö') !

To solve the problem you should write 'byte c[]...' instead of 'char c[]...' in the same function.

Any comments or suggestions ?

BTW very easy tool, i like it :)

greetings
--Henrik
Hi Henrik,

I send a post two weeks ago about this problem. It seem that there is few people how have this bug with ö.

Do you have an english version of PocketPC ? (I have a French one, and perhaps with different languague, the ö isn't recognize... In french, there is an advance ASCII table, and the value of ö is probably more than 256, and so, it explains the byte instead of char !)


BartCB
Hi BartCB,

now i found your posting refering to the problem mentioned above ( i had tomatoes on my eyes (german proverb)).

I own a E-125G with WinCE in german language

and have the following codes:
'ä'=0xe4=byte(228)=signed char(-28)
'ü'=0xfc=byte(252)=signed char(-4)
'ö'=0xf6=byte(246)=signed char(-10)

Do english PocketPCs have different codes !?!

When you follow my suggestion above (byte c[]...) everything works fine in EasyCE-initialization. But you have to be careful when using EasyCE-functions that print texts (for example centre()), because negative indices may occur when printing 'ä','ö' or 'ü'.

Or set your compiler to interpret chars as unsigned chars !

greetings
--Henrik
Guys,

I'm aware of this problem, and it's fixed, but I'm not sure that it's fixed in EasyCE 1.6 (file http://www.pocketmatrix.com/phantom/easyce16.zip , as soon as PocketMatrix is online again), but in case it's not: The problem is that 'char' seems to be signed in EVC/VC6. So if you change that to 'unsigned char', the bug is gone.

EasyCE 1.7 won't have this problem.

- Jacco.
Jacco, the site is back up, but you will have to re-upload your site, because Verio hosting closed the original site prematurely before PocketMatrix could move things over. I had the same problems with the dex-plor.com site, and the dexplor components are still not up for download yet. :(

The email address I have for you no longer works. If you would, send your new address to dan@pocketmatrix.com. I think Chris (chris@pocketmatrix.com) needs it too. Thanks!

Dan East
I changed jobs. I can be reached at:
JaccoBikker@Hotmail.com (semi-permanently), or
Jacco@GreenDino.nl (for as long as I work there :) ).
The green dino address will get you a faster response, as I am monitoring that all day. ;).

- Jacco.