Re: NASL2: precedence of 'logical NOT'
Michel Arboi <[email protected]>
| Newsgroups | gmane.comp.security.nessus.devel |
|---|---|
| Message-ID | <1045437221.1010.41.camel@rotissoire> |
On Sun, 2003-02-16 at 12:02, Thomas Reinke wrote: > Don't go changing the precedence from the standard ones used > in other programming languages. Standardize on A choice > (be it C, Java, Perl, whatever), and use the same one. It's > alot easier to document and just say "we use language Z's > standard". Too late, I put a table with the operator precedences in my NASL2 reference manual :-] I already changed at least two things if we compare with C: 1. All "compare" operators have the same precedence, but you cannot associate them, so it does not really matter (i.e. "x <= y == w <= z" is lawful in C, but not in NASL2) 2. The bitwise and/or operators have a higher precedence than in C. In NASL2, "x & y == z" is "(x & y) == z"; in C, it is "x & (y == z)" (that's why you always have to use parenthesis in C for this. Silly, no?) Anyway, it seems that there are more vote for "keep ! as in C" than the contrary. Renaud, any comment?