[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Return the size of the stream.
Source position: objects.pp line 290
function TStream.GetSize: LongInt; virtual; |
If the stream's status is stOk then GetSize returns the size of the stream, otherwise it returns -1.
-1 is returned if the status is an error condition.
|
Set stream position. |
|
|
Return current position in the stream |
Program ex12; { Program to demonstrate the TStream.GetSize function } Uses objects; Var L : String; S : PStream; begin L:='Some kind of string'; S:=New(PMemoryStream,Init(100,10)); Writeln ('Stream size before write: ',S^.GetSize); S^.WriteStr(@L); Writeln ('Stream size after write : ',S^.GetSize); Dispose(S,Done); end.