call by value-result in Pascal

Posted by Luciano Lorenti on Stack Overflow See other posts from Stack Overflow or by Luciano Lorenti
Published on 2010-06-11T22:19:00Z Indexed on 2010/06/11 22:22 UTC
Read the original article Hit count: 421

Filed under:
|

How can i simulate calling by value-result in this example. Without adding variables and without change a variable name.?

Program one;
    var
      x:integer;
    Function two():integer;
        begin
           x:=x+1;
           dos:=x;
        end;
    Procedure three(x:integer);
       begin
          x:=x+5;
          x:=two();
       end;
begin
x:=8;
trhee(x);
write(x);
end.

© Stack Overflow or respective owner

Related posts about parameters

Related posts about pascal