Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

TO-C-LITERAL( ) Convert string to C literal

&pagelevel(3)&pagelevel

Domain: Conversion functions

The TO-C-LITERAL( ) function converts the specified string to a C literal by placing single quotes at the beginning and end of the string and doubling single quotes within the string. The FROM-C-LITERAL( ) function is the inverse of the TO-C-LITERAL( ) function.

Format

TO-C-LITERAL( )

TO-C-LIT( )

STRING = string_expression

Result type

STRING

Input parameters

STRING = string_expression
Designates the expression to be converted.

Result

String literal in the form of a string.

Error messages

No error messages

Example

/A = 'AB''C'
/SHOW-VARIABLE A
A = AB'C 
/B = TO-C-LITERAL(STRING = A)
/SHOW-VARIABLE B
B = 'AB''C' 
/ADD-PASSWORD &(TO-C-LITERAL(A)) 

The command /ADD-PASSWORD ’AB’’C’ is issued.