Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SUBLIST-NUMBER( ) Request number of elements in SDF list

&pagelevel(3)&pagelevel

Domain: String functions

The SUBLIST-NUMBER( ) function provides information on how many elements an SDF list contains. An SDF list is a string which is interpreted in accordance with the syntactical rules for operand lists in commands. Evaluation of the string with this function is meaningful only if it has the format ’(<element1>,<element2>,...<elementn>)’, where <element> is a isequence of characters which contain no commas outside pairs of parentheses.
The IS-SDF-LIST( ) function can be used to check whether a string is a list.

Format

SUBLIST-NUMBER( )

LIST = string_expression

Result type

INTEGER

Input parameters

LIST = string_expression
Designates an SDF list.

Result

The number of elements in the SDF list as an integer value

Error messages

SDP0411     STRING EMPTY
SDP0447     THE GIVEN STRING IS NOT A SDF-LIST

Example

/A = SUBLIST-NUMBER('(abc,def,jkl,uvw)')
/SHOW-VARIABLE A
A = 4