alien.syntax: Add ENUM: example with c basetype.

db4
Doug Coleman 2016-03-05 15:34:15 -08:00
parent c69c40b616
commit 0f994c9924
1 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,12 @@ HELP: ENUM:
{ $code "ENUM: color_t red { green 3 } blue ;" }
"The following expression returns true:"
{ $code "3 <color_t> [ green = ] [ enum>number 3 = ] bi and" }
"Here is a version where the C-type takes a single byte:"
{ $code "ENUM: tv_peripherals_1 < uchar\n{ appletv 1 } { chromecast 2 } { roku 4 } ;" }
"The same as above but four bytes instead of one:"
{ $code "ENUM: tv_peripherals_4 < uint\n{ appletv 1 } { chromecast 2 } { roku 4 } ;" }
} ;
HELP: C-TYPE: