1 \ examples from FORML conference paper Nov 98
3 .( loading FORML examples ) cr
4 object --> sub c-example
11 : init ( inst class -- )
13 s" aardvark" 2swap --> set-name
16 : get-name ( inst class -- c-addr u )
18 --> .name -rot ( c-addr inst class )
22 : set-name { c-addr u 2:this -- }
23 u this --> .length --> set
24 c-addr this --> .name u move
27 : ? ( inst class ) c-example => get-name type cr ;
31 : test ." this is a test" cr ;
33 c-word --> ref testref
35 \ add a method to c-word...
36 c-word --> get-wid ficl-set-current
37 \ list dictionary thread
40 2dup --> get-name type cr
50 : on { led# 2:this -- }
51 this --> .state --> get
52 1 led# lshift or dup !oreg
53 this --> .state --> set
56 : off { led# 2:this -- }
57 this --> .state --> get
58 1 led# lshift invert and dup !oreg
59 this --> .state --> set
65 object subclass c-switch
67 : ?on { bit# 2:this -- flag }