:noname ( -- cfa )
published: 1 February 2023 / updated 1 February 2023
vocabulary: forth
Define headerless forth code. cfa-addr is the code execution of a definition.
Example:
:noname s" Saterday" ; :noname s" Friday" ; :noname s" Thursday" ; :noname s" Wednesday" ; :noname s" Tuesday" ; :noname s" Monday" ; :noname s" Sunday" ; create (ENday) ( --- addr) , , , , , , , :noname s" Samedi" ; :noname s" Vendredi" ; :noname s" Jeudi" ; :noname s" Mercredi" ; :noname s" Mardi" ; :noname s" Lundi" ; :noname s" Dimanche" ; create (FRday) ( --- addr) , , , , , , , defer (day) : ENdays ['] (ENday) is (day) ; : FRdays ['] (FRday) is (day) ; 3 value dayLength : .day (day) swap cell * + @ execute dayLength ?dup if min then type ; ENdays 0 .day \ display Sun 1 .day \ display Mon 2 .day \ display Tue FRdays ok 0 .day \ display Dim 1 .day \ display Lun 2 .day \ display Mar