Files
sx/examples/05-run.sx
2026-02-09 18:07:41 +02:00

21 lines
330 B
Plaintext

#import "modules/std.sx";
// this will bake x to be 7 as a global constant
x :: #run compute(5);
compute :: (v: s32) -> s32 => v + 2;
main :: () {
//test
y :: #run compute(7);
c :: 2;
print("hello {}\n", x + y * c);
}
#run main();
// ** stdout after build **
// hello 25
// ** stdout after run **
// hello 25