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

Copies untyped values into a fixed-size array of Bytes.

File
procedure RawToBytesF(
    var Bytes: TIdBytes; 
    const AValue; 
    const ASize: Integer
);
Parameters 
Description 
Bytes 
Storage for the copied raw byte values .
 
AValue 
Untyped value to copy in the operation.
 
ASize 
Number of bytes from AValue to copy into the array of bytes. 

RawToBytesF is a procedure used to copy untyped values in AValue into the fixed array of Bytes indicated by Bytes. ASize indicates the number of byte values to copy from AValue into the Bytes variable parameter. 

Please note that the length of Bytes must already be allocated with enough storage for the number bytes desired in the copy operation. 

RawToBytesF calls the Move procedure from SysUtils.pas to perform the copy operation for the specified number of bytes. Copies byte values are always stored at the beginning (or offset 0) of the TIdBytes storage indicated in Bytes. 

Please note that RawToBytesF is not defined for the .Net platform. Use the overloaded ToByesF procedure to copy ordinal data types into a TIdBytes storage area for the .Net Platform.

Exceptions 
Description 
EAssertionFailed 
Raised when the allocated size of the Bytes argument is too small to store the number of bytes values indicated in ASize. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.