]> gitweb.factorcode.org Git - factor.git/commitdiff
Documenting bitfields in structs
authorDaniel Ehrenberg <littledan@pool-224-36.res.carleton.edu>
Sun, 25 Apr 2010 23:09:58 +0000 (18:09 -0500)
committerDaniel Ehrenberg <littledan@pool-224-36.res.carleton.edu>
Sun, 25 Apr 2010 23:09:58 +0000 (18:09 -0500)
basis/classes/struct/struct-docs.factor

index 7dbfda1f4f878c28088d463eb327afac8d0c149d..68a4876f926cb9fd84449d15c8aef8595b966794 100644 (file)
@@ -35,7 +35,8 @@ HELP: STRUCT:
 { "Struct classes cannot have a superclass defined." }
 { "The slots of a struct must all have a type declared. The type must be a C type." } 
 { { $link read-only } " slots on structs are not enforced, though they may be declared." }
-} } ;
+}
+"Additionally, structs may use bit fields. A slot specifier may use the syntax " { $snippet "bits: n" } " to specify that the bit width of the slot is " { $snippet "n" } ". Bit width may be specified on signed or unsigned integer slots. The layout of bit fields is not guaranteed to match that of any particular C compiler." } ;
 
 HELP: S{
 { $syntax "S{ class slots... }" }