DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Complying with standard C

Second example: result is the same

In the following code, assume that both unsigned short and unsigned char are narrower than int.

   int f(void)
   {
       unsigned short us;
       unsigned char uc;

return uc < us; }

In this example, both automatics are either promoted to int or to unsigned int, so the comparison is sometimes unsigned and sometimes signed. However, the result is the same for the two choices.


Next topic: Integral constants
Previous topic: Bit-fields

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004