Category: Getting Started

The Original Internet Language

Metacharacters in Character Literals

Certain characters, such as quotation marks and the backslash, have special functions in the software. If you need to use one of these metacharacters as a literal character in a string, you must “escape” the special function by inserting a backslash ( – Escape) preceding the metacharacter as shown in the following example: ‘This is…
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 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

Number Literals

A number literal is composed using the digits 0 to 9 and a decimal point (if desired). The number literal is automatically assigned the data type VASTINT, with a number of decimal places equal to the number of places shown in the expression. The following numbers are examples of valid number literals: 5   234   0.5   468.55 The following…
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

Comments

Comments are descriptive words or sentences, typically used as internal documentation in application programs. Comments are an essential part of application system documentation. In Zim, the percent sign (%) is used to signal the start of a comment. When the software encounters the comment indicator, it ignores all subsequent characters on the current physical line…
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

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…
Read more

en_CAEnglish