Re: brain gymnastics

new topic     » goto parent     » topic index » view thread      » older message » newer message

This program is easier to understand if you format it like this:

    integer i
    i = 1
    i = -i
    i /= i+1+(i = +i)  -- this statement originally on 2 lines
    i *= i-1-(i = -i)  -- this statement originally on 2 lines
    ? i

Colin Taylor


----- Original Message -----
From: Tor Gausen <tor.gausen at C2I.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Thursday, June 01, 2000 3:38 AM
Subject: brain gymnastics


> Check out this perfectly legal (promise!) Euphoria
>  program, what value do you suppose will be printed?
>
>     integer i
>
>     i = 1
>
>     i = -i
>
>     i /= i+1
>
>     +i = +i
>
>     i *= i-1
>
>     -i = -i
>
>     ? i
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu