]> gitweb.factorcode.org Git - factor.git/commitdiff
add disclaimer in ENUM:
authorrazetime <rraghu.11502@gmail.com>
Fri, 6 Oct 2023 12:21:06 +0000 (20:21 +0800)
committerrazetime <rraghu.11502@gmail.com>
Fri, 6 Oct 2023 12:21:06 +0000 (20:21 +0800)
basis/alien/syntax/syntax-docs.factor

index 8a72fe2bd69333e4d16e525fc5a801b08da8c87a..db874010f54fb68592ad15f037bd848e50009f39 100644 (file)
@@ -1,5 +1,5 @@
 IN: alien.syntax
-USING: alien alien.c-types alien.enums alien.libraries classes.struct
+USING: alien alien.c-types alien.enums alien.libraries classes.struct assocs
 help.markup help.syntax see ;
 
 HELP: DLL"
@@ -67,7 +67,7 @@ HELP: TYPEDEF:
 HELP: ENUM:
 { $syntax "ENUM: type words... ;" "ENUM: type < base-type words..." }
 { $values { "type" { $maybe "a name to typedef to int" } } { "words" "a sequence of word names" } }
-{ $description "Creates a c-type that boxes and unboxes integer values to symbols. A singleton is defined for each member word which allows generic dispatch on the enum's members. The base c-type can optionally be specified and defaults to " { $link int } ". A constructor word " { $snippet "<type>" } " is defined for converting from integers to singletons. The generic word " { $link enum>number } " converts from singletons to integers. Enum-typed values are automatically prettyprinted as their singleton words. Unrecognizing enum numbers are kept as numbers." }
+{ $description { $warning "This word is part of Factor's C library interface, and not intended for use with Factor data. Factor has its own native " { $link "enums" } " which can be created with " { $link <enumerated> } "." } "Creates a c-type that boxes and unboxes integer values to symbols. A singleton is defined for each member word which allows generic dispatch on the enum's members. The base c-type can optionally be specified and defaults to " { $link int } ". A constructor word " { $snippet "<type>" } " is defined for converting from integers to singletons. The generic word " { $link enum>number } " converts from singletons to integers. Enum-typed values are automatically prettyprinted as their singleton words. Unrecognizing enum numbers are kept as numbers." }
 { $examples
     "Here is an example enumeration definition:"
     { $code "ENUM: color_t red { green 3 } blue ;" }