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