Sign in Join
FPDoc Onlineexperiment

TStream.ReadAnsiString function

Member of TStreampublicIn unit Classes

Read an ansistring from the stream and return its value.

Declaration

pascal
function ReadAnsiString: AnsiString

Description

ReadAnsiString reads an ansistring from the stream and returns its value. This is a utility function which simply calls the read function several times. The Ansistring should be stored as 4 bytes (a DWord) representing the length of the string, and then the string value itself. The WriteAnsiString function writes an ansistring in such a format.

Errors

If the AnsiString cannot be read, a EStreamError exception will be raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.