Category: Constructing Expressions

The Original Internet Language

Arithmetic with Dates

ZIM-X provides a number of built-in functions to perform date and time arithmetic.  If an arithmetic expression subtracts one date from another (i.e., both operands are of data type DATE), the result is a number representing the number of days between the two dates. Example Consider the Date Type values: Date1 = 19990923 (23SEP1999) and…
Read more

How To Construct Arithmetic Expressions

Writing Expressions Arithmetic operators and parentheses can be combined to create long, complex expressions. Arithmetic expressions are evaluated based on the standard rules of precedence. Parentheses alter the order of evaluation. Spaces between operands and operators can be used for clarity, but are not required. For example, Salary * 1.1 and Salary*1.1 are equivalent. Data…
Read more

How To Use Arithmetic Expressions

An arithmetic expression is a complex value expression that consists of two or more value expressions and associated arithmetic operators. The arithmetic operators are + (Add) – (Subtract) ^(Exponentiation) * (Multiply) / (Divide) Examples of Arithmetic Expressions For clarity, spaces can be used between operands and operators, but they are not required. Salary * 1.1…
Read more

Rules of Precedence for Arithmetic Operators

Operator Rule of Precedence Unary + and – Positive (+) and negative (-) signs are evaluated first, e.g., +2 or -Salary. ^ Exponentiation (^) is performed next, e.g., x^y, that is x raised to the power of y.Note: If x is negative, y must be an integer. * and / Multiplication (*) and division (/)…
Read more

Arithmetic Expressions

Arithmetic expressions use arithmetic operators to combine operands (typically value expressions). When evaluated, these arithmetic expression yield a numeric result, if possible. Operator Meaning + Positive sign (unary +); addition – Negative sign (unary -); subtraction ^ Exponentiation * Multiplication / Division Note: If the ^ character is unavailable, you can substitute **. The standard…
Read more

Multi-Language Support

Customizing applications for languages other than English In Zim applications, some information that appears in the user interface, such as data masks, and error and processing messages, is language dependent. Zim provides tools to handle these dependencies and to make the application appear to the application user in languages other than English. A single application…
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

Expressions and the $Null Property

An object that has not been assigned a value, or whose value is unknown, is considered to be $Null. For example, at the start of an application session, global variables do not have an assigned value, so each is considered $Null. If the name of an object with an unassigned or unknown value is used…
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

Special Expression Formats

Expressions can be combined in special ways to produce concise program statements that nevertheless have tremendous power and flexibility. The special expression formats are WHERE expression format assignment expression format grouped expression format case expression format How To Use the WHERE Expression Format A WHERE subcommand can be appended to a value expression to control…
Read more

en_CAEnglish