1. Re: [If/then and sequences...]

On Wed, 30 Aug 2000 18:56:40 -0700, LEVIATHAN wrote:

>> True enough. But the real problem is not telling the difference
>> between assignments and equality, Euphoria doesn't mix those up, and
>> neither do I.  The problem is Euphoria's inability to handle the "if"
>> statement. correctly when  followed by an =, < or > operator using
>> sequences.
>
>Speaking of inability to handle if statements...
>
>Well, I know something Euphoria didn't take from me...
>
>if something = 1 OR 2 OR 3 OR 4 OR 5 OR 6...
>
>Multiple AND/OR/X* statements...
>
>Hmm, shouldn't this be allowed tho?

I'm not sure if you are intentionally using all caps to differentiate
between 'or' and 'OR' as two different keywords or not.  If so then having
two different types of 'or's could get confusing.  If not, then you already
can do that, only this is what it means:

if something = 1 or TRUE or TRUE or TRUE...
which will always evaluate to TRUE (non-zero = TRUE)

but to get your desired effect, you could do:

if find( something, {1,2,3,4,5,6,...} ) then...

-- Brian

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu