Explorar el Código

rtl: clean up, fixed strtoint $FF

mattias hace 6 años
padre
commit
5075b5f4d6
Se han modificado 2 ficheros con 5 adiciones y 8 borrados
  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
   Code:=0;
   x:=Number(S);
-  writeln('val ',x);
   if isNaN(x) then
     case copy(s,1,1) of
     '$': x:=Number('0x'+copy(S,2));

+ 5 - 7
packages/rtl/sysutils.pas

@@ -3691,13 +3691,11 @@ Var
 
 begin
   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
     Delete(N,1,1);
   J:=parseInt(N,Radix);