View Issue Details

IDProjectCategoryView StatusLast Update
0037082FPCRTLpublic2020-05-17 15:53
ReporterThaddy de Koning Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformallOSall 
Product Version3.3.1 
Summary0037082: 0037043 is not complete
DescriptionThe patch for 0037043 is not complete.
Delphi uses default parameters, so sizeof() is needed as default parameter.
Tested with the above and Delphi 10.3.3
Steps To ReproduceJust compare. I could not re-open the original report.
e.g.:
program testme;
{$ifdef mswindows}{$apptype console}{$endif}
{$ifdef fpc}{$mode delphi}
var a: byte = 100;
begin
writeln (a.toHexString);
writeln(IntToHex(a));
end.
Additional Informationnone.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Thaddy de Koning

2020-05-15 18:54

reporter   ~0122822

Last edited: 2020-05-15 18:57

View 2 revisions

Forgot second endif, but one gets the point.
(Note ToHexString uses indeed the correct size.. ;) )

Bi0T1N

2020-05-15 19:29

reporter   ~0122823

Both lines print 64 (100=64h), so what do you mean?

Thaddy de Koning

2020-05-15 21:08

reporter   ~0122825

The implemention can be done in a single include, single implementation for all.
Look at how it is done with the similar constructs.
It is a nice addition, btw. I overlooked that with the patch for ToHexString.

Sven Barth

2020-05-17 15:53

manager   ~0122881

Delphi lists the helper's ToHexString functions as overloads (see here: http://docwiki.embarcadero.com/Libraries/Rio/en/System.SysUtils.TIntegerHelper.ToHexString ) and the newly added overloads are overloads in Delphi as well ( http://docwiki.embarcadero.com/Libraries/Rio/en/System.SysUtils.IntToHex ), so, nothing needs to be done here.

Issue History

Date Modified Username Field Change
2020-05-15 18:49 Thaddy de Koning New Issue
2020-05-15 18:54 Thaddy de Koning Note Added: 0122822
2020-05-15 18:57 Thaddy de Koning Note Edited: 0122822 View Revisions
2020-05-15 19:29 Bi0T1N Note Added: 0122823
2020-05-15 21:08 Thaddy de Koning Note Added: 0122825
2020-05-17 15:53 Sven Barth Assigned To => Sven Barth
2020-05-17 15:53 Sven Barth Status new => resolved
2020-05-17 15:53 Sven Barth Resolution open => no change required
2020-05-17 15:53 Sven Barth FPCTarget => -
2020-05-17 15:53 Sven Barth Note Added: 0122881