Path: utzoo!attcan!utgpu!watmath!att!dptg!rutgers!usc!ucsd!ames!amdahl!pyramid!ncc!alberta!idacom!andrew From: andrew@idacom.UUCP (Andrew Scott) Newsgroups: comp.lang.forth Subject: Re: Incapsulation and visibility in Forth Message-ID: <713@idacom.UUCP> Date: 8 Aug 89 20:00:25 GMT References: <1@massormetrix.ida.liu.se> Organization: IDACOM Electronics Ltd., Edmonton, Alta. Lines: 21 In article <1@massormetrix.ida.liu.se>, mikpa@massormetrix.ida.liu.se (Mikael Patel) writes: > execution ( -- ) > Marks the most recently created dictionary entry as a word > which is only available in execution mode. > > compilation ( -- ) > Marks the most recently created dictionary entry as a word > which is only available in compilation mode. > > So compilation words like "if" become: > > : if ( flag -- ) .... ; compilation immediate I like these words a lot, not for their encapsulation properties, but for error handling. In FIG-Forth, the words ?EXEC and ?COMP are used for words that should only be executed in execution or compilation mode respectively. I find that these words are a bit awkward to use and add clutter to the body of the words. -- Andrew Scott andrew@idacom - or - {att, watmath, ubc-cs}!alberta!idacom!andrew