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.


 
# syntax: GAWK -f INTROSPECTION.AWK
BEGIN {
    if (PROCINFO["version"] < "4.1.0") {
      print("version is too old")
      exit(1)
    }
    bloop = -1
    if (PROCINFO["identifiers"]["abs"] == "user" && bloop != "") {
      printf("bloop = %s\n",bloop)
      printf("abs(bloop) = %s\n",abs(bloop))
    }
    exit(0)
}
function abs(x) { if (x >= 0) { return x } else { return -x } }
 