Topic Path: Symbol Reference > Functions > CopyTIdWord Function
ContentsIndexHome
PreviousUpNext
CopyTIdWord Function

Copies bytes values from the ordinal data type into the specified array of bytes.

File
procedure CopyTIdWord(
    const ASource: Word; 
    var VDest: TIdBytes; 
    const ADestIndex: Integer
);
Parameters 
Description 
ASource 
Ordinal data type with byte values to be copied.
 
VDest 
Storage for the byte values from the ordinal data type.
 
ADestIndex 
Initial position in the array of bytes to store copied byte values. 

CopyTIdWord is a procedure used to copy bytes values from the specified Word data type into the array of bytes indicated by VDest. 

ASource identifies the ordinal data type with byte values to be copied. 

VDest is the array bytes where byte values from the ordinal data type will be stored. 

ADestIndex indicates the initial position in the array of bytes to store copied byte values. ADestIndex is a zero-based offset into the array of bytes. 

 

On the .Net platform, CopyTIdWord calls the GetBytes method in the FCL System.BitConverter class to retrieve the byte values for the ordinal data type in ASource. The Copy method from the FCL System.Array class is called to perform the copy operation using the destination storage and index. 

 

For all other platforms where the Borland RTL is implemented, the Move procedure from SysUtils.pas is called to copy values from ASource into VDest at the indicated position using the native size of the ordinal data type.

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