Operators and Functions

Index
TurboDB Components
    TTdbDataSet
    TTdbTable
    TTdbBatchMove
Turbo Database
    Overview
    Colum Data Types
    Queries
    Operators and Functions
    Working with Indexes
    Automatic Linking
    Working with Link and Relation Fields
    Shared Tables
    Table Locks
    Data Security
TurboDB Tools
    TurboDB Workbench
    TurboDB Data Exchange
    dataWeb Builder
    Visua Data Publisher
Frequently Asked Questions

[prev][next]

Reference

Arithmetic Operators and Functions

Operators

+ Addition
- Substraction
* Multiplication
/ Real division
div Integer division
mod Remainder

Comparisons

< less
<= less or equal
= equal
>= greater or equal
> greater
less less
is equal
greater greater
<> not equal
from...upto range

Functions

Abs(X: Double): Double Returns the absolute value of the argument, X.
ArcTan(X: Double): Double Returns the arctangent of a given Double X.
Cos(X: Double): Double Returns the cosine of the angle X, in radians.
Exp(X: Double): Double Returns the value of e raised to the power of X, where e is the base of the natural logarithms.
Frac(X: Double): Double Returns the fractional part of the argument X.
Int(X: Double): Double Returns the integer part of X, that is, X rounded toward zero.
Log(X: Double): Double Returns the natural log of a real expression.
Round(X: Double): Double Returns the value of X rounded to the nearest whole Double.
Sin(X: Double): Double Returns the sine of the angle in radians.
Sqrt(X: Double): Double Returns the square root of X.

String Operators and Functions

Operators

+ concatenation

Comparisons

< less
<= less or equal
= equal
>= greater or equal
> greater
less less
equal equal
greater greater
<> not equal
like case insensitve correspondance to mask containing jokers, e.g. 'Smith' like 'sMIth', 'Smith' like 'Sm*', 'Smith' like 'Smit?' (all true)

Functions

Arguments in brackets are optional.

Asc(c: Character): Double Returns the ordinal value of a character.
Chr(n: Double): Character Returns the character for a specified ASCII value.
Exchange(Source, From, To: String): String Replaces all occurrences of From in Source by To and returns the modified string.
FillStr(Source, Filler: String; Len: Double): String Fills the Source with the Filler up to the given Length and returns the result.
LeftStr(Source: String; Len: Double): String Return the left substring of source with given length.
Length(Source: String) Return the count of characters in Source.
Lower(Source: String): String Returns the string in lowercase.
LTrim(Source: String): String Returns Source without any leading white-space.
MemoStr(Memo: MemoField): String Returns the first 255 characters of the content of the memo field in the current record.
NTimes(Source: String; Count: Double): String Returns a string that repeats Source Count times.
Pos(SubStr, Source: String): String Returns the position of SubStr in Source or 0, if SubStr is not contained in Str.
RightStr(Source: String; Len: Double): String Returns the Len last characters of Source.
RTrim(Source: String): String Returns Source without any trailing white-spaces.
Scan(SubStr, Source: String): Double Returns the Double of occurences of SubStr in Str.
Str(Num: Double[; Width, Precision: Double]): String Returns the alphanumeric representation of Num with given Width and Precision. Width=1 means as needed.

Date and Time Operators and Functions

All numeric operators can equally be used for date and time values. All date values are treated like the Double of days since 1/1/0000. Time values stand for the Double of minutes since midnight. This way Date2 - Date1 results in the Double of days from Date1 to Date2. Time2 - Time1 returns the Double of minutes from Time1 to Time2. Beyond the numeric operators and functions there are also special date and time functions:

DateStr(Date: Double): String Returns the string representation of a date.
Day(Date: Double): Double Extracts the day out of a date.
DayOfWeek(Date: Double): String Returns the week-day of the date as string.
Month(Date: Double): Double Extracts the month out of a date.
Now: Double Returns the current time.
TimeStr(Time: Double): String Returns the string representation of a time value.
Today: Double Returns the current date.
Val(Str: String): Double Returns the numeric value from a date/time string.
Week(Date: Double): Double Returns the Double of the week in the current year.
Year(Date: Double): Double Extracts the year out of a date.

[prev][next]

Last updated on 11/19/2000. Copyright (c) 2000 by dataWeb GmbH, Aicha, Germany. Turbo Database and TurboDB Components are products by dataWeb - the manufacturers of RAD tools for the Web. Please send your hints, questions and comments to Peter Pohmann.