[mercury-users] Style, Newbie decision question, "What? No X?!", Microbenchmark

Ralph Becket rafe at cs.mu.OZ.AU
Thu Nov 21 11:26:25 AEDT 2002


Julian Fondren, Wednesday, 20 November 2002:
> 
> >main(!IO) :-
> >    io__read_char(Result, !IO),
> >    (
> >        Result = eof
> >    ;
> >        Result = error(_),
> >        throw(Result)
> >    ;
> >        Result = ok(Char),
> >        ( if Char = '\n' then io__write_string("\r\n", !IO)
> >                         else io__write_char(Char,     !IO) ),
> >        main(!IO)
> >    ).
> 
> Thanks again: !IO is new syntax on me.

Ah, that's state variable syntax.  It's been in the ROTDs for months and
will be in the new release which should be out soon.  The documentation
is available on-line.

- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list