Sei sulla pagina 1di 4

Expressions Reference

Page 1 of 4

Expressions Reference

Top Previous Next

Professional edition only Expressions may contain Variable names and literal text in "quotes". Combinations of operators and functions may also be used, as described in this topic. You can use the following symbols and brackets to evaluate expressions (note that non-numeric text values generally have a numeric value of zero): II OR && AND ! | ^ & ~ << >> + * / % = == <> != !== < <= > >= Logical OR Logical OR Logical AND Logical AND Logical NOT Binary OR Binary Exclusive OR (XOR) Binary AND Binary Complement Binary bit shift left Binary bit shift right Plus Minus Multiple Divide Modulus Equality test (case in-sensitive for text comparisons) Exact equality test (case sensitive) Non-equality test (case in-sensitive for text comparisons) Non-equality test (case in-sensitive for text comparisons) Exact non-equality test (case sensitive) Less than Less than or equal to Greater than Greater than or equal to

The following pre-defined constants are available to evaluate expressions (upper, lower or mixed case may be used according to preference): E PI NEWLINE 2.7182818284590452353602874713527 3.1415926535897932384626433832795 \r\n - carriage return and line feed pair (useful for joining text values)

The following functions are available to evaluate expressions (upper, lower or mixed case may be used according to preference): Text Functions CONTAINS(Text, SubText) Returns True if SubText is found anywhere within Text using a case in-sensitive match. Example: CONTAINS(Item, "abc") CONTAINSEXACT(Text, SubText) Returns True if SubText is found anywhere within Text using a case sensitive match.

mk:@MSITStore:C:\Program%20Files\GUI%20Design%20Studio%20Pro\GUIDesignStud... 33/05 /18

Expressions Reference

Page 2 of 4

Example: CONTAINSEXACT(Item, Filter) COUNTALPHA(Text) Returns the number of alphabetic characters (a - z, A - Z) in Text. Example: COUNTALPHA(NewPassword) COUNTDIGITS(Text) Returns the number of numeric characters (0 - 9) in Text. Example: COUNTDIGITS(NewPassword) COUNTLOWER(Text) Returns the number of lower case characters (a - z) in Text. Example: COUNTLOWER(NewPassword) COUNTUPPER(Text) Returns the number of upper case characters (A - Z) in Text. Example: COUNTUPPER(NewPassword) ENDS(Text, SubText) Returns True if Text ends in SubText using a case in-sensitive match. Example: ENDS(Item, Filter) ENDSEXACT(Text, SubText) Returns True if Text ends in SubText using a case sensitive match. Example: ENDSEXACT(Item, Filter) ISBLANK(Text) Returns True if Text is blank. Spaces are considered as non-blank characters. Example: ISBLANK(UserName) JOIN(Text1, Text2, ...) Returns the concatenation of all text value parameters. Most useful when setting data values. Example: JOIN(Label, ":", NEWLINE, Summary) LENGTH(Text) Returns the number of characters in Text. Example: LENGTH(Password) < 8 STARTS(Text, SubText) Returns True if Text starts with SubText using a case in-sensitive match. Example: STARTS(Item, Filter) STARTSEXACT(Text, SubText) Returns True if Text starts with SubText using a case sensitive match. Example: STARTSEXACT(Entry, "Abc") Text List Functions INLIST(Text, List) Returns True if the comma separated List contains Text (as a whole, not partial, item) using a case insensitive match. Example: INLIST(SelectedFruit, "orange,lemon,grapefruit") INLISTEXACT(Text, List) Returns True if the comma separated List contains Text (as a whole, not partial, item) using a case sensitive match. Example: INLISTEXACT(SelectedFruit, "Orange,Lemon,Grapefruit")

mk:@MSITStore:C:\Program%20Files\GUI%20Design%20Studio%20Pro\GUIDesignStud... 33/05 /18

Expressions Reference

Page 3 of 4

Special Functions HASFOCUS(Variable) Returns True if a control assigned to Variable currently has the keyboard focus. Useful for dynamic prompts. Example: HASFOCUS(NewPassword) Arithmetic Functions ABS(Number) Returns the absolute (positive) value of Number. EXP(Number) Returns the exponential value of Number. INTEGER(Number) Returns Number as an integer. LOG(Number) Returns the natural logarithm of Number. LOG10(Number) Returns the base 10 logarithm of Number. MAX(Number1, Number2) Returns the higher of Number1 and Number2. MIN(Number1, Number2) Returns the lower of Number1 and Number2. SQRT(Number) Returns the square root of Number. Trigonometric Functions ACOS(Number) Returns the arccosine of Number in radians. If Number is less than -1 or greater than 1 then the result will not be valid. ASIN(Number) Returns the arcsine of Number in radians. If Number is less than -1 or greater than 1 then the result will not be valid. ATAN(Number) Returns the arctangent of Number. COS(Radians) Returns the cosine of Radians. SIN(Radians) Returns the sine of Radians. TAN(Number) Returns the tangent of Number. Notes: 1. To convert from degrees to radians, use: Degrees * (PI / 180) 2. To convert from radians to degrees, use: Radians * (180 / PI)

mk:@MSITStore:C:\Program%20Files\GUI%20Design%20Studio%20Pro\GUIDesignStud... 33/05 /18

Expressions Reference

Page 4 of 4

mk:@MSITStore:C:\Program%20Files\GUI%20Design%20Studio%20Pro\GUIDesignStud... 33/05 /18

Potrebbero piacerti anche