// Test numeric representations print "Test print statement and integer conversions\n"; print "Hex: 0x173 = ", 0x173, "\n"; print "Octal: 0563 = ", 0563, "\n"; print "Decimal: 371 = ", 371, "\n"; print "\nTest real conversions\n"; print "173.563 = ", 173.563, "\n"; print "173.563e01 = ", 173.563e+01, "\n"; print "173.563e-01 = ", 173.563e-01, "\n"; // Test access to variables print "\nTesting access to variable values\n"; x := 173; dump x; print "\nTesting integer arithmetic\n"; x := 173; y := 24; dump x,y; print "x*y = ", x*y, "\n"; print "x/y = ", x/y, "\n"; print "x+y = ", x+y, "\n"; print "x-y = ", x-y, "\n"; print "-x-y = ", -x-y, "\n"; print "-x+y = ", -x+y, "\n"; dump x,y; print("\nTesting floating point arithmetic\n"); x := 173.4; y := 23.9; dump x,y; print "x*y = ", x*y, "\n"; print "x/y = ", x/y, "\n"; print "x+y = ", x+y, "\n"; print "x-y = ", x-y, "\n"; print "-x-y = ", -x-y, "\n"; print "-x+y = ", -x+y, "\n"; dump x,y; print "\nTesting exponentiation\n"; x := 2; y := 7; dump x, y; print "x**y = ", x**y, "\n"; print "-x**y = ", -x**y, "\n"; print "x**-y = ", x**-y, "\n"; x := 2.1; y := 6.8; dump x, y; print "x**y = ", x**y, "\n"; print "-x**y = ", -x**y, "\n"; print "x**-y = ", x**-y, "\n"; print "\nTesting shift operators\n"; x := 0x4562; dump x; print "x shl 3 = ", x shl 3, "\n"; print "x * 8 = ", x * 8, "\n"; print "x shr 3 = ", x shr 3, "\n"; print "x / 8 = ", x / 8, "\n"; dump x; print"\nTesting bitwise logical operators\n"; x := 0x4401; y := 0x2605; dump x, y; print "x or y = ", x or y, "\n"; print "(x or y) xor 26117 = ", (x or y) xor 26117, "\n"; print "x and y = ", x and y, "\n"; print "x and y xor 0x401 = ", x and y xor 0x401, "\n"; print "(x and y) xor 0x401 = ", (x and y) xor 0x401, "\n"; dump x, y; x := 0x4401; y := 0x2605;