[fpc-devel] Dwarf and "Result"

Jonas Maebe jonas at freepascal.org
Sat Aug 22 13:54:01 CEST 2020


On 19/08/2020 20:01, Martin via fpc-devel wrote:
> I just noted (testing with 3.3.1 from 2 or 3days ago) that -gw adds 3
> variables for result
> "result"
> "FUNCTIONNAME"
> "RESULT"
> 
> Why an upper, and lowercase result?

"result" is the actual function result parameter.

"FUNCTIONNAME" is an alias (internally an "absolute" variable") for
"result".

"RESULT" is an alias (idem) for "result" that only gets created if
{$modeswitch result} is active.

Lowercase variables cannot be accessed directly by Pascal code, and only
by the compiler itself (or through absolute aliases).


Jonas


More information about the fpc-devel mailing list