User Tools

Site Tools


en:operators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:operators [2016/05/21 05:12]
admin
en:operators [2020/02/28 10:46] (current)
Line 1: Line 1:
 ===== Operators ===== ===== Operators =====
-The operators +, -, *, /, and ^ are used to perform addition, subtraction, multiplication, division, exponentiation of floating point and integer numbers. Valid operands are numeric constants and/or numeric variables.\\ 
-\\ 
-The operators %, \, &, |, and ~ are used to calculate modulo, integer division, bitwise and, bitwise or, and bitwise negation (not) of integer expressions.  Floating point numbers will be converted to an integer value before calculation.\\ 
-\\ 
-The = operator is used both for assignment to variables, and to test for equality.  The + operator may be used to perform concatenation of any combination of string constants and string variables.  The : operator can separate multiple statements on a single line. The # operator is a shortcut for the [[rem|Rem]] statement, and is interchangeable with it.\\ 
-\\ 
-^Arithmetic Operators^^^^ 
-^Operator^Name^Example^Comments^ 
-|+|Addition|a + b|add two numeric values.  If one or both values are strings the plus operator will concatenate the strings into a single string.<sup>2</sup>| 
-|-|Subtraction|a - b|subtract two numeric values| 
-|*|Multiplication|a * b| | 
-|/|Division|a / b|Returns a decimal number of times that b goes into a.| 
-|\|Integer Division|a \ b|Returns the number of whole times that b goes into a.| 
-|%|Modulo|a % b|Returns the remainder of the integer division of a and b.| 
-|%%++%%|Increment Prefix|%%++a%%|Increment (add one) the the variable and return the value after the increment. (may be applied ONLY to numeric variables or array elements)  <sup>1</sup>| 
-|%%++%%|Increment Suffix|%%a++%%|Return the value of the variable and then increment the variable by one for the next time it is accessed. (may be applied ONLY to numeric variables or array elements) <sup>1</sup>| 
-|--|Decrement Prefix|--a|Decrement (subtract one) the the variable and return the value after the decrement. (may be applied ONLY to numeric variables or array elements) <sup>1</sup>| 
-|--|Decrrement Suffix|a--|Return the value of the variable and then decrement the variable by one for the next time it is accessed. (may be applied ONLY to numeric variables or array elements) <sup>1</sup>| 
-\\ 
-^Comparison Operators^^^^ 
-^Operator^Name^Example^Comments^ 
-|=|Equal|a = b|Returns true of two values are equal| 
-|%%<%%|Less Than|a < b| | 
-|%%>%%|Greater Than|a > b| | 
-|%%<=%%|Less Than or Equal|a %%<=%% b| | 
-|%%>=%%|Greatet Than or Equal|a >= b| | 
-|%%<>%%|Not Equal|a <> b| | 
  
-\\ +What is an operation and operator...
-^Logical Operators^^^^ +
-^Operator^Name^Example^Comments^ +
-|NOT|Logical Negation|NOT a| | +
-|AND|Logical Conjunction|a AND b| | +
-|OR|Logical Disjunction|a OR b| | +
-|XOR|Logical Exclusive Disjunction|a XOR b| |+
  
-\\ +{{page>arithmeticoperators}}
-^Bitwise Operators^^^^ +
-^Operator^Name^Example^Comments^ +
-|%%~%%|Bitwide Negation|~a| | +
-|%%&%%|Bitwise Conjunction|a & b|If one or both values are strings the ampersand operator will concatenate the strings into a single string.<sup>3</sup>+
-|%%|%%|Bitwise Disjunction|a %%|%% b|Returns the bits of integer a or integer b.|+
  
-Bitwise operators only work with long integer values (since 1.99.99.19) in the range of −2,147,483,648 to 2,147,483,647.  Any attempt to use a number outside this range will produce, warnings, error, and/or unexpected results. +{{page>stringoperators}}
-\\ +
-^String Operators^^^^ +
-^Operator^Name^Example^Comments^ +
-|;|Concatenation|a ; b|Always concatenates (converts numbers to strings)<sup>2</sup>+
-|+|Concatenation|a + b|Appends b to the end of a (If either (or both) a and b are not numbers, see [[IsNumeric|IsNumeric]]). <sup>2</sup>+
-|&|Concatenation|a & b|Appends b to the end of a (If either (or both) a and b are not numbers, see [[IsNumeric|IsNumeric]]). <sup>3</sup>|+
  
-\\ +{{page>comparisonoperators}}
-^Order of Operations^^^ +
-^Level^Operators^Category/Description^ +
-|1|( )|Grouping| +
-|2|%%^%%|Exponent| +
-|3|- ~|Unary Minus and Bitwise Negation (NOT)| +
-|4|* / \|Multiplication and Division| +
-|5|%|Integer Remainder (Mod)| +
-|6|+ -|Addition/Concatenation, and Subtraction| +
-|7|& %%|%%|Bitwise And and Bitwise Or| +
-|8|< <= >= = <>|Comparison (Numeric and String)| +
-|9|NOT|Unary Not| +
-|10|AND|Logical And| +
-|11|OR|Logical Or| +
-|12|XOR|Logical Exclusive Or| +
-\\ +
-<sup>1</sup> new with version 1.9.9.10\\ +
-<sup>2</sup> new or changed with version 1.9.9.30\\ +
-<sup>3</sup> new or changed with version 1.9.9.30+
  
 +{{page>logicaloperators}}
 +
 +{{page>variableoperators}}
 +
 +{{page>bitwiseoperators}}
 +
 +{{page>orderofoperators}}
 +
 +=== Links to Separate Pages ===
 +
 +  * [[arithmeticoperators|Arithmetic Operators]]
 +  * [[stringoperators|String Operators]]
 +  * [[comparisonoperators|Comparison Operators]]
 +  * [[logicaloperators|Boolean (Logical) Operators]]
 +  * [[variableoperators|Variable Operators]]
 +  * [[bitwiseoperators|Bitwise Operators]]
 +  * [[orderofoperators|Order Of Operations]]
en/operators.1463829165.txt.gz · Last modified: 2020/02/28 10:46 (external edit)