Skip to main content

Functions

NameDescriptionUsageResult
NameDescriptionUsageResult
AbsReturns the absolute value of a specified number.Abs(-1)1M
AcosReturns the angle whose cosine is the specified number.Acos(1)0d
AsinReturns the angle whose sine is the specified number.Asin(0)0d
AtanReturns the angle whose tangent is the specified number.Atan(0)0d
CeilingReturns the smallest integer greater than or equal to the specified number.Ceiling(1.5)2d
CosReturns the cosine of the specified angle.Cos(0)1d
ExpReturns e raised to the specified power.Exp(0)1d
FloorReturns the largest integer less than or equal to the specified number.Floor(1.5)1d
IEEERemainderReturns the remainder resulting from the division of a specified number by another specified number.IEEERemainder(3, 2)-1d
LogReturns the logarithm of a specified number.Log(1, 10)0d
Log10Returns the base 10 logarithm of a specified number.Log10(1)0d
MaxReturns the larger of two specified numbers.Max(1, 2)2
MinReturns the smaller of two numbers.Min(1, 2)1
PowReturns a specified number raised to the specified power.Pow(3, 2)9d
RoundRounds a value to the nearest integer or specified number of decimal places. The mid number behaviour can be changed by using EvaluateOption.RoundAwayFromZero during construction of the Expression object.Round(3.222, 2)3.22d
SignReturns a value indicating the sign of a number.Sign(-10)-1
SinReturns the sine of the specified angle.Sin(0)0d
SqrtReturns the square root of a specified number.Sqrt(4)2d
TanReturns the tangent of the specified angle.Tan(0)0d
TruncateCalculates the integral part of a number.Truncate(1.7)1
TimespanTakes a number and interprets it a a timespan in milliseconds Timespan(1000)00:00:01.00
ToNumberConverts the argument into a number (e.g. if it's a string)

ToNumber('100')

ToNumber([SIMCONNECT:ATC])

ToStringConverts the argument into a string
ToCharConvert argument to a charToChar(int)
GetValueGet the Value of the Reference the argument is pointing to.GetValue('SIMCONNECT:ATC')
FormatFormats argument-1 using the formating rule argument-2Format( 123.2356 , '0.00' )123.23
SubStrExtracts a subsctring SubStr(value, startIndex, [length])
Startindex can be negative to start at end
LenGets the Length of the argument as string
ConcatConcat a list of values to a stringConcat(val1,val2,val2,val3)
ToBCO16Convert argument to BCO16
FromBCO16Convert argument from a number to BCO16
ToBCD / FromBCDConvert to/from BCD (Com frequencies) format
SelectSelect a indexed value (index) from argumentlist (haystack)Select([SIMCONNECT:SOMEPOSVAR],90,180,270,275)Select(index,haystackevaluelist)
RescaleRescale a value linear from inMin...inMax to outMin..outMaxRescale(value,inMin,inMax,outMin,outMax)
CountCounts the number of occurences of a character in a stringCount(value,char)
RandomCreate a Random numberRandom()
Random(max)
Random(min,max)
InIs a value in a list?In(value,v1,v2,v3...)if ( In([LOCAL:WINDDIRECTION],'North','East','West','South'), "Yeah" , "Invalid )
Replace (case-sensitive)Replace all occourences of a string Replace(input,old,new)Replace('MyCoolString','Cool','Nice')
Replace (case insensitive)Replace all occourences of a string (case insensitive)Replace(input,old,new,1)Replace('MycoolString','Cool','Nice',true)
IsMatchDoes string match a regular expression?IsMatch(input,regex)IsMatch('MyCoolString','.Cool.')
IndexOf (case-sensitive)Find first occourence of a string (0 based, -1 if not found)IndexOf(stringWhat,stringWhere)IndexOf('cool','mycoolstring') = 2
IndexOf('cool','myCOOLstring') = -1
IndexOf (case-insensitive)Find first occourence of a string (0 based, -1 if not found)IndexOf(stringWhat,stringWhere,bool)IndexOf('cool','myCOOLString',1) = 2
IsEmptyCheck if string is emptyIsEmpty('')
IsEmpty([LOCAL:PAGEID])
IsNotEmptyCheck if string is not emptyIsNotEmpty('')
IsNotEmpty([LOCAL:PAGEID])