[fpc-pascal] Untyped var params

Andrew Hall andrew.hall at shaw.ca
Sat Jan 7 20:37:28 CET 2017

If you cast your “something” to a typed pointer, the compiler will do the work for you in the usual way:

PDouble(something)^ := myDouble;
PAnsiString(something)^ := myAnsiString;
myRecordStructure  := PMyRecordStructure(something)^;

Or less elegantly:

AnsiString(Pointer(something)^) := myAnsiString;


On 07 Jan 17, at 03:29 , Ryan Joseph <ryan at thealchemistguild.com> wrote:
> So I need to need to use Move to write memory directly to “var something”? That makes sense I guess and could be useful is some cases but not like I was planning. Thanks for helping.

More information about the fpc-pascal mailing list