Operators and Functions

Index
Turbo Database
    Overview
    Colum Data Types
    Queries
    Operators and Functions
    Automatic Linking
TurboDB Tools
TurboDB Components
Frequently Asked Questions

[prev][next]

Reference

Arithmetic Operators and Functions

Operators

+Addition
-Substraction
*Multiplication
/Real division
divInteger division
modRemainder

Comparisons

<less
<=less or equal
=equal
>=greater or equal
>greater
lessless
isequal
greatergreater
<>not equal
from...uptorange

Functions

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

String Operators and Functions

Operators

+concatenation

Comparisons

<less
<=less or equal
=equal
>=greater or equal
>greater
lessless
equalequal
greatergreater
<>not equal
likecase 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): DoubleReturns the ordinal value of a character.
Chr(n: Double): CharacterReturns the character for a specified ASCII value.
Exchange(Source, From, To: String): StringReplaces all occurrences of From in Source by To and returns the modified string.
FillStr(Source, Filler: String; Len: Double): StringFills the Source with the Filler up to the given Length and returns the result.
LeftStr(Source: String; Len: Double): StringReturn the left substring of source with given length.
Length(Source: String)Return the count of characters in Source.
Lower(Source: String): StringReturns the string in lowercase.
LTrim(Source: String): StringReturns Source without any leading white-space.
MemoStr(Memo: MemoField): StringReturns the first 255 characters of the content of the memo field in the current record.
NTimes(Source: String; Count: Double): StringReturns a string that repeats Source Count times.
Pos(SubStr, Source: String): StringReturns the position of SubStr in Source or 0, if SubStr is not contained in Str.
RightStr(Source: String; Len: Double): StringReturns the Len last characters of Source.
RTrim(Source: String): StringReturns Source without any trailing white-spaces.
Scan(SubStr, Source: String): DoubleReturns 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): StringReturns the string representation of a date.
Day(Date: Double): DoubleExtracts the day out of a date.
DayOfWeek(Date: Double): StringReturns the week-day of the date as string.
Month(Date: Double): DoubleExtracts the month out of a date.
Now: DoubleReturns the current time.
TimeStr(Time: Double): StringReturns the string representation of a time value.
Today: DoubleReturns the current date.
Val(Str: String): DoubleReturns the numeric value from a date/time string.
Week(Date: Double): DoubleReturns the Double of the week in the current year.
Year(Date: Double): DoubleExtracts the year out of a date.

[prev][next]

Last updated on 6/2/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.