begin comment LIBRARY 1; integer SUM; procedure P1(S, R, I, B, RA, IA); string S; real R; integer I; boolean B; real array RA; integerarray IA; SUM ≔ SUM + R + I + (if B then 1 else 0) + RA[1] + IA[1]; procedure P2(BA, L, SW, PR, RPR, IPR, BPR); boolean array BA; label L; switch SW; procedure PR; real procedure RPR; integerprocedure IPR; boolean procedure BPR; begin PR; SUM ≔ SUM + RPR + IPR; if BPR then goto L; if BA[1] then goto SW[2] end; procedure P3(R, I, B, RA, IA, BA, L); value R, I, B, RA, IA, BA, L; real R; integer I; boolean B; real array RA; integerarray IA; boolean array BA; label L; begin SUM ≔ SUM + R + I + RA[1] + IA[1] + (if B then 1 else 0) + (if BA[1] then 1 else 0); if BA[1] then goto L end; real R; boolean B; real array RA[1 : 1]; integerarray IA[1 : 1]; boolean array BA[1 : 1]; integerprocedure IPR; IPR ≔ 2 × SUM; real procedure RPR; RPR ≔ 3 × SUM; boolean procedure BPR; BPR ≔ ¬ B; procedure PR; SUM ≔ 5 × SUM + 1; switch SS ≔ WORK, FAIL; SUM ≔ 0; IA[1] ≔ - 2; RA[1] ≔ 3·55; BA[1] ≔ false; B ≔ true; R ≔ 6·4; P1( “AB”, R, SUM, B, RA, IA); if SUM ≠ 9 then OUTREAL(99, SUM); P2(BA, SS[2], SS, PR, RPR, IPR, BPR); if SUM ≠ 276 then OUTREAL(99, SUM); WORK :; OUTREAL(99, 0); P3(4·6, - 200, true, RA, IA, BA, if true then SS[2] else FAIL); if SUM ≠ 83 then OUTREAL(99, SUM); P1( “CD”, RPR, IPR, BPR, RA, IA); if SUM ≠ 500 then OUTREAL(99, SUM); P3(RPR, IPR, BPR, RA, IA, BA, FAIL); if SUM ≠ 3002 then OUTREAL(99, SUM); if false then FAIL : OUTREAL(99, - 1); end