LWord2IPStr Function
Converts a LongWord representing an IP Address and returns the equivalent string representation 'xxx.xxx.xxx.xxx'.

Unit
QESBPCSConvert

Declaration
Function LWord2IPStr(const IPAddr: LongWord): string;

Description
No Padding is applied.

Parameters
IPAddr LongWord representing an IP Address.

Category
String/Integer Conversion Routines

Implementation

function LWord2IPStr (const IPAddr: LongWord): string;
var
     I: Integer;
     X: LongWord;
begin
     X := IPAddr;
     Result := '';
     for I := 1 to 4 do
     begin
          if I > 1 then
               Result := '.' + Result;
          Result := Int2EStr (X mod 256) + Result;
          X := X div 256;
     end;
End;


HTML generated by Time2HELP
http://www.time2help.com