Browse Source

rtl: clean up, fixed strtoint $FF

mattias 6 years ago
parent
commit
5075b5f4d6
2 changed files with 5 additions and 8 deletions
  1. 0 1
      packages/rtl/system.pas
  2. 5 7
      packages/rtl/sysutils.pas

+ 0 - 1
packages/rtl/system.pas

@@ -471,7 +471,6 @@ var
 begin
 begin
   Code:=0;
   Code:=0;
   x:=Number(S);
   x:=Number(S);
-  writeln('val ',x);
   if isNaN(x) then
   if isNaN(x) then
     case copy(s,1,1) of
     case copy(s,1,1) of
     '$': x:=Number('0x'+copy(S,2));
     '$': x:=Number('0x'+copy(S,2));

+ 5 - 7
packages/rtl/sysutils.pas

@@ -3691,13 +3691,11 @@ Var
 
 
 begin
 begin
   N:=S;
   N:=S;
-  F:=Copy(N,1,1);
-  if (F='$') then
-    Radix:=16
-  else if (F='&') then
-    Radix:=8
-  else if (F='%') then
-    Radix:=2;
+  case Copy(N,1,1) of
+  '$': Radix:=16;
+  '&': Radix:=8;
+  '%': Radix:=2;
+  end;
   If Radix<>10 then
   If Radix<>10 then
     Delete(N,1,1);
     Delete(N,1,1);
   J:=parseInt(N,Radix);
   J:=parseInt(N,Radix);