Task

 verify the version/revision of your currently running (compiler/interpreter/byte-compiler/runtime environment/whatever your language uses) and exit if it is too old.
 check whether the variable "bloop" exists and whether the math-function "abs()" is available and if yes compute abs(bloop).


Extra credit

 Report the number of integer variables in global scope, and their sum.


global bloop
 
procedure main(A)
    if older(11,7) then stop("Must have version >= 11.7!")
    bloop := -5         # global variable
    floop := -11.3      # local variable
    write(proc("abs")(variable("bloop")))
    write(proc("abs")(variable("floop")))
end
 
procedure older(maj,min)
    &version ? {
        (tab(find("Version ")),move(*"Version "))
        major := 1(tab(upto('.')),move(1))
        minor := tab(upto('.'))
        return (major < maj) | ((major = maj) & (minor < min))
        }
end