[PicForth] Re: Feature Requests

Samuel Tardieu sam at rfc1149.net
Fri Nov 19 22:36:24 CET 2004


>>>>> "David" == David McNab <david at rebirthing.co.nz> 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 -- sam at rfc1149.net -- http://www.rfc1149.net/sam



More information about the PicForth mailing list