[mercury-users] reading term

Elmar Haneke elmar at haneke.de
Mon Feb 7 20:37:08 AEDT 2005



Philippe Teuwen schrieb:

> Use 'io__read'.
> "Reads a ground term of any type, written using standard
> Mercury syntax, from the current or specified input stream.
> The type of the term read is determined by the context
> in which 'io__read' is used."

io__read seems to be very much more complicated than "read" predicate 
in prolog. What I get on

	reat(T),print(T)

is an rather long term() structure nt the term I thyped in before.


In Prolog I just can replace

	T=[(1,2,3),(3,4,5)],
	process(T)

by

	read(T),
	process(T)

if the string "[(1,2,3),(3,4,5)]" comes from stdin.

Is there really no such simple thing in Mercury?

Elmar
--------------------------------------------------------------------------
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