Forum > General

Can Absolute be used on string / packed record

<< < (17/17)

PascalDragon:

--- Quote from: MarkMLl on July 02, 2022, 04:41:59 pm ---
--- Quote from: PascalDragon on July 02, 2022, 04:29:53 pm ---I have absolutely no idea how a untagged variant record would come into play here. For functions that take plain Pointer parameters, but where you know the type of the pointer (e.g. the mentioned compare functions or a function that has some kind of context pointer parameter like e.g. in the compiler's foreachnodestatic functions) absolute is by far the easiest and quickest way to get the correct type (you can't check the type anyway here).

--- End quote ---

OK thanks, noted. Is Warfley's mention of $TYPEDADDRESS relevant to this?
--- End quote ---

$TYPEDADDRESS simply assures that @SomeVar returns ^TypeOf(SomeVar) instead of Pointer (Addr(SomeVar) in contrast always returns a Pointer). If you already have a pointer then this makes no difference.

Navigation

[0] Message Index

[*] Previous page

Go to full version