'1' + 1 ==> True ???
Peter Maas
fpetermaas at netscape.net
Fri Mar 19 03:55:24 EST 2004
Jeff Epler schrieb:
> On Thu, Mar 18, 2004 at 08:46:04PM +0100, Peter Maas wrote:
>>The mapping of '1' to 0x31 is defined by ASCII which is used by C. If a C
>>instruction retrieves a char it reads data from an adress and if there is
>>a 0x31 stored at the adress C treats it as '1'. My short form of this is
>>"'1' is 0x31 in memory".
>
>
> Wrong. (surely C99 didn't change this)
>
> C doesn't require ASCII as a source-encoding nor as the character
> encoding on the target machine.
ASCII is a recipe to map characters to integers in the range [0,127].
Does C assign the same integer value as ASCII to a character literal
(single printable character or \xhh enclosed in simple quotes)?
If the answer is yes then convert the question to a statement and
you get what I meant. :)
Mit freundlichen Gruessen,
Peter Maas
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------
More information about the Python-list
mailing list