[mercury-users] Mercury needs a Tutorial

Richard A. O'Keefe ok at atlas.otago.ac.nz
Tue Feb 16 10:21:30 AEDT 1999


	> David Powers wrote on 15 Feb:
	> > The idea of programs having input/output parameters will be familiar to those 
	> > who learnt strict Jensen&Wirth Pascal (program asdf(input,output)).
Tyson Dowd wrote
	Ada has similar.

No, it doesn't.  There is *no* equivalent in Ada of
	program Foo(Input, Output);
In Ada, Current_Input and Current_Output are functions in the package
Ada.Text_IO.  In effect, they are read-only global variables which can
be modified by the procedures Set_Input and Set_Output.  They are not
parameters of a program heading, not least because Ada hasn't any
program headings at all.  *Any* parameterless top-level procedure can
be the entry point of an Ada program.    ^^^^




More information about the users mailing list