Posted September 5, 201212 yr Hi Recently i've started a project which requires displaying output as a decimal number in ASCII characters. I've done the Hex value - to - ascii char thing but conversion of the number ... say - 2012 from hex (which is 0x07dc) to a decimal number displayed on the screen (2012) is a bit more difficult. Example : eax == 07dc i want to display in a messagebox the decimal value of eax. how do i make it decimal? Thanks
September 5, 201212 yr Here is a function of me coded for Delphi performing that task, I hope it could be helpful:function IntegerToString(Quantity: Int64): String;var Remainder: Integer;begin Result := ''; Repeat Remainder := Quantity MOD 10; Result := Chr(Remainder + Ord('0')) + Result; Quantity := Quantity DIV 10; until Quantity = 0;end; Edited September 5, 201212 yr by Nacho_dj
Create an account or sign in to comment