174 CHAPTER 6 (Fedora web server) MAKING DECISIONS WITH CONDITIONAL
174 CHAPTER 6 MAKING DECISIONS WITH CONDITIONAL LOGIC Mathematical Operators REALbasic s mathematical operators are based on the same set of operators we all use for common everyday math. Anyone familiar with a modern calculator should have no trouble recognizing each of the mathematical operators listed in Table 6-4 or understanding their function. Table 6-3. Order of Precedence for REALbasic Mathematic Operators To help better understand the order in which REALbasic processes mathematical operators, consider the following statement. intTestValue = 10 /2 + 3 1 * 3 REALbasic solves this equation, as the following outlines. 1. Divide 10 by 2 to get 5. 2. Multiply 1 * 3 to get 3. 3. Add 5 + 3 3 to get 5. If you want, you can use parentheses to control the order in which REALbasic solves an equation. For example, if the equation were rewritten as you see in the following: intTestValue = 10 /2 + (3 1) * 3 REALbasic would solve it as shown here. 1. Subtract 1 from 3 to get 2. 2. Divide 10 by 2 to get 5. 3. Multiply 2 * 3 to get 6. 4. Add 5 + 6 to get 11. OPERATOR PREDEDENCE One important concept you need to be aware of when working with mathematical operators is the order of precedence in which REALbasic performs mathematic operations. Table 6-3 lists the order in which REALbasic mathematic operator precedence occurs. Note, operators listed at the top of Table 6-3 are processed before those listed later in the table. Operator Description *, /, \ Multiplication and division occur first and are processed from left to right Mod Modulo is processed after all multiplication and division +, Addition and subtraction are processed last, starting from left to right
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.