#!/usr/bin/gawk -f #Create some handy globals. function globals() { # magic array positions. should all be < 0 (so index==0 is an error) N = -1; # height of stack (number of rows); M = -2; # breadth of array (number of colums); # numeric constants Inf = 10^32; NegInf = -1 * Inf; Ee = 848456353 / 312129649; Pi = 428224593349304 / 136308121570117; # good to 29 digits # some useful strings Sp = " "; Q = "\""; _ = SUBSEP; White = "^[ \t\n\r]*$"; Number = "^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?$"; }