BeginProgram: OutputFormatting1

BeginMain:
	ScalarDecl: const <int> a = 326
	ScalarDecl: const <int> b = -1
	ScalarDecl: const <int> c = 2015
	ScalarDecl: const <long> i1 = 65000
	ScalarDecl: const <long> i2 = -2
	ScalarDecl: const <long> i3 = 3261963
	ScalarDecl: const <double> f1 = 3.1415926
	ScalarDecl: const <double> f2 = 2.99792458e9
	ScalarDecl: const <double> f3 = 1.234e-4
	ScalarDecl: const <codepoint_t> c1 = ord('A')
	ScalarDecl: const <codepoint_t> c2 = ord('B')
	ScalarDecl: const <codepoint_t> c3 = ord('C')
	ScalarDecl: const <string> s1 = "Apples"
	ScalarDecl: const <string> s2 = "and"
	ScalarDecl: const <string> s3 = "Bananas"
	ScalarDecl: const <bool> b1 = true
	ScalarDecl: const <bool> b2 = false

	Statement: printf("Decimals: %d %d %d\N", a, b, c)
BeginEval: language =~ m/cpp|pl/
	Statement: printf("Unsigned Decimals: %u %u %u\N", a, b, c)
EndEval
BeginEval: language !~ m/js/
	Statement: printf("Hexadecimals: %#x %#x %#x\N", a, b, c)
EndEval
BeginEval: language =~ m/cpp/
	Statement: printf("Long Decimals: %ld %ld %ld\N", i1, i2, i3)
	Statement: printf("Long Hexadecimals: %016lx %016lx %016lx\N", i1, i2, i3)
ElseEval:
	Statement: printf("Long Decimals: %d %d %d\N", i1, i2, i3)
EndEval
BeginEval: language !~ m/cpp|js/
	Statement: printf("Long Hexadecimals: %016x %016x %016x\N", i1, i2, i3)
EndEval

	Statement: printf("Fixed FP: %f %f %f\N", f1, f2, f3)
BeginEval: language !~ m/js/
	Statement: printf("Exponential FP: %e %e %e\N", f1, f2, f3)
	Statement: printf("General FP: %g %g %g\N", f1, f2, f3)
	Statement: printf("General FP with precision: %.2g %.2g %.2g\N", f1, f2, f3)
EndEval

BeginEval: language =~ m/cpp|js/
	Statement: printf("Boolean: %d %d\N", b1, b2)
EndEval
BeginEval: language =~ m/java|pl/
	Statement: printf("Boolean: %b %b\N", b1, b2)
EndEval
BeginEval: language =~ m/js|py/
	Statement: printf("Boolean: %s %s\N", b1, b2)
EndEval
BeginEval: language =~ m/swift/
	Statement: printf("Boolean: %@ %@\N", String(b1), String(b2))
EndEval
BeginEval: language =~ m/cpp|java|pl|py/
	Statement: printf("Character: %c %c %c\N", c1, c2, c3)
ElseIfEval: language =~ m/js/
	Statement: printf("Character: %s %s %s\N", chr(c1), chr(c2), chr(c3))
ElseEval
	Statement: printf("Character: %@ %@ %@\N", chr(c1), chr(c2), chr(c3))
EndEval
BeginEval: language =~ m/cpp/
	Statement: printf("String: %s %s %s\N", @@@s1.c_str()@@@, @@@s2.c_str()@@@, @@@s3.c_str()@@@)
ElseEval:
BeginEval: language =~ m/swift/
	Statement: printf("String: %@ %@ %@\N", s1, s2, s3)
ElseEval:
	Statement: printf("String: %s %s %s\N", s1, s2, s3)
EndEval
EndEval
EndMain
EndProgram
