[mercury-users] Problem with state variable
Julien Fischer
juliensf at cs.mu.OZ.AU
Fri Jun 23 16:32:02 AEST 2006
On Tue, 20 Jun 2006, Julien Fischer wrote:
>
> On Mon, 19 Jun 2006 valery at freesurf.fr wrote:
>
> > main(!IO) :-
> > N = 3,
> > some [!B] (
> > !:B = init(N*N, 0),
> > !:B = (!.B ^ elem(1) := N),
> > !:IO = range_foldl(func(J::in, !.IO::di) = (!:IO::uo) is det :-
> > !:IO = range_foldl(func(I::in, !.IO::di) = (!:IO::uo) is det :-
> > (io.format("%d\t", [i(!.B ^ elem(I + N * J))], !IO) % !! ERROR !!
> > ,io.format("\n", [], !IO)),
> > 0, N - 1, !.IO),
> > 0, N - 1, !.IO)
> > ).
> >
> > but the compiler complains that !.B in not visible in the first io.format.
>
> That appears to be a compiler bug (in the code that implements state
> variables). We'll take a look at it.
>
The above bug is now fixed in both the rotds and the 0.13-betas.
Julien.
--------------------------------------------------------------------------
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