begin 

    comment library 1;

    integer procedure fact(n); 
        value 
            n; 
        integer 
            n; 
        fact := 
            if n > 1 then 
                n * fact(n - 1)
            else 
                1; 

    fact := 1; 
    outreal(1, fact(5))
end 


algol

begin 

    comment library 1;

    real 
        y; 
    procedure p(x, x); 
        value 
            x; 
        real 
            x; 
        x := x^2 + 8.6; 

    p(y, 2.0); 
    outreal(1, y)
end 


algol

begin 

    comment library 1;

    real 
        x; 
    procedure p(y); 
        value 
            x; 
        real 
            y; 
        y := x; 

    x := 3.4; 
    p(10.0); 
    outreal(1, x)
end 



algol
sdec : 

begin 

    comment library5;

    real pr; 
    integer pi; 
    boolean pb; 
    pi := 1; 
    pr := 0.0@0; 
    pb := 
        if not pi > 0 and pi >= 1 or pi < 0 impl pr <= 0
            equiv pi \= 0 then 
            true 
        else 
            true; 
    if pb then 
        pr := - 1 * pi^3 div 2 +
            entier(sign(sqrt(abs(arctan(ln(exp(cos(sin(1)))))
            )))) - (pr / (if pr = 0.0 then 3 else 3)); 
    begin 
        switch psw := entry, exit; 
        own real array pra[0 : 1]; 
        integer array pia[2 : 3]; 
        boolean array pba[ - 1 : 0]; 
        boolean procedure pfb; 
            pfb := false; 

        procedure write text(od, s); 
            value od; 
            integer od; 
            string s; 
            outreal(1, od); 

        procedure all parameters(csr, csi, csb, ca1, ca2, cb,
            crfa, cifa, cbfa, cfr, cfi, cfb, cl, csl, cpr,
            cst, csw, car, cai, cab); 
            value ca1, ca2, cb, crfa, cifa, cbfa, csl; 
            integer csi, ca2; 
            real csr, ca1; 
            boolean csb, cb; 
            integer array cifa, cai; 
            real array crfa, car; 
            real procedure cfr; 
            integer procedure cfi; 
            boolean procedure cfb; 
            boolean array cbfa, cab; 
            procedure cpr; 
            string cst; 
            switch csw; 
            label cl, csl; 
            begin 
            real procedure take formal(tf); 
                real tf; 
                take formal := tf; 

            car[1] := take formal(ca1); 
            cai[2] := ca2; 
            cab[ - 1] := cb; 
            cpr(30, cst); 
            cfb; 
            ca2 := cfi(1); 
            goto cl; 
            end all parameters; 

        for pi := pi + 1 while pi < 3, 
            1 step 1 until 1, 
            1 do 
            pi := pi := pi; 
        goto psw[1]; 
        entry :; 
        all parameters(pr, pi, pb, 3.0, 3, false , pra, pia,
            pba, sin, entier, pfb, psw[2], exit, write
            text, [[c]
            this_is_a_string], psw, pra, pia, pba); 
        exit :; 
        outreal(1, pra[1] + pia[2] + pi + pr + (if pba[ - 1]
            then 10 else 0)); 
    end; 
end 


algol

begin 

    comment library 1;

    real 
        x; 
    procedure p(a, b); 
        value 
            (a, b); 
        real 
            (a, b); 
        x := a + b; 

    p(3, 4); 
    outreal(1, x)
end 


algol

begin 

    comment library 1;

    real 
        x; 
    integer 
        i; 
    x := 3.84; 
    for i := 1 step 1 until 200 do 
        begin 
        if - 1 / x \= - (1 / x) then 
            outreal(1, i); 
        x := x * 1.01; 
        end; 
    outreal(1, 0); 
end 



algol

begin 

    comment library 1;

    array 
        a[1.2]; 
    a[1] := 1.0; 
    outreal(1, a[1])
end 


algol

begin 

    comment library 1;

    integer 
        i, 
        j, 
        k; 
    i := j := k := 1; 
    if i = j then 
        la : if j \= k then 
            outreal(1, 1)
        else 
            outreal(1, 2); 
    outreal(1, 3)
end 


algol

begin 

    comment library 1;

    array 
        a[1 : 2.3 : 4]; 
    a[1] := 1.0; 
    outreal(1, a[1])
end 




algol

begin 

    comment library 1;

    real 
        x, 
        y; 
    integer 
        case; 
    procedure check(b); 
        value 
            b; 
        boolean 
            b; 
        if b then 
            case := case + 1
        else 
            begin 
            outreal(1, x); 
            outreal(1, y); 
            outreal(1, case)
            end; 

    case := 0; 
    for x := - 6.8, 
        .001, 
        13.4 do 
        for y := - 6.8, 
            .001, 
            13.4 do 
            begin 
            if x = y then 
                check(x <= y or x >= y)
            else if x > y then 
                check(x >= y)
            else if x < y then 
                check(x <= y)
            else 
                check(false )
            end; 
    outreal(1, case); 
end 


kdf9