[Dev-C++] help files and Operator Precedence
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Eric <eri...@cl...> - 2004-12-11 14:12:17
|
Hi I belong to a micro-controller group, someone in the group presented a formula (which might not be the problem to their question) x = ((((mm-1)*31)+dd)-1)%8; y = ((((mm-1)*31)+dd)-1)/8; I told them it could be written as x = ((mm-1)*31+dd-1)%8; y = ((mm-1)*31+dd-1)/8; if they look on the "Operator Precedence chart" it took me a while to remember I had printed off the Operator Precedence chart from the Borland help files, for my own C++ notes (while I was at C++, school) While you can find the Operator Precedence chart on Internet with the help of Google, a couple of web sites I have seen does not tell that most Operator Precedence level (16 in all) go from left to right, but there are three that go from right to left, level 2, 13 and 15. Hand written on the bottom of the page is a reminder local variables take precedence over global variables (I was at school at the time when I wrote the notes, OK) The Aim of this posting is a suggestion this could included in the (dev-C++) help files on future upgrades unless I am using a old version you can correct me and I would be grateful. From Eric Richards --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.809 / Virus Database: 551 - Release Date: 09-Dec-04 |