\ ids 98.11.9 6:58 pm NAB
\ with suggestions from
\ Tony Sanders
\ Generates a 32-bit value
\ equiv. to 4-character text:
2variable idtemp
: (ID) ( <cccc> -- id. )
parse-word drop
idtemp 2 cells move
idtemp 2@ ;
\ Compilation version of (ID):
: [ID] (ID) postpone 2literal ; immediate
\ Creates a named constant that
\ returns a 32-bit ID:
: ID ( <cccc> -- )
>in @ (ID) rot >in ! 2constant ;