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

[Inform] "or" limit?

1 view
Skip to first unread message

JL

unread,
Dec 29, 2006, 8:36:09 AM12/29/06
to
Hello,

If I add this line to an existing game, the compiler (version: 6.30 for
win32) crashes:

print 'c' == 'a' or 'A' or 'à' or 'À' or 'â' or 'Â' or 'ä' or 'Ä'
or 'e' or 'E' or 'é' or 'É' or 'è' or 'È' or 'ê' or 'Ê' or
'ë' or 'Ë'
or 'i' or 'I' or 'î' or 'Î' or 'ï' or 'Ï'
or 'o' or 'O' or 'ô' or 'Ô' or 'ö' or 'Ö'
or 'u' or 'U' or 'û' or 'Û' or 'ü' or 'Ü'
or 'h' or 'H';

This line works (it prints "0"):

print 'c' == 'a' or 'A' or 'à' or 'À' or 'â' or 'Â' or 'ä' or 'Ä'
or 'e' or 'E' or 'é' or 'É' or 'è' or 'È' or 'ê' or 'Ê' or
'ë' or 'Ë'
or 'i' or 'I' or 'î' or 'Î' or 'ï' or 'Ï'
or 'o' or 'O' or 'ô'; ! or 'Ô' or 'ö' or 'Ö'
! or 'u' or 'U' or 'û' or 'Û' or 'ü' or 'Ü'
! or 'h' or 'H';

Is there a limit to the number of "or"?

Thanks,

-- JL

Andrew Plotkin

unread,
Dec 29, 2006, 11:24:11 AM12/29/06
to
Here, JL <info...@gmail.com> wrote:
> Hello,
>
> If I add this line to an existing game, the compiler (version: 6.30 for
> win32) crashes:
>
> print 'c' == 'a' or 'A' or 'à' or '??' or 'â' or '??' or 'ä' or '??'
> or 'e' or 'E' or 'é' or '??' or 'è' or '??' or 'ê' or '??' or
> 'ë' or '??'
> or 'i' or 'I' or 'î' or '??' or 'ï' or '??'
> or 'o' or 'O' or 'ô' or '??' or 'ö' or '??'
> or 'u' or 'U' or 'û' or '??' or '??' or '??'

> or 'h' or 'H';
>
> This line works (it prints "0"):
>
> print 'c' == 'a' or 'A' or 'à' or '??' or 'â' or '??' or 'ä' or '??'
> or 'e' or 'E' or 'é' or '??' or 'è' or '??' or 'ê' or '??' or
> 'ë' or '??'
> or 'i' or 'I' or 'î' or '??' or 'ï' or '??'
> or 'o' or 'O' or 'ô'; ! or '??' or 'ö' or '??'
> ! or 'u' or 'U' or 'û' or '??' or '??' or '??'

> ! or 'h' or 'H';
>
> Is there a limit to the number of "or"?

Yes.

And that's it. :) It's 32, I think.

But you can say
((x == 1 or 2 or ... or 30) || (x == 31 or 32 or ... or 60))

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
"Bush has kept America safe from terrorism since 9/11." Too bad his
job was to keep America safe *on* 9/11.

Roger Firth

unread,
Dec 29, 2006, 4:33:24 PM12/29/06
to
JL wrote:
> Hello,
>
> If I add this line to an existing game, the compiler (version: 6.30 for
> win32) crashes:
>
> print 'c' == 'a' or 'A' or 'à' or 'À' or 'â' or 'Â' or 'ä' or 'Ä'
> or 'e' or 'E' or 'é' or 'É' or 'è' or 'È' or 'ê' or 'Ê' or
> ...

>
> Is there a limit to the number of "or"?

This looks like a known 6.30 bug, fixed in compiler 6.31 (which
is shipped with I7):
http://www.inform-fiction.org/patches/C63013.html

--
Cheers, Roger

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
You'll find all my IF pages at http://www.firthworks.com/roger
WARNING: aggressive spam deletion -- use a meaningful Subject!

Andrew Plotkin

unread,
Dec 29, 2006, 4:58:49 PM12/29/06
to
Here, Roger Firth <ro...@firthworks.com> wrote:
> JL wrote:
> > Hello,
> >
> > If I add this line to an existing game, the compiler (version: 6.30 for
> > win32) crashes:
> >
> > print 'c' == 'a' or 'A' or 'à' or '??' or 'â' or '??' or 'ä' or '??'
> > or 'e' or 'E' or 'é' or '??' or 'è' or '??' or 'ê' or '??' or

> > ...
> >
> > Is there a limit to the number of "or"?
>
> This looks like a known 6.30 bug, fixed in compiler 6.31 (which
> is shipped with I7):
> http://www.inform-fiction.org/patches/C63013.html

And I am crushed under the treads of the "check the patch list before
you post" error. Sorry.

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*

If the Bush administration hasn't thrown you in military prison without trial,
it's for one reason: they don't feel like it. Not because you're an American.

JL

unread,
Dec 31, 2006, 3:24:50 PM12/31/06
to
OK, thank you! So the limit is 27 in 6.30 (in my example too, but the
fact that the compiler doesn't crash and that the correct result is
printed is not sufficient).

I didn't find the answer with Google because the word "or" is ignored
by Google.

-- JL

0 new messages