(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
module P(input, output);

type
   varstr = varying [256] of char;
   data = record
             iv : integer;
             sv : varstr;
          end;

[global]
function add(a, b : integer) : integer;

begin
   add := a + b;
end;

[global]
function conc(a, b : varstr) : varstr;

begin
   conc := a + b;
end;

[global]
function modify(o : data) : data;

var
   temp : data;

begin
   temp.iv := o.iv + 1;
   temp.sv := o.sv + 'X';
   modify := temp;
end;

end.
