[M3devel] cm3 does not support Scan.LongInt

Elmar Stellnberger estellnb at elstel.org
Mon Dec 16 17:20:13 CET 2013

Am 16.12.13 16:00, schrieb Tony Hosking:
> Jumping in late to this whole conversation (please forgive any 
> confusion)...
> I hesitate to define ANY M3 builtin type in terms of C/C++ standards.
> Regarding WIDECHAR, realize that its definition, like CHAR, should be 
> in terms of an enumeration containing some (minimal) number of elements.
> The standard says that CHAR contains at least 256 elements.
> In M3 enumerations all have a direct mapping to INTEGER.
> So, I assume that WIDECHAR would be UTF-32, and TEXT could be encoded 
> as UTF-8.
> More radically, what current code will break if CHAR is expanded to 
> UTF-32?
> The language definition would allow that (there is nothing that says 
> BITSIZE(CHAR) == 8).
> On Dec 16, 2013, at 4:31 AM, Jay K <jay.krell at cornell.edu 
> <mailto:jay.krell at cornell.edu>> wrote:
Any code that was built to handle multiple character code sequences will 
i.e. any correctly implemented code that relies on UTF-16LE as currently 
expanding this range would be inherently non-portable.
(... and it could even cause additional problems for when it came to 
interface with Xorg and Qt.)
I'd believe that relying on a fixed range of values is going to be 
crucial for any kind of character type.
You did not expand the CHAR type to 16 or 32bit either though that could 
even have caused less problems.
Writing code that manipulates characters is simply very different from 
writing code that does some calculation
based on integer numbers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20131216/3a1b7a6c/attachment-0002.html>

More information about the M3devel mailing list