Category: Constructing Expressions

The Original Internet Language

Functional Expressions

About Functional Expressions The software provides a host of built-in functions that process given arguments in a variety of ways. An expression consisting of a function and its arguments (typically, value expressions) is called a functional expression. Examples of functional expressions are $length(‘Smith’) Evaluates to 5 $cos(0) Evaluates to 1 $log10(2*50) Evaluates to 2 $year(19990923) Evaluates to 1999 $maxof($absolute(-10),4+5) Evaluates to 10 General Performance…
Read more

Character Literals

A character literal is any string of characters enclosed in quotation marks as shown in the following example: ‘This is a character string.’ “This is a character string, too.” For convenience, you can enter character literals without the delimiting quotation marks; however, quotation marks are required in some situations. The rules for using quotation marks…
Read more

Mask

The Purpose of Masking Patterns Masking patterns are used to format data values in a manner appropriate to the type of information they represent. For example, in Zim, dates are stored as a special type of numerical value, in which the first four digits represent the year, the next two represent the month and the…
Read more

About Data Types

Any value expression used in an application – including the names of objects that represent values – must conform to one of the available data types. Data Types and Objects Objects that represent values (constants, variables, fields and form fields) have an explicit data type attribute defined in the Object Dictionary. Value expressions that are…
Read more

Hex Codes in Character Literals

If you need a place a character not normally available from the keyboard into a character literal, use the backslash to create the hex code for that character as shown in the following example: ‘This string has an ASCII escape generated by hex 1B (1B)’ The two characters immediately following a quoted backslash are treated…
Read more

About Conditional Expressions

Conditional expressions use the conditional operators to compare operands (typically, value expressions). When evaluated, conditional expressions yield a logical result (true or false), depending if  the condition is satisfied. Conditional Operators Operator Condition Being Evaluated expr = expr The values are equal. expr expr The values are not equal. expr = expr The left-hand value…
Read more

Pattern Matching

The conditional operators LIKE and = (equals) can be used to construct expressions in which the condition involves matching a value to a pattern rather than to another explicit value. The patterns are usually quoted character strings constructed using special wildcard characters in addition to literal characters. LIKE Patterns Patterns for use with the LIKE…
Read more

Decimals in Functional Expressions

When the result of a functional expression is a numeric value, the result contains as many decimal places as are found in the arguments of the function. If the function has several arguments with varying numbers of decimal places, the result takes on the number of decimal places found in the argument with the most…
Read more

How To Use Functional Expressions

A functional expression is a value expression that consists of a function keyword and its associated arguments. Examples of Functional Expressions $absolute(6-11) Result is 5. $length(“Smith”) Result is 5. $cos(0) Result is 1. $log10(2*50) Result is 2. $year(19990923) Result is 1999. $maxof($absolute(-10),4+5) Result is 10.  

Evaluation Order of Functional Expressions

Functional expression are evaluated in stages. Evaluation starts with the most nested argument, and works outwards. If the innermost nest consists of several arguments, the arguments are evaluated from left to right. To change the order of evaluation, use parentheses to change the nesting level. Consider the following example: $minof($left(TelNo,3),var1+var2) Because TelNo is the first…
Read more

en_CAEnglish