Next Atypical Types 19

Typing: Hard to Get Right

Pascal is pretty much dead, so let's have a...

C Example

        #include <stdio.h>
        
        int main(void) 
        {
          unsigned char *c;
          float f = 10;
          
          for (c = (char *)&f; 
               c < sizeof(float) + (char *)&f; 
               c++) {
            printf("%u ",  *c);
          }
          putchar('\n');
          
          return 0;
        }
     float.c: In function `main':
     float.c:9: warning: comparison of distinct pointer types lacks a cast


Next Copyright © 1999,2008 Mark Dominus