1*e221c09eSPhilippe Houdoin 2*e221c09eSPhilippe Houdoinresource(10000) 0x80 | 0x01; // 129 (0x00000081) 3*e221c09eSPhilippe Houdoinresource(10001) ~0x01; // -2 (0xFFFFFFFE) 4*e221c09eSPhilippe Houdoinresource(10002) 0x3F1 & ~0x01; // 1008 (0x000003F0) 5*e221c09eSPhilippe Houdoin 6*e221c09eSPhilippe Houdoinresource(10010) 100 + 10 + 1; // 111 7*e221c09eSPhilippe Houdoinresource(10011) 100 + 10 + -1; // 109 8*e221c09eSPhilippe Houdoinresource(10012) -15 + -15; // -30 9*e221c09eSPhilippe Houdoinresource(10013) -15 - -15; // 0 10*e221c09eSPhilippe Houdoin//resource(10014) -15 - +15; // syntax error 11*e221c09eSPhilippe Houdoinresource(10015) 2 * (4 + 3); // 14 12*e221c09eSPhilippe Houdoin 13*e221c09eSPhilippe Houdoinresource(10020) 10 + 5 * 3; // 25 14*e221c09eSPhilippe Houdoinresource(10021) (10 + 5) * 3; // 45 15*e221c09eSPhilippe Houdoinresource(10022) 10 / 1 * 0; // 0 16*e221c09eSPhilippe Houdoin 17*e221c09eSPhilippe Houdoin//resource(10030) 10 / 0; // div by 0 error 18*e221c09eSPhilippe Houdoin//resource(10031) 10 % 0; // div by 0 error 19*e221c09eSPhilippe Houdoin//resource(10032) 10 / (1 - 1); // div by 0 error 20*e221c09eSPhilippe Houdoin 21*e221c09eSPhilippe Houdoin//resource(10040) 10.1 + 3.14; // cannot cast 22*e221c09eSPhilippe Houdoin 23*e221c09eSPhilippe Houdoinresource(10041) (int8) 100 + (int8) 257; // 101 (32-bit) 24*e221c09eSPhilippe Houdoinresource(10042) ((int8) 100) + ((int8) 257); // 101 (32-bit) 25*e221c09eSPhilippe Houdoinresource(10043) (int8) ((int8) 100 + (int8) 257); // 101 (8-bit) 26*e221c09eSPhilippe Houdoin 27*e221c09eSPhilippe Houdoin/* don't try this at home kids */ 28*e221c09eSPhilippe Houdointype #'LONG' my_int32 { int32 x = 10 }; 29*e221c09eSPhilippe Houdoinresource(10050) my_int32; // 10 30*e221c09eSPhilippe Houdoinresource(10051) my_int32 6; // 6 31*e221c09eSPhilippe Houdoinresource(10052) my_int32 + 10; // 20 32*e221c09eSPhilippe Houdoinresource(10053) my_int32 6 + 10; // 16 33*e221c09eSPhilippe Houdoinresource(10054) my_int32 { 6 } + 10; // 16 34*e221c09eSPhilippe Houdoinresource(10056) my_int32 (int8) 257; // 1 35*e221c09eSPhilippe Houdoinresource(10057) my_int32 (6 + 10); // 16 36*e221c09eSPhilippe Houdoin 37*e221c09eSPhilippe Houdointype sumtin { int32 x = 10 + 5 }; 38*e221c09eSPhilippe Houdoinresource(10060) sumtin; // 15 39*e221c09eSPhilippe Houdoin 40*e221c09eSPhilippe Houdoinresource(10061) #'LONG' array { 10 + 5, 0xFF & 0x88 }; // 0x0F00...0088 41*e221c09eSPhilippe Houdoin 42*e221c09eSPhilippe Houdoinresource(10062) #'LONG' array 43*e221c09eSPhilippe Houdoin{ 44*e221c09eSPhilippe Houdoin (int8) (10 + 5), (int8) (0xFF & 0x88) // 0x0F88 45*e221c09eSPhilippe Houdoin}; 46*e221c09eSPhilippe Houdoin 47*e221c09eSPhilippe Houdoinresource(10063) message { "field" = (10 + 5)*3 }; // 45 48*e221c09eSPhilippe Houdoin 49*e221c09eSPhilippe Houdoin//resource(10070) (array); // parse error 50*e221c09eSPhilippe Houdoin//resource(10071) my_int32 (my_int32); // parse error 51*e221c09eSPhilippe Houdoin//resource(10072) my_int32(my_int32(my_int32)); // parse error 52*e221c09eSPhilippe Houdoin//resource(10073) array array; // parse error 53*e221c09eSPhilippe Houdoin//resource(10074) array (array); // parse error 54*e221c09eSPhilippe Houdoin 55*e221c09eSPhilippe Houdoinresource(10080) my_int32 my_int32; // 10 56*e221c09eSPhilippe Houdoinresource(10081) my_int32 my_int32 my_int32; // and so on 57*e221c09eSPhilippe Houdoin 58*e221c09eSPhilippe Houdoin//------------------------------------------------------------------------------ 59*e221c09eSPhilippe Houdoin 60*e221c09eSPhilippe Houdoinresource(10100) B_SINGLE_LAUNCH; 61*e221c09eSPhilippe Houdoinresource(10101) (int8) B_EXCLUSIVE_LAUNCH; 62*e221c09eSPhilippe Houdoinresource(10102) B_MULTIPLE_LAUNCH | B_BACKGROUND_APP | B_ARGV_ONLY; 63*e221c09eSPhilippe Houdoin 64*e221c09eSPhilippe Houdoin//resource app_flags B_MULTIPLE_LAUNCH | B_BACKGROUND_APP; 65