613-518-1166 info@zimdatabases.com

ZIM Language Reference

$length

< All Topics

$length

Returns the length of a character string.

Syntax

$length(string)

Parameters

string

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

Return Value

Number.

Comments

If string is a complex arithmetic expression, then the result of $length(string) is always 17. Arithmetic expressions are evaluated using the data type vastint so that the largest possible number can always be handled. When converted to a string, a vastint value occupies 17 positions, regardless of its numeric value.

Example

$length(“abcdefgh”)

Evaluates to 8.

$length(5*3)

Evaluates to 17.

 

See Also

About Character Literals

About Functional Expressions

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents