[fpc-devel] Incomplete docs on operator precedence / Question about actual precedence

Martin Frb lazarus at mfriebe.de
Mon Feb 3 14:28:58 CET 2014


On 03/02/2014 07:58, Michael Van Canneyt wrote:
>
>
> On Mon, 3 Feb 2014, Martin Frb wrote:
>
>> This does not include:
>> ^ deref
>> - unary minus
>> . accessing a member of a class/record (not unary)
>
> To my knowledge, the . and ^ are not considered operators, they are 
> "part of the identifier".

Ok, so they are evaluated before everything else.

Curious though (I can see that the "." is not an operator (it was not 
what got me started anyway), but the ^ ?
It is the same kind (just reverse) of the @, so why is one an operator, 
and the other not?


The reason I did get to that,  is because I have to reproduce the 
behaviour (for fpdebug).
And when scanning/evaluating a pascal expression/statement, it works 
well to handle the "." (and also []()^) as operator. So that is haw the 
"." ended on the list.



More information about the fpc-devel mailing list