Difference between revisions of "UM:NetXMS Scripting Language (NXSL)"
Jump to navigation
Jump to search
Line 143: | Line 143: | ||
== Arithmetic Operators == | == Arithmetic Operators == | ||
{| class="wikitable" | |||
|- | |||
! Example !! Name !! Result | |||
|- | |- | ||
| -a || Negation || Opposite of ''a''. | |||
| | |||
| | |||
|- | |- | ||
| a + b || Addition || Sum of ''a'' and ''b''. | |||
| | |||
| | |||
|- | |- | ||
| a - b || Subtraction || Difference of ''a'' and ''b''. | |||
| | |||
| | |||
|- | |- | ||
| a * b || Multiplication || Product of ''a'' and ''b''. | |||
| | |||
| | |||
|- | |- | ||
| a / b || Division || Quotient of ''a'' and ''b''. | |||
| | |||
| | |||
|- | |- | ||
| a % b || Modulus || Remainder of ''a'' divided by ''b''. | |||
| | |||
| | |||
|} | |} | ||
The division operator ("/") returns a float value unless the two operands are integers (or strings that get converted to integers) and the numbers are evenly divisible, in which case an integer value will be returned. | The division operator ("/") returns a float value unless the two operands are integers (or strings that get converted to integers) and the numbers are evenly divisible, in which case an integer value will be returned. | ||
Line 192: | Line 170: | ||
== Bitwise Operators == | == Bitwise Operators == | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 338: | Line 314: | ||
== String Operators == | == String Operators == | ||
There are two string operators. The first is the concatenation operator ('.'), which returns the concatenation of its right and left arguments. The second is the concatenating assignment operator ('''.='''), which appends the argument on the right side to the argument on the left side. | There are two string operators. The first is the concatenation operator ('.'), which returns the concatenation of its right and left arguments. The second is the concatenating assignment operator ('''.='''), which appends the argument on the right side to the argument on the left side. | ||
= Control structures = | = Control structures = |