[mercury-users] Arguments to program

Dieter Büttner judisun at t-online.de
Thu Feb 19 08:47:23 AEDT 2004


Hello,

though quite experienced in prolog , i  am a beginner in mercury.
Although I was searching hard (reference manual, tutorial, mail-archives), I 
was not able to find the answer of the following (presumable very easy) 
question.

How do I pass arguments to a mercury program? I assumed it would be by the 
shell command ./factorial 11 (for example). In the module factorial the main 
declaration was 

:- pred main(int,  io__state, io__state)
:- mode main(in, di, uo) is det.

main(X) -->
	{fac(X, Y)},
	...
	...

Looked reasonable for me, but no! This does not work.
Please, can someone help??

(you see, it is nessessary to continue the turorial work).

cu
Dieter

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