Screenshots     Download     Pricing     Documentation     Tutorials     Resources     Contact     Forum     Search  

Text Field Expressions

Many modules allow for [variable] to be used in place of static numbers. This flexibility allows for either use of standard numbers or variables in a fields that can be used either way. The most recent release allows for full expressions to now be specified in addition to just variables. Prior to this release you could have used the VBScript module to provide for simple calculations. However, using the [variable] expression is quicker and easier to update. For example, you can now specify [(120-COG_X)+10] in text fields whereas before only [COG_X] was understood.

For variables that are arrays you can access individual elements in the array using the following syntax

[variable:0]
[variable:1]
[variable:2]
etc.

The following are the understood expression syntax:

  • * multiplication
  • / division
  • % modulus
  • + addition
  • - subtraction
  • << bit shift left
  • >> bit shift right
  • < less than
  • <= less than or equal to
  • > greater than
  • >= greater than or equal to
  • == equal to
  • != not equal to
  • & bitwise and
  • | bitwise or
  • ^ bitwise xor
  • && boolean conjunction
  • || boolean disjunction
  • - unary negation
  • ! boolean not
  • pow(x,y) power
  • abs(x) absolute value
  • sqrt(x) square root
  • exp(x) e**x exponentiation
  • sin(x)
  • cos(x)
  • tan(x)
  • asin(x) arcsin
  • acos(x) arccosine
  • atan(x) arctangent
  • ln(x) natural log
  • log(x) or log10(x) log base 10
  • log2(x) log base 2
  • floor(x) floor or integer value of x
  • ceil() ceiling of x
  • round() round of x
  • random(x) random number from 0 to x
  • ? Conditional operator (comparison) ? (result if true) : (result if false)
  • () Precedence parentheses can be used to alter precedence

Examples:

	[my_variables_value]
  [3*(5+10/2)]
  [(3*5)+(10/2)]
  [3*5+pow(10,2)/2]
  [3*5+10/2]
  [(1?3:(5+3))+1]
  [COG_X>100?100:COG_X]
  [(10 + (55.78 * 30.55))/4]
  [5.54<=55.54]
  [55.54!=55.54]
  [255&8]
  [6^4]
  [!5]
  [pow(10,2)]
  [exp(1)]
  [tan(0.75)]
  [asin(0.84147098)]
  [acos(0.540302)]
  [atan(1.55740772)]
  [ln(8)]
  [log(100)]
  [log2(32)]
  [floor(5.88)]
  [ceil(5.01)]
  [round(5.01)]
  [round(5.51)]

© 2005 - 2014 RoboRealm. All Rights Reserved. | Contact | Glossary | Privacy | Disclaimer | Link to Us | Resources | Site Map