Category: Data Types

The Original Internet Language

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

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

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

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

Character Data Types

Each character data type represents a particular combination of storage space usage and letter case treatment. ALPHA, VARALPHA, CHAR, and VARCHAR values can contain letters, digits, spaces, symbols, and hexadecimal codes. Character Data Type Characteristics Data Type Data Length Treatment of Letter Case ALPHA Fixed (padded with trailing blanks if necessary) Case insensitive (but, case…
Read more

Number Data Types

INT, LONGINT, and VASTINT represent varying sizes of numbers and varying storage space usage, but otherwise receive identical treatment by the software. INT, LONGINT, and VASTINT values can contain only digits. The NUMERIC data type represents numbers stored in character form and may therefore contain a leading sign (+, -) or an embedded decimal point,…
Read more

The Date Data Type

DATE indicates that a value consists of eight digits representing a date in the form YYYYMMDD. For example, 19990821 is August 21, 1999. Note: If you are using Zim in conjunction with a third-party SQL database engine, the format of dates can differ from that described here. In such cases, your code must avoid making…
Read more

How To Use Data Types

The following are the character data types: alpha varalpha char varchar The following are the numeric data types: int longint vastint numeric The following is the other data type: date Alpha Data Type A character string of fixed length (uses a pre-defined amount of storage space). Pads with trailing blanks if necessary. Case insensitive in…
Read more

en_CAEnglish