RosettaCodeData/Task/Enumerations/Forth/enumerations-5.fth

3 lines
108 B
Forth

: SIZED-ENUM ( n s -<name>- n+s ) OVER CONSTANT + ;
: CELL-ENUM ( n -<name>- n+cell ) CELL SIZED-ENUM ;