Adriaan van Os wrote:


1. On the todo list for fpc's MacPas mode is a feature that allows local procedures (functions) to be passed a procedural parameters. I tentatively put it on my own todo list, since this is the feature that I like most in Pascal compilers, at the same time making a small contribution to fpc and learning about the compiler. Before doing so, I need agreement on the method followed.

If I'd to rate this task on a scale from 0 (easy) to 5 (hard) I would give it a 4 :)


This is because, as Peter mentioned, parsing and type checking of proc. vars is really hard and messy. The reason is that proc var expressions are undefined without context and that's why fpc mode requires @ or () to define exactly what's meant if a proc. var or proc name is found.


Note that, with this solution, typed procedural variables can be passed as actual procedural parameters to "iso" style formal parameters, but not the other way round.

How are variables of this type declared?


_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to