Character expressions

Character expressions return character strings.

Maximum length of a character string is the same as the maximum length of the CHAR data type (65,534 bytes).

String

one or more characters enclosed into a pair of single (') or double (") quotation marks (possible terms are a character string, a quoted string, or a string literal)

Function

a function which returns exactly one CHAR or VARCHAR value

Named value

a variable of CHAR, VARCHAR, or compatible data type, a member of a record, or an element of an array

Sub-string[first, last]

(optional) a pair of integer expressions that can follow a character expression (specifying a sub-string)

Format string

a formatting mask to specify how to display the returned value

The first value of the sub-string[first, last] cannot be larger that the last one. Both values must be positive and cannot exceed the string length or the receiving data type. For example, name[1,4] specifies the first four characters of a program variable called name.

Character expressions cannot contain values of TEXT data type (except in the NULL test or as a WORDWRAP operator within a PRINT statement).

If a character expression contains a value of a data type different from CHAR, STRING, or VARCHAR, this value will be converted to a character string.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.