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

"John R. Strohm" <[email protected]> Sun, 2 Nov 2008 08:05:01 -0600
Newsgroups gmane.comp.lang.forth.colorforth
Message-ID <9E2E677A082547D5BAE5C298759B36CB@HAL>
A simpler way would be to reprogram "then" to read "endif"

: testproc w1 if w2 endif w3 ;

: testproc2 w1 if w2 else w3 endif w4 ;

----- Original Message ----- 
From: "Albert van der Horst" <[email protected]>
To: <[email protected]>
Sent: Sunday, November 02, 2008 7:47 AM
Subject: Re: [colorforth] if then else - but why is there no ?else? in 
colorForth?


> On Tue, Oct 28, 2008 at 06:21:13PM +0000, Jason Kemp wrote:
> <SNIP>
>> >
>> >    But is this what is meant by "if-else-then" ?
>> Not quite what I mean.  This is so hard to explain and I have spent
>> literally hours over this.  I have never given ?if?s any thought in
>> other languages.  Who says colorForth is simple?
>>
>> in this example
>>   : w1 if w2 then w3 ;
>> the if the ZF is not set then w2 will execute and then w3 will too.  If
>> the ZF is set then only w3 goes.
>
> Chuck Moore wanted to have if a meaning by itself. The same for
> then.
> Read this if you will:
>   conditional: w2  then-goon-with w3 ready
>>
>> in this one:
>>   : w1 if w2 ; then w3 ;
>
> Now this makes sense too
>     conditional: w2 ready  maybe-goon-here: w3 ready
>
>>
>>
>> Still perplexed,
>> Jason
>>
>
> --
> Albert van der Horst, UTRECHT,THE NETHERLANDS
> Economic growth -- like all pyramid schemes -- ultimately falters.
> albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> Main web page - http://www.colorforth.com
>
>
>