function-pointer
Paul Isaacs <[email protected]> Mon, 23 Jan 2017 02:36:31 -0500
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Hello, From ISO spec: production: expression can be variable-access variable-access can be function-identified-variable function-identified-variable is pointer-function '^' pointer-function is function-access function-access can be entire-function-access entire-function-access is function-designator function-designator is function-name But: function test : boolean; begin test := false; end; procedure test1; begin if test^; end; generates the error "invalid type of argument of '^'" function-identified-variable only appears on the rhs of the variable access production. The expression test^ seems lexically correct. I know I am wrong. But where? How is function-identified-variable used? I really can't understand 6.8.6.4 Function-Identified-Variables of the spec. It sounds like a function-identified-variable is the return value of a pointer function. Is test^ a pointer function? Regards, Paul Isaacs _______________________________________________ Gpc mailing list [email protected] https://www.g-n-u.de/mailman/listinfo/gpc