Paste: Cannot compile call to case

Author: m4
Mode: factor
Date: Mon, 25 May 2009 13:15:47
Plain Text |
: retrieve-field ( char -- string )
   1string
   "#" [ "test1" ] 2array
   "?" [ "test2" ] 2array
   "." [ "test3" ] 2array
   "-" [ "test4" ] 2array
   "@" [ "test5" ] 2array
   "+" [ "test6" ] 2array
   "s" [ "test7" ] 2array
   7 narray case ;

Annotation: Real World Code

Author: m4
Mode: factor
Date: Mon, 25 May 2009 16:18:10
Plain Text |
: retrieve-field ( char -- field )
   1string
   <player> symbol>> [ <player> ] 2array
   <player-on-target> symbol>> [ <player-on-target> ] 2array
   <empty> symbol>> [ <empty> ] 2array
   <money> symbol>> [ <money> ] 2array
   <money-on-target> symbol>> [ <money-on-target> ] 2array
   <target> symbol>> [ <target> ] 2array
   <balk> symbol>> [ <balk> ] 2array
   7 narray case ;

Annotation: same thing?

Author: erg
Mode: factor
Date: Mon, 25 May 2009 16:22:03
Plain Text |
: retrieve-field ( char -- field )
    {
        { CHAR: @ [ <player> ] }
        { CHAR: $ [ <money> ] }
        ....
    } case ;

New Annotation

Summary:
Author:
Mode:
Body: