Re: precedence

From: Sumit Rajan (sumitrajan_at_myrealbox.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 15:51:42 +0530


"Andy White" <brighamandrew@msn.com> wrote in message
news:10kdf0531e5qad8@corp.supernews.com...
> the statement:
>
> foo.b[0] = 7;
>
> indicates the first element of the array member of the data structure. My
> question is, why aren't the brackets evaluated first then the dot operator
> after since the brackets are higher on the precedence chart? Thanks

A '[]' operator does not have higher precedence than a '.' operator. They
have the SAME precedence.

Regards,
Sumit.



Relevant Pages

  • Re: precedence
    ... > indicates the first element of the array member of the data structure. ... why aren't the brackets evaluated first then the dot operator ... A '' operator does not have higher precedence than a '.' ...
    (comp.programming)
  • Re: precedence
    ... > indicates the first element of the array member of the data structure. ... why aren't the brackets evaluated first then the dot operator ... A '' operator does not have higher precedence than a '.' ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Bash: Difference in && in "if" and "[[" commands
    ... AND of the two conditional expressions. ... precedence, while in the second, && has higher precedence than ... evaluation. ...
    (comp.unix.shell)
  • Re: Number to string conversion without internal writes
    ... if the precedence of the + is the same as //, ... what operators can be consecutive in Fortran: an infix operator ... precedence and one prefix operator may be followed by another ... if the latter has higher precedence. ...
    (comp.lang.fortran)
  • Re: c = foo(--a) + a; ?
    ... Operators having higher precedence are evaluated first. ... Among Operator having same precedence order of Evaluation is not ... Function call operator is a sequence point. ... Operators with a higher precedence are said to have tighter binding. ...
    (comp.lang.c)