And most likely it is Delphi compatible...
Buffer may be of a managed type, so that might be a problem as well
But can anyone give me example the Delphi code that can be compiled using current ReadBuffer becomes not compile-able or not compatible if we change the var parameter become out parameter?Something like this (not tested)
var s1, s2: AnsiString;
m: TMemoryString;
begin
// s1, s2 may have arbitrary values
// SwapStrings
m.WriteBuffer(s1, sizeof(Pointer));
m.WriteBuffer(s2, sizeof(Pointer));
m.position := 0;
m.ReadBuffer(s2, sizeof(Pointer));
m.ReadBuffer(s1, sizeof(Pointer));
end
There certainly are examples (and quite valid ones) out there where people manage "array of strings" using "move" and "fillchar".
But can anyone give me example the Delphi code that can be compiled using current ReadBuffer becomes not compile-able or not compatible if we change the var parameter become out parameter?