Category: Constructing Expressions

The Original Internet Language

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

Conversion Between Data Types

Zim performs conversions and operations between data types in a different manner than other application development languages. The rules for conversions are embedded in Zim itself, and when performing conversions or comparisons, these rules govern how the different data types are handled. Implicit Conversions In general, when you write an expression, you can use objects…
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

Implicit Data Types of Literals

Literals express values outside of pre-defined application objects. Because literals have no definition in the Object Dictionary, the software assumes a data type for each literal. This implicit data type is determined based on the characters contained in the value, and on whether or not the value is enclosed in quotation marks. Literals that are…
Read more

Data Types and the Use of Database Indexes

The software automatically determines if it can use indexes when it looks for records in the database. If the software cannot use an available index, each record in the record-containing objects must be scanned (a potentially slower process). In some cases, the software cannot use an available index if the data type of the indexed…
Read more

Data Types and Storage of Values

ALPHA/CHAR and VARALPHA/ VARCHAR Values If an ALPHA or CHAR object is assigned the value abc///// (with five trailing blanks), it is stored as abc///// (fixed length value). If a VARALPHA or VARCHAR object is assigned the value abc/////, it is stored as abc without any trailing blanks, but with an indicator that gives the…
Read more

Truth Tables

For Boolean Operators: AND, OR, XOR, NOT For Conditional Operators: [NOT] BETWEEN, [NOT] IN, [NOT] LIKE, IS [NOT] $NULL Truth Table for a Boolean AND Expression expression1 AND expression2 If the conditional expressions linked by AND are both TRUE, then the Boolean expression is TRUE. both FALSE, then the Boolean expression is FALSE. one TRUE…
Read more

en_CAEnglish