Re: [OT] ASCII support in C/C++ (was: doubt)

From: Clark Cox (clarkcox3@mac.com)
Date: Sat Jan 10 2004 - 17:28:40 EST

  • Next message: Clark Cox: "Re: [OT] ASCII support in C/C++ (was: doubt)"

    On Jan 10, 2004, at 16:59, Philippe Verdy wrote:

    > The standard C/C++ libraries would work in such environment, because
    > there's
    > no requirement for the required condition "sizeof(char)=1" meaning
    > that the
    > physical address is incremented by 1, just the requirement that the
    > "char"
    > datatype must be the minimum allocatable unit of memory when using
    > malloc()/free(), and that this datatype should be large enough to
    > store at
    > least ASCII uppercase letters, digits and a few symbols (this means
    > that a
    > "char" would need to be at least 6 bits).

            Actually, both the C and C++ standards require that the char type be
    at least 8-bits. that is, the signed char type must be able to
    represent the values in the range [-127, 127], and the unsigned char
    type must be able to represent the values in the range [0, 255]. Any C
    or C++ compiler that cannot meet those requirements is non-conformant.

    -- 
    Clark S. Cox III
    clarkcox3@mac.com
    http://homepage.mac.com/clarkcox3/
    http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
    
    




    This archive was generated by hypermail 2.1.5 : Sat Jan 10 2004 - 18:10:17 EST