[Oberon] CHAR to/from BYTE conversion
Jörg Straube
joerg.straube at iaeth.ch
Fri Jul 8 21:36:19 CEST 2016
Don't open that can of worms :-)
- Should LEN(s) return the number of characters in s (logical length) or the number of bytes of s (physical length)?
- shoudn't the type CHAR better be called "ASCII"?
- As Unicode characters need up to 32 bit, should CHAR be 32 bit?
Strings are quite tricky, especially a compact internal representation of them.
Jörg
> Am 08.07.2016 um 20:50 schrieb Skulski, Wojciech <skulski at pas.rochester.edu>:
>
>
>> That means both CHAR and BYTE holds values 0 to 255.
>
>> No, CHAR holds characters, 0X to 0FFX, including "A", "B" etc.; and BYTE
>> holds 0 to 255, a sub-range of the INTEGER range.
>
>> Your statement is indicative of how much damage C has done to the world :)
>
> Characters should not be just English characters.
>
> Your statement is indicative of how much damage ASCII has done to the world :)
>
> W.
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list