mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-19 03:25:44 +00:00
41 lines
972 B
Plaintext
41 lines
972 B
Plaintext
// ### Arithmetic
|
|
// |Operator|Description|
|
|
// |--------|-----------|
|
|
// |`+` |addition |
|
|
// |`-` |subtraction|
|
|
// |`*` |multiplication|
|
|
// |`/` |quotient |
|
|
// |`%` |remainder |
|
|
// |`&` |bitwise and|
|
|
// |`|` |bitwise or |
|
|
// |`^` |bitwise xor|
|
|
// |`&^` |bit clear (and not)|
|
|
// |`<<` |left shift |
|
|
// |`>>` |right shift|
|
|
//
|
|
// ### Comparison
|
|
// |Operator|Description|
|
|
// |--------|-----------|
|
|
// |`==` |equal |
|
|
// |`!=` |not equal |
|
|
// |`<` |less than |
|
|
// |`<=` |less than or equal|
|
|
// |`>` |greater than|
|
|
// |`>=` |greater than or equal|
|
|
//
|
|
// ### Logical
|
|
// |Operator|Description|
|
|
// |--------|-----------|
|
|
// |`&&` |logical and|
|
|
// |`||` |logical or |
|
|
// |`!` |logical not|
|
|
//
|
|
// ### Other
|
|
// |Operator|Description|
|
|
// |--------|-----------|
|
|
// |`&` |address of / create pointer|
|
|
// |`*` |dereference pointer|
|
|
// |`<-` |send / receive operator (see 'Channels' below)|
|
|
|
|
|