Files
linguist/samples/Forth/enum.frt
Arfon Smith 9e50e188a8 Merge branch 'master' into 1233-local
Conflicts:
	lib/linguist/language.rb
	lib/linguist/languages.yml
	lib/linguist/samples.json
2014-11-01 10:04:22 -05:00

8 lines
176 B
Forth

\ Implements ENUM.
\ Double DOES>!
: enum create 0 , does> create dup @ 1 rot +! , does> @ ;
\ But this is simpler.
: enum create 0 , does> dup @ constant 1 swap +! ;