K:\bf\prj\my\prg\tst>..\bin\my mylang.my my test script - 9 July 2001 Test number suffixes: 1f: 1e-15 1p: 1e-12 1n: 1e-09 1u: 1e-06 1m: 0.001 1 : 1 1k: 1000 1M: 1000000 1G: 1e+09 1T: 1e+12 Test arithmetic: a: 2 b: 5 c: 7 a + b: 7 a - b: -3 a * b: 10 a / b: 0.4 a % b: 2 a += b: 7 a -= b: 2 a *= b: 10 a /= b: 2 a %= b: 2 a < b: 1 a <= b: 1 a > b: 0 a >= b: 0 a == b: 0 a != b: 1 -a: -2 !a: 0 a++: 2 ++a: 4 Test escape characters: [\a][\b][\f ][\n ][\r ][\t ][\v ][\??][\""][\''] Test && and || short-circuit code. a:0 b:0 a && b: 0 a || b: 0 a:1 b:0 a && b: 0 a || b: 1 a:0 b:7 a && b: 0 a || b: 1 b: 7 a: 0 a && b++: 0 b: 7 a: 1 a && b++: 1 b: 8 a: 0 a || b++: 1 b: 9 a: 1 a || b++: 1 b: 9 Test if(): a < b Test while(): 1 2 3 4 5 6 7 8 9 10 Test for(): -5 -4 -3 -2 -1 0 1 2 3 4 Test function definition: Test function call: fabs(-3): 0 Test array subscription: array[2]: 0