home .. forth .. colorforth mail list archive ..

Re: [colorforth] if then else - but why is there no ?else? in colorForth?


Hi John,

John R. Strohm said the following on 02/11/2008 14:05:
A simpler way would be to reprogram "then" to read "endif"
That had me for a while. The way ‘if’ and ‘then’ are used in Forth seems so wrong when you’re used to other languages. A newbie expects the condition between ‘if’ and ‘then’ and the conditional action after the ‘then’. The stack messes up this idea. The Forth ‘if’ is actually the ‘if’ and ‘then’ of other languages combined.

Another way could be using brackets: ‘if(’ and ‘)’. That might be easier to read.

OK. I’m sick of if now.

Jason



---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com