Topic Path: Symbol Reference > Classes > TIdIOHandler Class > TIdIOHandler Methods > ReadCardinal Method
ContentsIndexHome
PreviousUpNext
TIdIOHandler.ReadCardinal Method

Reads the ordinal data type from the IOHandler connection.

function ReadCardinal(
    AConvert: Boolean = True
): Cardinal;
Parameters 
Description 
AConvert 
Indicates the bytes order for the ordinal data type must be converted. 

Cardinal - Ordinal value read from the IOHandler connection.

ReadCardinal is a Cardinal function used to read the ordinal data type from the data source for the IOHandler connection. ReadCardinal calls ReadBytes to perform the read request, and calls BytesToCardinal to convert the byte values to the ordinal data type. 

AConvert indicates that the byte order in the return value should be converted from the Network byte order to the host-specific byte order required for the data type. GStack is used to access TIdStack.NetworkToHost method for the byte order conversion. 

Use other methods to get a specific data type from the IOHandler connection, including: 

 

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