$year

Extracts the year number associated with a specified date value.

Syntax

$year(date)

Parameters

datea data, or an expression that evaluates to a date, in the form YYYYMMDD

Return Value

Character string.

Comments

This function extracts day information from standard date values. Date is often the system variable $Date.

Example

$year(19981225)

Evaluates to “1998”.

$year($date + 7)

Evaluates to “1999” when $Date is 19991225.

See Also

$addyears

$Date

$day

$dayname

$month

$monthname

$weekday

About Data Types

About Functional Expressions

$iszimname

Tests if a character string is a valid object name.

Syntax

$iszimname(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is valid zim object name.

Example

$iszimname(189)

Evaluates to $False.

$iszimname("Fields")

Evaluates to $True.

See Also

$isalphabetic

$isalphanumeric

$isdate

$isdigit

$islower

$isnumber

$isupper

About Character Literals

About Functional Expressions

SET PAGEWIDTH

Controls the overall width of pages output by the LIST command.

Syntax

SET PAGEWIDTH num

Parameters

numNum specifies, in characters, the width of an output page.
Num can be
an integer constant (e.g., 15, 200).
a variable, form field, menu item, or parameter that evaluates to an integer.

Comments

The PAGEWIDTH option is set to 80 characters by default.
If the data generated by LIST or SELECT exceeds the current PAGEWIDTH, the software assumes that the output device wraps data onto subsequent lines.

Example

set output printer

set pause on

set pagesize 40

set pagewidth 120

list all Employees sorted by Department

Here, the SET PAGEWIDTH command (together with SET PAGESIZE) sets LIST output for printing in the landscape orientation.

See Also

SET HEADINGS

SET PAUSE

$weekday

Determines the day-of-the-week number associated with a specified date value.

Syntax

$weekday(date)

Parameters

datea date, or an expression that evaluates to a date, in the form YYYYMMDD

Return Value

Character string.

Comments

This function extracts day information from standard date values. Date is often the system variable $Date.

Example

$weekday(19981225)

Evaluates to “7”.

$weekday($date+7)

Evaluates to “7” when $Date is 19981225.

See Also

$addmonths

$Date

$day

$dayname

$month

$monthname

$year

About Data Types

About Functional Expressions

$isnumber

Tests if an expression produces a valid number after its evaluation.

Syntax

$isnumber(expression)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is a valid number.

Example

$isnumber(2+3)

Evaluates to $True.

$isnumber($trim(LastName))

Evaluates to $False.

See Also

$isalphabetic

$isalphanumeric

$isdate

$isdigit

$islower

$isupper

$iszimname

About Character Literals

About Functional Expressions

$toord

Converts a character into its ordinal number value.

Syntax

$toord(char)

Parameters

chara character string, or any expression that evaluates to a character string

Return Value

Number.

Comments

Each of the decimal numbers from 0 to 255 represents a character output by your workstation. $Toord converts the given character to the corresponding decimal number.

If char contains more than one character, only the first character is converted.

The number produced by the $toord function can be converted back to a character by the $tochr function.

Example

$toord(" ")

Evaluates to 32 (on ASCII machines).

$toord(tochr(anynumber ))

Evaluates to any number.

See Also

$toalpha

$tocharacter

$tochr

$todate

About Functional Expressions

Number Literals

SET PAGESIZE

Controls the overall length of pages output by the LIST command.

Syntax

SET PAGESIZE num

Parameters

numNum specifies, in lines, the height of an output page.
Num can be:
an integer constant (e.g., 15, 200);
a variable, form field, menu item, or parameter that evaluates to an integer.

Comments

The PAGESIZE option is set to 24 lines by default.

The PAGESIZE option should be adjusted to suit the current output device (e.g., 66 lines for a printer, 24 lines for a terminal screen).

Example

set output printer
set pause on
set pagesize 40
set pagewidth 120
list all Employees sorted by Department

Here, the SET PAGESIZE command (together with SET PAGEWIDTH) sets LIST output for printing in the landscape orientation.

See Also

LIST

SET HEADINGS

SET PAGEWIDTH

SET PAUSE

$isupper

Tests if the letters in a character string are uppercase.

Syntax

$isupper(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is uppercase, i.e., contains no lowercase letters.

Example

$isupper("aBC")

Evaluates to $False.

$isupper(43)

Evaluates to $True.

See Also

$isalphabetic

$isalphanumeric

$isdate

$isdigit

$islower

$isnumber

$iszimname

About Character Literals

About Functional Expressions

$isalphabetic

Tests if a character string contains only letters.

Syntax

$isalphabetic(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is alphabetic.

Example

$isalphabetic("abc")

Evaluates to $True.

$isalphabetic("abc1")

Evaluates to $False.

See Also

$isalphanumeric

$isdate

$isdigit

$islower

$isnumber

$isupper

$iszimname

Character Literals

Functional Expressions

$islower

Tests if the letters in a character string are lowercase.

Syntax

$islower(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is lower case, i.e., contains no uppercase letters.

Example

$islower("Abc")

Evaluates to $False.

$islower(34)

Evaluates to $True.

See Also

$isalphabetic

$isalphanumeric

$isdate

$isdigit

$isnumber

$isupper

$iszimname

About Character Literals

About Functional Expressions

pt_BRPortuguese