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

Copies bytes from an Int64 data type into an array of bytes.

File
procedure CopyTIdInt64(
    const ASource: Int64; 
    var VDest: TIdBytes; 
    const ADestIndex: Integer
);
Parameters 
Description 
ASource 
Bytes values to copy.
 
VDest 
Storage for the copied byte values.
 
ADestIndex 
Initial position where copied byte values are stored. 

CopyTIdInt64 is a procedure used to copy bytes in the Int64 value specified in ASource into the TIdBytes argument specified in VDest. 

ADestIndex indicates the initial byte position in VDest where copied byte values are stored. ADestIndex is a zero-based offset into the array of bytes. 

 

On the .Net platform, CopyTIdInt64 uses the GetBytes method from the System.BitConverter class in the FCL to access the byte values in ASource. The Copy method in the System.Array class from the FCL is called to perform actual copy operation. 

 

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 Int64 data type.

Copying bytes from an an Int64 value into TIdBytes. 

[Delphi]

  var
    ASrc: Int64;
    ADst: TIdBytes;

  ...

  ASrc := 123456;
  SetLength(ADst, 4);
  CopyTIdInt64(ASrc, ADst, 0);
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.