Hi!
Which are the practical differences between the declaration ways below?
DoSomething(var AStream: TStream);
DoSomething(const AStream: TStream);
DoSomething(AStream: TStream);
I know the theoretical difference between "var" and "const" only.
I would like to assign to the variable AStream all variants of the type (TMemoryStream, TFileStream, TBytesStream, etc.) without allocating unnecessary memory (without duplicating the data inside the stream).
Thank you.