;;;; A dyn global, which is the case that needs the startup function. ;;;; ;;;; A dyn value is made by a call into the runtime, and a call is not a ;;;; constant, so the initialiser cannot be a constant image the way a typed ;;;; global's is. It runs in flan..init-globals, which main calls after ;;;; flan_gc_init and before anything the programmer wrote — the same machinery ;;;; the computed globals already use, which is the point: a dyn global is a ;;;; computed global and needed no new mechanism. (defvar counter dyn 0) (defvar label dyn "start") (defn bump [] () (set counter (+ counter 1))) (defn main [] () (print counter) (print " ") (print label) (print "\n") (bump) (bump) (set label "done") (print counter) (print " ") (print label) (print "\n"))