Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
Does it allow user-defined optional parameters? If so, what about `()' then?
I am not sure what you are referring to here. Are you referring to things similar to "Writeln" which currently require compiler magic under GPC?
(AFAIK, `WriteLn' requires compiler magic in any compiler since it allows for an infinite number of combinations of number and types of arguments.)
writeln(f) (or writeln, defaulting to writeln(output)) is the only pure form. Anything else is defined in terms of shorthand.
writeln(f, a) is expected to expand to "write(f, a); writeln(f);" Similarly, if a is not a single simple object, write(f, a, b) is expected to expand to "write(f, a); write(f, b)". There is no magic, and especially no variable parameter lists. This has been clearly spelled out since the User Manual and Report.
The action of write(f, a) for non text files is spelled out in terms of f^ and put.
Similar things apply to read and readln.
I repeat - there is NO MAGIC.