logo


70.4.0 String Functions


Here are the String functions that you can use in STATIC:

:

String Functions

Function

Effect

Example

String

Converts a numeric, date, or time value into a character string.

Format can be a string or a number. See the 4D Manual for details

String (numeric value; format)

String (date value; format)

String (time value; format)

Substring

Returns a portion of a character string, beginning and ending at the positions of the string that you designate. This means that you have to pass three arguments to the Substring function: the string of characters to be evaluated, the position to begin reading the string, and the number of characters you want to read.

Substring(“American”;1;4) returns “Amer”

Substring([Aircraft]Company;1;4) returns the first four characters of the name of the company that owns the aircraft.

Uppercase

Returns a text string in all CAPITAL LETTERS.

Uppercase (“American Airlines”) returns AMERICAN AIRLINES

Uppercase ([Aircraft]Company) returns AMERICAN AIRLINES

Lowercase

Returns a text string in all lowercase letters.

Lowercase (“American Airlines”) returns american airlines

Lowercase ([Aircraft]Company) returns american airlines

Ascii

Returns the ASCII code for the first character of a string.

Ascii (“P”) returns 80.

Ascii (“Papa”) also returns 80.

Char

Returns the character that the ASCII code represents.

Char(80) returns the letter P.

Char(9) returns a Tab.

Note: As you can see, Ascii and Char are opposites of each other.



Harrowex Pty Ltd
http://www.hxmedical.com
Voice:+ 61 4 27 344 279
Fax: +61 3 52 439 019
static@hxmedical.com