diff --git a/nac3standalone/demo/src/globals.py b/nac3standalone/demo/src/globals.py new file mode 100644 index 000000000..d8b7822d5 --- /dev/null +++ b/nac3standalone/demo/src/globals.py @@ -0,0 +1,31 @@ +@extern +def output_int32(x: int32): + ... + +@extern +def output_int64(x: int64): + ... + +X: int32 = 0 +Y: int64 = int64(1) + +def f(): + global X, Y + X = 1 + Y = int64(2) + +def run() -> int32: + global X, Y + + output_int32(X) + output_int64(Y) + f() + output_int32(X) + output_int64(Y) + + X = 0 + Y = int64(0) + output_int32(X) + output_int64(Y) + + return 0 \ No newline at end of file