Topic Path: Symbol Reference > Functions > ToBytes Function (TIdBytes, Integer)
ContentsIndexHome
PreviousUpNext
ToBytes Function

Converts the data type to a TIdBytes value.

File
function ToBytes(
    const AValue: TIdBytes; 
    const ASize: Integer
): TIdBytes; overload;
Parameters 
Description 
AValue 
Bytes values to be converted.
 
ASize 
Number of bytes to include in the converted data type. 

TIdBytes - Results of the data type conversion.

ToBytes is an overloaded TIdBytes function used to convert the TIdBytes value in AValue up to and including the number of byte values specified in ASize. 

Since AValue is already a TIdBytes data type, no real conversion is required. The return value for the function is resized to the value in ASize, and CopyTIdBytes is called to copy the number of bytes in ASize from AValue into the return value for the function.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.