Josef Urban wrote:
On Fri, 22 Oct 2004, Frank Heckenbach wrote:
Probably for this reasone, EP forbids function results in `with' statements at all (6.9.3.10: withÂelement = variableÂaccess | constantÂaccess.). I don't know about other dialects (BP has no records as result types, so the issue doesn't arise. What about Delphi etc.?).
But pointers to records or objects are result types quite often. It seems to me that st. like
with foo(x)^ do ...
is useful in Delphi (or BP or FPC). As I understand it, the EP specification would forbid that too?
No, it allows it. That's not problematic since the pointer points to a more persistent object (record) which can meaningfully be modified etc. Whereas a function result just "disappears" after its use, so if that use is just an assignment, it's effectively meaningless.
Frank