|
Operators for Calculation Variables
Arithmetic Operators
Example:
Indicator1 / 2 Multiplies two numbers
Example:Trigonometric and Exponential Operators
To calculate the base-10 logarithm for the number 50 [Log10(50)], divide the natural logarithm of 50 by the natural logarithm of 10 as follows: If x is: Less than zeroRnd generates: The same number every time, using x as the seedIf x is: Greater than zeroRnd generates: The next random number in the sequenceIf x is: Equal to zeroRnd generates: The most recently generated numberIf x is: Not suppliedRnd generates: The next random number in the sequenceRounding Operators
Abs(-20.5) and Abs(20.5) both return 20.5 The difference between Int and Fix is that if x is negative, Int returns the first negative integer less than or equal to x, whereas Fix returns the first negative integer greater than or equal to x.Int(99.8) Returns 99Fix(99.2) Returns 99Int(-99.8) Returns -100Fix(-99.8) Returns -99Int(-99.2) Returns -100Fix(-99.2) Returns -99 Sgn(Indicator1) Returns 1Sgn(Indicator2) Returns -1Sgn(Indicator3) Returns 0Conversion Operators
If x is not already a whole number, it is rounded to the nearest whole number before being evaluatedHex(5) Returns 5Hex(10) Returns AHex(459) Returns 1CB If x is not already a whole number, it is rounded to the nearest whole number before being evaluatedOct(4) Returns 4Oct(8) Returns 10Oct(459) Returns 713Order of Evaluating Operators
Functions and Logical Operators
VB.NET
C#
Calculation Inputs and Argument Names
Logical Operators and Statements
[Else