[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gforth] [bug #56406] Inconsistent Control structure mismatch report

From: Anton Ertl
Subject: [Bug-gforth] [bug #56406] Inconsistent Control structure mismatch reporting
Date: Wed, 29 May 2019 06:12:35 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0

Follow-up Comment #2, bug #56406 (project gforth):

Another way to express this:

: a if begin repeat ;

is a standard program, so Gforth as a standard system must accept it.

Why is it standard?  The standard says:

IF ( C: -- orig )
BEGIN ( C: -- dest )

So after BEGIN the control-flow stack contains ( orig dest ).  The standard
also says:

REPEAT ( C: orig dest -- )

So REPEAT just consumes these two control-flow stack items, and there is no
type mismatch or control-flow stack imbalance that would constitute an error.

What does A mean?  It means the same as:

: a if begin again then ;

This is not the most useful program, but it is also standard.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]