uses gpc;

{$ifdef DJGPP}
const MinStackSize: Cardinal = $200000; asmname '_stklen';  {2 MB}
{$endif}

var
  dialect:string(100)='Unspecified dialect';
  rangecheck :Boolean=(*@@not implemented yet True*)False;
  base       :Boolean=True;
  hex        :Boolean=True;
  whitespace :Boolean=False;
  realiso7185:Boolean=False;
  valf       :Boolean=False;

const
  l1={$ifdef Standard}1{$else}17{$endif};
  fstsize=1000;

var
  infile:Text;
  instr,tmpstr:String(2000);
  inbuf:array[l1..l1+1000] of char;
  run1,run2,tempint,tempint2:integer;
  ok,white:boolean;
  bi:byteint;
  si:shortint;
  ni:integer;
  mi:medint;
  li:longint;
  bc:byte;
  sc:shortcard;
  nc:cardinal;
  mc:medcard;
  lc:longcard;
  sr:shortreal;
  nr:real;
  lr:longreal;
  c,c2:char;
  cr:'K'..'O';
  nst:string(100);
  sst:string[100];
(*@@(fjf204.pas)  fst:array[2*l1-1..2*l1+fstsize] of char; *)fst:array[1..fstsize] of char;
  cst:array[0..1000] of char;

function strcmp (a,b:CString):Integer; asmname 'strcmp'; external;

function GetIOResult: Integer; forward;
function GetInOutRes: Integer; forward;
procedure SetInOutRes (i: Integer); forward;
function GetCString2String (s: CString): TString; forward;
function StrConcat (const s1, s2: String): TString; forward;
procedure ErrI (const typ: String; va, ve: LongestInt); forward;
procedure ErrU (const typ: String; va, ve: LongestCard); forward;
procedure ErrR (const typ: String; va, ve: LongestReal); forward;
procedure ErrC (const typ: String; va, ve: Char); forward;
procedure ErrS (const typ, va, ve: String); forward;
procedure Halt1; forward;

operator = (a,b:LongReal) = r:boolean;
begin
  r := Abs (a - b) <= (Abs (a) + Abs (b)) * 1e-6
end;

operator = (a,b:Real) = r:boolean;
begin
  r := LongReal(a) = LongReal (b)
end;

operator = (a:ShortReal;b:Real) = r:boolean;
begin
  r := LongReal(a) = LongReal (b)
end;

{$W-,R-,W+} {Only read-range-checking is tested}
