Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

[Inform] "or" limit?

1 vue
Accéder directement au premier message non lu

JL

non lue,
29 déc. 2006, 08:36:0929/12/2006
à
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

non lue,
29 déc. 2006, 11:24:1129/12/2006
à
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

non lue,
29 déc. 2006, 16:33:2429/12/2006
à
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

non lue,
29 déc. 2006, 16:58:4929/12/2006
à
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

non lue,
31 déc. 2006, 15:24:5031/12/2006
à
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 nouveau message