TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Pascal Schmidt
date: 2004-01-18 15:26:52
subject: [C] (Thanks)An interesting question

Hi Jasen! :-)

 JB> signed is the default for long int and short, why should char be the
 JB> exception?
Well, it's mostly used for storing ASCII characters, and having negative
characters is somewhat odd. ;)

Though even that would not be a real problem for pure ASCII (0-127), so
most of the time it doesn't even make a difference in practice whether char
is signed or unsigned.

Anyway, if your code depends on it being one way or the other, make it
explicit by using "signed char" or "unsigned char".

Ciao
Pascal

--- Msged/LNX 6.1.1
* Origin: Chop wood, carry water. (1:153/401.2)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.