Re: Feature Requests

Samuel Tardieu <[email protected]> 19 Nov 2004 22:36:24 +0100
Newsgroups gmane.comp.lang.forth.picforth
Organization Avian Carrier & Friends
Message-ID <[email protected]>
>>>>> "David" == David McNab <[email protected]> writes:

David> 1) case ... of .. endof .. endcase

David> As per standard Forth

David> Since PicForth already has begin/while/repeat/until/if/then,
David> the mechanisms for branch resolution are already in place.
David> While 'case' statements don't necessarily add more power to the
David> language, they certainly make for far more readable code, and
David> might even facilitate smaller code (eliminating dup/drop
David> statements) etc.

I've implemented it in my development version (you can get it using
darcs as explained on http://www.rfc1149.net/devel/picforth). However,
as with other "if" cases that cannot be cleverly optimized, the
generated code is ugly.

  Sam
-- 
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam