]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.syntax: improve C-ENUM: docs
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 15 Sep 2009 21:24:58 +0000 (16:24 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 15 Sep 2009 21:24:58 +0000 (16:24 -0500)
basis/alien/syntax/syntax-docs.factor

index c9190f68c0bc8db23b16117210b4658060abb932..e56c83a154508ac1e94ce77dbd42647f89d2b993 100644 (file)
@@ -73,10 +73,12 @@ HELP: C-ENUM:
 { $syntax "C-ENUM: words... ;" }
 { $values { "words" "a sequence of word names" } }
 { $description "Creates a sequence of word definitions in the current vocabulary. Each word pushes an integer according to its index in the enumeration definition. The first word pushes 0." }
-{ $notes "This word emulates a C-style " { $snippet "enum" } " in Factor. While this feature can be used for any purpose, using integer constants is discouraged unless it is for interfacing with C libraries. Factor code should use symbolic constants instead." }
+{ $notes "This word emulates a C-style " { $snippet "enum" } " in Factor. While this feature can be used for any purpose, using integer constants is discouraged unless it is for interfacing with C libraries. Factor code should use " { $link "words.symbol" } " or " { $link "singletons" } " instead." }
 { $examples
-    "The following two lines are equivalent:"
-    { $code "C-ENUM: red green blue ;" ": red 0 ;  : green 1 ;  : blue 2 ;" }
+    "Here is an example enumeration definition:"
+    { $code "C-ENUM: red green blue ;" }
+    "It is equivalent to the following series of definitions:"
+    { $code "CONSTANT: red 0" "CONSTANT: green 1" "CONSTANT: blue 2" }
 } ;
 
 HELP: &: