Example of external variables usage in interpreter:


Var
  OV:string;
  OP:Integer;

function TForm1.HalComp1VarNameTOID(const S: String): Integer;
begin
  If s='OV' then Result:=0
  else
  If s='OP' then Result:=1
  else
   Result:=-1;
end;

procedure TForm1.HalComp1SetVar(ID: Integer; Value: Variant);
begin
  Case id of
  0: OV:=Value;
  1: OP:=Value;
  end;
end;

function TForm1.HalComp1GetVar(ID: Integer): Variant;
begin
  case id of
  0: Result:=OV;
  1: Result:=OP;
  end;
end;
