

On Thu, 07 Nov 2002 Nancy Mazur wrote :
>main -->
> 	io__open_input("blabla.txt", Result),
> 	(
> 		{ Result = ok(Stream) }
> 	->
> 		% then we could successfully open the file...
> 		% so here you can use Stream
> 		io__read(Stream, Input), ...

At this line it tells me that it says,

test2.m:015: In clause for predicate `test2:main/2':
test2.m:015:   in argument 1 of call to predicate `io:read/4':
test2.m:015:   type error: variable `Stream' has type 
`(io:output_stream)',
test2.m:015:   expected type was `(io:input_stream)'.

> 	;
> 		% or else something has gone wrong
> 		{ Result = error(Error) }
> 	->

At this line I get an  error which tells me to remove it, becuase 
it does not have ';'

> 		{ io__error_message(Error, ErrorMsg) },
> 		io__write_string(ErrorMsg)
> 	),
> 	...

Plz do tell me what I should do... because I fail to find a 
solution to it.

Thanks and Regards,

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

