flan/web/examples/globals.flan
Joseph Ferano 86ef557433 Run the break loop rather than quote it, since the restart order is a claim
NEXT.md prints the banner with the restarts in source order; the walk is
innermost-first, so it is the other way round. A --dev build under timeout is
enough to settle that, and settles the two place and global snippets with it.
2026-09-12 03:43:24 +07:00

13 lines
464 B
Plaintext

(defconst cell-size 5) ; a compile-time constant
(defconst gravity f32 0.05) ; with its type named
(defvar current-color i32) ; zeroed storage
(defconst rows 3)
(defconst cols 4)
(defvar grid [rows [cols u32]]) ; BSS, rows*cols*4 bytes
(defn main []
(print-i64 (i64 cell-size)) (newline)
(print-f64 (f64 gravity)) (newline)
(print-i64 (i64 current-color)) (newline)
(print-i64 (i64 (at grid 2 3))) (newline))