Re: function-identifier-variable

Waldek Hebisch <[email protected]> Tue, 29 Mar 2016 01:19:41 +0200 (CEST)
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
Paul Isaacs wrote:
> 
> 
> Waldek, Professor,
> 
> Thank you for the replies.
> 
> "A pointer-function shall be a function-access possessing : a pointer-type."
> 
> Howvever,  I can't see how to generate a function-access possessing a 
> pointer-type:

Just declare apropriate return type.  Useful example would
be complicated, but a useless one is:

program pb;
type pb = ^boolean;
var pv : pb;

function y : pb;
begin
    y := pv
end;

{Main program}
begin
    new(pv);
    pv^ := true;
    {Use y}
    if y^ then writeln("OK")
end
.

-- 
                              Waldek Hebisch

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc