1 \ examples from FORML conference paper Nov 98
6 .( loading FORML examples ) cr
7 object --> sub c-example
10 4 c-4byte array: .quad
14 : init ( inst class -- )
16 s" aardvark" 2swap --> set-name
19 : get-name ( inst class -- c-addr u )
21 --> .name -rot ( c-addr inst class )
25 : set-name { c-addr u 2:this -- }
26 u this --> .length --> set
27 c-addr this --> .name u move
30 : ? ( inst class ) c-example => get-name type cr ;
34 : test ." this is a test" cr ;
36 c-word --> ref testref
38 \ add a method to c-word...
39 c-word --> get-wid ficl-set-current
40 \ list dictionary thread
43 2dup --> get-name type cr
53 : on { led# 2:this -- }
54 this --> .state --> get
55 1 led# lshift or dup !oreg
56 this --> .state --> set
59 : off { led# 2:this -- }
60 this --> .state --> get
61 1 led# lshift invert and dup !oreg
62 this --> .state --> set
68 object subclass c-switch
70 : ?on { bit# 2:this -- flag }