1 \ examples from FORML conference paper Nov 98
5 .( loading FORML examples ) cr
6 object --> sub c-example
13 : init ( inst class -- )
15 s" aardvark" 2swap --> set-name
18 : get-name ( inst class -- c-addr u )
20 --> .name -rot ( c-addr inst class )
24 : set-name { c-addr u 2:this -- }
25 u this --> .length --> set
26 c-addr this --> .name u move
29 : ? ( inst class ) c-example => get-name type cr ;
33 : test ." this is a test" cr ;
35 c-word --> ref testref
37 \ add a method to c-word...
38 c-word --> get-wid ficl-set-current
39 \ list dictionary thread
42 2dup --> get-name type cr
52 : on { led# 2:this -- }
53 this --> .state --> get
54 1 led# lshift or dup !oreg
55 this --> .state --> set
58 : off { led# 2:this -- }
59 this --> .state --> get
60 1 led# lshift invert and dup !oreg
61 this --> .state --> set
67 object subclass c-switch
69 : ?on { bit# 2:this -- flag }