You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Triangle-Tools2/programs/nesting.tri

31 lines
404 B

let
var g: Integer;
proc P() ~
let
var p: Integer;
proc Q() ~
let
var q: Integer;
proc R() ~
let
var r: Integer
in
r := (g+p+q) * 1000 ! should cause overflow
in
begin q := g+p; R() end;
proc S() ~
let
var s: Integer
in
begin s := g+p+1; Q() end
in
begin p := g+1; S() end
in
begin g := 1000; P() end