From 5075b5f4d6190052dfa6cf022eee295a0a6a560b Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 1 Nov 2018 14:13:49 +0000 Subject: [PATCH] rtl: clean up, fixed strtoint $FF --- packages/rtl/system.pas | 1 - packages/rtl/sysutils.pas | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/rtl/system.pas b/packages/rtl/system.pas index cadde08..2831c38 100644 --- a/packages/rtl/system.pas +++ b/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)); diff --git a/packages/rtl/sysutils.pas b/packages/rtl/sysutils.pas index 2998b00..4dff893 100644 --- a/packages/rtl/sysutils.pas +++ b/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);