通过pass-by-reference和pass-by-value-result来跟踪问题

时间:2014-12-09 17:28:13

标签: language-agnostic programming-languages parameter-passing pass-by-reference pass-by-value

我有以下程序:

begin
    integer i;

    procedure pass(x, y);
        integer x, y;
        begin
            x := x+1;
            y := x+1;
            x := y;
            i := i+ 1
        end

    i := 1;
    pass(i,i);
    print i
end

我可以通过pass-by-value答案,但是pass-by-reference和pass-by-value-result跟踪是什么样的?

0 个答案:

没有答案