Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

IS-C-LITERAL( ) Check C literal

&pagelevel(3)&pagelevel

Domain: String functions/test functions

The IS-C-LITERAL( ) function checks whether the specified string is a C literal and can be converted to a string (using the FROM-C-LITERAL function).

Format

IS-C-LITERAL( )

IS-C-LIT( )

STRING = string_expression

Result type

BOOLEAN

Input parameters

STRING = string_expression
Designates the string expression whose content is to be checked.

Result

TRUE
“string_expression” contains a C literal and can be converted to a string, for example using the FROM-C-LITERAL function.

FALSE
“string_expression” does not contain a C literal.

Error messages

No error messages

Example

/A = 'C''abc'''
/D =IS-C-LITERAL(STRING = A)
/SHOW-VARIABLE D
D = TRUE

/B = C'abc'
/D = IS-C-LITERAL(STRING = B)
/SHOW-VARIABLE D
D = FALSE

/C = '''abc'''
/D = IS-C-LITERAL(STRING = C)
/SHOW-VARIABLE D
D = TRUE