Der Martin: C - casten

Beitrag lesen

Hi,

Genau das ist anscheinend genau spezifiziert, schon im Kernighan Richie. Bei negativen Werten wird links mit 1en aufgefüllt, bei positiven mit 0en.

dann widerspricht genau da die Praxis der Theorie. Ich habe nämlich bei etlichen Compilern, vor allem im µC-Bereich, schon erlebt, dass ungeachtet des tatsächlichen Vorzeichens mit Nullen aufgefüllt wurde.

Ciao,
 Martin

--
Most experts agree: Any feature of a program that you can't turn off if you want to, is a bug.
Except with Microsoft, where it is just the other way round.