# Difference between pages "ARDUINO MEGA Update Bootloader" and "Order Of Operations"

From ROBOTC API Guide

(Difference between pages)

(→Software Needed) |
(→Operations Level 8) |
||

Line 1: | Line 1: | ||

− | + | {{DISPLAYTITLE: C Order of Operations}} | |

+ | <yambe:breadcrumb>General|General Programming</yambe:breadcrumb> | ||

+ | {{tl|1|}} | ||

− | == | + | ===Operations level 1=== |

− | + | {|class="wikitable" | |

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | ++ || x++ || a unary operator that increases the value of "x" by one | ||

+ | |- | ||

+ | | -- || x-- || A unary operator that decreases the value of "x" by one | ||

+ | |- | ||

+ | |} | ||

− | + | ===Operations Level 2=== | |

− | + | {|class="wikitable" | |

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | ++ || ++x || a unary operator that increases the value of "x" by one | ||

+ | |- | ||

+ | | -- || --x || A unary operator that decreases the value of "x" by one | ||

+ | |- | ||

+ | | + || +x || A unary operator that does ???????? | ||

+ | |- | ||

+ | | - || -x || A unary operator that does ???????? | ||

+ | |- | ||

+ | | ! || !x || A logical operator that returns a boolean value that is the opposite of "x" (If "x" is true, then "!x" returns false) | ||

+ | |- | ||

+ | |} | ||

+ | ===Operations Level 3=== | ||

+ | {|class="wikitable" | ||

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | / || a / b || An operator that returns the value of "a divided by b" | ||

+ | |- | ||

+ | | * || a * b || An operator that returns the value of "a multiplied by b" | ||

+ | |- | ||

+ | | % || a % b || An operator that returns the value of "the remainder of a divided by b" | ||

+ | |- | ||

+ | |} | ||

+ | ===Operations Level 4=== | ||

+ | {|class="wikitable" | ||

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | + || a + b || An operator that returns the value of "a plus b" | ||

+ | |- | ||

+ | | - || a - b || An operator that returns the value of "a minus b" | ||

+ | |- | ||

+ | |} | ||

+ | ===Operations Level 5=== | ||

+ | {|class="wikitable" | ||

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | / || a / b || An operator that returns the value of "a divided by b" | ||

+ | |- | ||

+ | | * || a * b || An operator that returns the value of "a multiplied by b" | ||

+ | |- | ||

+ | | % || a % b || An operator that returns the value of "the remainder of a divided by b" | ||

+ | |- | ||

+ | |} | ||

− | == | + | ===Operations Level 6=== |

− | + | {|class="wikitable" | |

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | >> || a >> b || A bitwise shift to the right ????????? | ||

+ | |- | ||

+ | | << || a << b || A bitwise shift to the left ?????????? | ||

+ | |- | ||

+ | |} | ||

+ | ===Operations Level 7=== | ||

+ | Also known as "boolean operators" for returning boolean values | ||

− | + | {|class="wikitable" | |

− | * | + | |- |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

+ | | < || a < b || A logical statement that returns "true" if "a" is less than "b" | ||

+ | |- | ||

+ | | * || a <= b || A logical statement that returns "true" if "a" is less than or equal to "b" | ||

+ | |- | ||

+ | | > || a > b || A logical statement that returns "true" if "a" is greater than "b" | ||

+ | |- | ||

+ | | >= || a >= b || A logical statement that returns "true" if "a" is greater than or equal to "b" | ||

+ | |- | ||

+ | |} | ||

+ | ===Operations Level 8=== | ||

+ | Also known as "boolean operators" for returning boolean values | ||

− | ---- | + | {|class="wikitable" |

+ | |- | ||

+ | ! Operator !! Syntax !! Explanation | ||

+ | |- | ||

+ | | == || a == b || A logical statement that returns "true" if "a" is equal to "b" | ||

+ | |- | ||

+ | | != || a != b || A logical statement that returns "true" if "a" NOT equal to "b" | ||

+ | |- | ||

+ | |} | ||

− | + | ===Operations Level 9=== | |

− | + | {|class="wikitable" | |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | & || a & b || A bitwise operator AND ???????? | |

− | + | |- | |

− | + | |} | |

− | + | ===Operations Level 10=== | |

− | == | + | {|class="wikitable" |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | ^ || a ^ b || A bitwise operator ExclusiveOR ???????? | |

− | + | |- | |

− | + | |} | |

− | == | + | ===Operations Level 11=== |

− | + | {|class="wikitable" | |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | <nowiki>|</nowiki> || <nowiki>a | b</nowiki> || A bitwise operator OR ???????? | |

− | + | |- | |

− | + | |} | |

− | + | ===Operations Level 12=== | |

− | + | {|class="wikitable" | |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | && || a && b || Returns "true" if both "a" and "b" are also true | |

− | [[ | + | |- |

− | + | |} | |

− | + | ===Operations Level 13=== | |

− | == | + | {|class="wikitable" |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | <nowiki>||</nowiki> || <nowiki>a || b</nowiki> || Returns "true" if either "a" or "b" is true | |

− | + | |- | |

− | + | |} | |

− | + | ===Operations Level 14=== | |

− | + | {|class="wikitable" | |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | == | + | |- |

− | + | | ?: || a ? b : c || Ternary operations: see [[Tertiary_operators]] | |

− | + | |- | |

− | + | |} | |

− | + | ===Operations Level 15=== | |

− | + | {|class="wikitable" | |

− | + | |- | |

− | + | ! Operator !! Syntax !! Explanation | |

− | + | |- | |

− | + | | = || a = b || Assigns the value of "b" to "a" | |

− | + | |- | |

− | + | | += || a += b || Assigns the value of "a + b" to "a" | |

− | + | |- | |

− | + | | -= || a -= b || Assigns the value of "a - b" to "a" | |

− | + | |- | |

− | + | | /= || a /= b || Assigns the value of "a / b" to "a" | |

− | + | |- | |

− | + | | *= || a *= b || Assigns the value of "a * b" to "a" | |

− | + | |- | |

− | + | | %= || a %= b || Assigns the value of "a % b" to "a" | |

− | + | |- | |

− | + | | <<= || a <<= b || Assigns the value of "a << b" to "a" ???????? | |

− | + | |- | |

− | + | | >>= || a >>= b || Assigns the value of "a >> b" to "a" ???????? | |

− | + | |- | |

− | + | | &= || a &= b || Assigns the value of "a & b" to "a" ????????? | |

− | + | |- | |

− | + | | ^= || a ^= b || Assigns the value of "a ^ b" to "a" ????????? | |

− | + | |- | |

− | + | | <nowiki>|= </nowiki>|| <nowiki>a |= b</nowiki> || Assigns the value of <nowiki>"a |= b"</nowiki> to "a" ?????????? | |

− | + | |- | |

− | < | + | |} |

− | = | + | |

− | < | + | |

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + |

## Latest revision as of 20:47, 20 March 2014

General Programming → ARDUINO MEGA Update Bootloader

### Operations level 1

Operator | Syntax | Explanation |
---|---|---|

++ | x++ | a unary operator that increases the value of "x" by one |

-- | x-- | A unary operator that decreases the value of "x" by one |

### Operations Level 2

Operator | Syntax | Explanation |
---|---|---|

++ | ++x | a unary operator that increases the value of "x" by one |

-- | --x | A unary operator that decreases the value of "x" by one |

+ | +x | A unary operator that does ???????? |

- | -x | A unary operator that does ???????? |

! | !x | A logical operator that returns a boolean value that is the opposite of "x" (If "x" is true, then "!x" returns false) |

### Operations Level 3

Operator | Syntax | Explanation |
---|---|---|

/ | a / b | An operator that returns the value of "a divided by b" |

* | a * b | An operator that returns the value of "a multiplied by b" |

% | a % b | An operator that returns the value of "the remainder of a divided by b" |

### Operations Level 4

Operator | Syntax | Explanation |
---|---|---|

+ | a + b | An operator that returns the value of "a plus b" |

- | a - b | An operator that returns the value of "a minus b" |

### Operations Level 5

Operator | Syntax | Explanation |
---|---|---|

/ | a / b | An operator that returns the value of "a divided by b" |

* | a * b | An operator that returns the value of "a multiplied by b" |

% | a % b | An operator that returns the value of "the remainder of a divided by b" |

### Operations Level 6

Operator | Syntax | Explanation |
---|---|---|

>> | a >> b | A bitwise shift to the right ????????? |

<< | a << b | A bitwise shift to the left ?????????? |

### Operations Level 7

Also known as "boolean operators" for returning boolean values

Operator | Syntax | Explanation |
---|---|---|

< | a < b | A logical statement that returns "true" if "a" is less than "b" |

* | a <= b | A logical statement that returns "true" if "a" is less than or equal to "b" |

> | a > b | A logical statement that returns "true" if "a" is greater than "b" |

>= | a >= b | A logical statement that returns "true" if "a" is greater than or equal to "b" |

### Operations Level 8

Also known as "boolean operators" for returning boolean values

Operator | Syntax | Explanation |
---|---|---|

== | a == b | A logical statement that returns "true" if "a" is equal to "b" |

!= | a != b | A logical statement that returns "true" if "a" NOT equal to "b" |

### Operations Level 9

Operator | Syntax | Explanation |
---|---|---|

& | a & b | A bitwise operator AND ???????? |

### Operations Level 10

Operator | Syntax | Explanation |
---|---|---|

^ | a ^ b | A bitwise operator ExclusiveOR ???????? |

### Operations Level 11

Operator | Syntax | Explanation |
---|---|---|

| | a | b | A bitwise operator OR ???????? |

### Operations Level 12

Operator | Syntax | Explanation |
---|---|---|

&& | a && b | Returns "true" if both "a" and "b" are also true |

### Operations Level 13

Operator | Syntax | Explanation |
---|---|---|

|| | a || b | Returns "true" if either "a" or "b" is true |

### Operations Level 14

Operator | Syntax | Explanation |
---|---|---|

?: | a ? b : c | Ternary operations: see Tertiary_operators |

### Operations Level 15

Operator | Syntax | Explanation |
---|---|---|

= | a = b | Assigns the value of "b" to "a" |

+= | a += b | Assigns the value of "a + b" to "a" |

-= | a -= b | Assigns the value of "a - b" to "a" |

/= | a /= b | Assigns the value of "a / b" to "a" |

*= | a *= b | Assigns the value of "a * b" to "a" |

%= | a %= b | Assigns the value of "a % b" to "a" |

<<= | a <<= b | Assigns the value of "a << b" to "a" ???????? |

>>= | a >>= b | Assigns the value of "a >> b" to "a" ???????? |

&= | a &= b | Assigns the value of "a & b" to "a" ????????? |

^= | a ^= b | Assigns the value of "a ^ b" to "a" ????????? |

|= | a |= b | Assigns the value of "a |= b" to "a" ?????????? |