ack/lang/cem/ctest/ctconv/conv.cem.g

35 lines
1.1 KiB
Plaintext

(int) '\377' = -1
(long) -1 = -1
(float) 12 = 12.000000
(int) 3.14 = 3
(int) 32767L = 32767
(int) -32768L = -32768
(char) 128L = -128
(char) 0377 = -1
(char) -1 = -1
(char) 10000 = 16
From character
char 127, int 127, unsigned 177, long 127
float 127.000000
char -1, int -1, unsigned 37777777777, long -1
float -1.000000
char -1, int -1, unsigned 37777777777, long -1
float -1.000000
From integer
char -64, int -64, unsigned 37777777700, long -64
float -64.000000
From long
char -3, int -3, unsigned 37777777775, long -3
float -3.000000
Casts from long
char -8, int 75000, unsigned short 22370, long 75000
From float
char 121, int 121, unsigned 171, long 121, float 121.500000
char 0, int 0, unsigned 0, long 0, float 0.000100
int 32766, unsigned 77776, long 32766, float 32766.000000
long 1223432064, float 1223432064.000000
a[l] (l==3) -17
a[3l] -17
(unsigned short) 0x1f010L = 0xf010
(short) 0x1f010L = 0xfffff010