On 18 Apr 2004 at 5:09, Frank Heckenbach wrote: [...]
I see. If you want it in the next release, please:
- move the code out of parse.y as far as possible (I'm trying to move as much non-parsing code out of it as reasonably possible). Perhaps merge it with the real function call code (below) to a subroutine. This should also save some code duplication.
- For TYPE_DECL, the first check seems superfluous, since there is an error already. Or do we really want both?
- Add some test programs (for all cases discussed here, and perhaps some more). The Chief, perhaps?
I am happy to write test programs. What is the time scale? In fact, I have written a little test program to try out the various cases discussed here (see below). I guess that all I need to do now is to convert each case into a single program that prints "OK" if it is okay? program adelph3; var a, b: procedure; procedure foo (); { ok } begin end; procedure bar; begin end; procedure baz; overload; begin end; procedure baz (i : real); overload; begin end; procedure baz (i : real; j : string); overload; begin end; procedure baz (i : string; j : string); overload; begin end; begin a () := foo; { rejected } a := foo; { ok } b := bar (); { rejected } a (); { ok } b; { ok } baz; { ok } baz (); { ok } baz (1.0); { ok } baz (5.5, 'Chief'); { ok } baz ('African', 'Chief'); { ok } end. Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/