The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ScanHex


Unit:SDL_math1
Class:none
Declaration:function ScanHex (Instring: string; var Idx: integer): longint;

The function ScanHex decodes a hexadecimal number from a string. The parameter Instring contains the hexadecimal number to be scanned, starting at the position defined by the parameter Idx. Valid characters are the digits ‘0’...’9’, and the characters ‘A’...’F’, and leading blanks. 

On return, ScanHex contains the corresponding integer number, and the variable parameter Idx points to the first character after the scanned number. If the hexadecimal number constitutes the final part of the string, Idx points to 1+length(Instring ).



Last Update: 2023-Feb-06