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

Reads the data type from the IOHandler connection.

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

SmallInt - Data type read from the the IOHandler connection.

ReadSmallInt is a SmallInt function used to read the ordinal data type from the data source for the IOHandler connection. ReadSmallInt calls ReadBytes to perform the read request, and calls BytesToSmallInt 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 the TIdStack.NetworkToHost method for the byte order conversion. 

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

 

TIdIOHandler.ReadBytes 

TIdIOHandler.BytesToSmallInt 

GStack 

TIdStack.NetworkToHost

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