Operators

The operators +, -, *, /, ^, %, and  are used to perform addition, subtraction, multiplication, division, exponentiation, modulo, and integer division of their operands, respectively. Valid operands are numeric constants and/or numeric variables.

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 suppresses the new line that is printed from a PRINT statement. The # operator is a shortcut for the Rem statement, and is interchangeable with it.

Order of Operations
LevelOperatorsCategory/Description
1( )Grouping
2^Exponent
3-Unary Minus
4* / \Multiplication and Division
5%Integer Remainder (Mod)
6+ -Addition, Concatenation, and Subtraction
7< ⇐ > >= = <>Comparison (Numeric and String)
8NOTUnary Not
9ANDLogical And
10ORLogical Or
11XORLogical Exclusive Or
 
de/operators.txt · Last modified: 2010/08/17 14:10 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki