Task

Demonstrate how to specify the minimum size of a variable or a data type.




 
declare i fixed binary (7),      /* occupies  1 byte  */
        j fixed binary (15),     /* occupies  2 bytes */
        k fixed binary (31),     /* occupies  4 bytes */
        l fixed binary (63);     /* occupies  8 bytes */
 
declare d fixed decimal (1),     /* occupies  1 byte  */
        e fixed decimal (3),     /* occupies  2 bytes */
                                 /* an so on ...      */
        f fixed decimal (15);    /* occupies  8 bytes */
 
declare b(16) bit (1) unaligned; /* occupies  2 bytes */
declare c(16) bit (1) aligned;   /* occupies 16 bytes */
 
declare x float decimal (6),     /* occupies  4 bytes */
        y float decimal (16),    /* occupies  8 bytes */
        z float decimal (33);    /* occupies 16 bytes */
 