Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Another bug: ABSTAIN and TRY AGAIN

8 views
Skip to first unread message

Joris Huizer

unread,
Aug 30, 2007, 11:26:25 AM8/30/07
to
Sorry to spoil the fun, but I found there is some other problems. In the
attached program, the line,

DO REINSTATE TRYING AGAIN
is not abstained from by,
DO ABSTAIN FROM REINSTATING
(which isn't abstain from, by the way), if compiling with the -f (or the
-F) flag

I have no idea why, but the "degenerated" code looks like this:

lineno = 7;
{
int i;

for (i = 0; i < (int)(sizeof(linetype)/sizeof(int)); i++)
if (linetype[i] == TRY_AGAIN)
if(abstained[i]) abstained[i]--;
}

Obviously, this will fail to get abstained


Oh, by the way, do you realise,
PLEASE %0 ABSTAIN FROM (1)
and
PLEASE %100 ABSTAIN FROM (1)
are responded to as,

ICL017I DO YOU EXPECT ME TO FIGURE THIS OUT?
ON THE WAY TO 29
CORRECT SOURCE AND RESUBNIT

Where the manual states "...and (2) a number between 0 and 100, preceded
by a double-oh-seven (%), which causes the statement to have only the
specified percent chance of being executed each time it is encountered
in the course of execution."

Maybe it's me not being a native English speaker, but it seems to me
that'd include both 0 and 100 - though it seems to exclude both...
Allowing %0 would disable code without any way to enable it (which is
really different from an abstained line). Because of semantics of
abstaining/reinstating, %100 wouldn't mean anything;

regards,

Joris

abstainTest.i

ais523

unread,
Sep 3, 2007, 5:16:35 AM9/3/07
to
On Aug 30, 4:26 pm, Joris Huizer <jorishui...@planet.nl> wrote:
> Sorry to spoil the fun, but I found there is some other problems. In the
> attached program, the line,
>
> DO REINSTATE TRYING AGAIN
> is not abstained from by,
> DO ABSTAIN FROM REINSTATING
> (which isn't abstain from, by the way), if compiling with the -f (or the
> -F) flag
This is fixed in the bugfix release 1.26 of C-INTERCAL.
--
ais523

0 new messages