Hi Folks!
Eike Lange wrote:
is there a way to suppress this warning: optest.pas:53: warning: object type declared as function result type
There is no such warning if you use "pFoo":
...
If that is not what you want, could you give me some code to play with?
Turned out, the idea I had in mind collided with Pascal syntax at another point, so I'm skipping it. (I was trying to build a self-defined pseudo-environment using tricky operators and a function call, and I wanted to avoid superfluous "^" symbols, so I wanted to return a tFoo instead of a pFoo. Something like:
type tMyEnvironment = object public Procedure endOfEnvironment; end;
Operator someOperator ( me: tMyEnvironment; p: pProcedure ): tMyEnvironment;
...
begin ... myEnvironment someOperator @someAction ... someOperator @someAction .endOfEnvironment; ... end;
But it didn't work anyway, since the parser applies the .endOfMyEnvironment to the last @someAction instead of the whole statement. I should have thought to an end before posting to the list.;-)
Thanks,
Markus