Loading...
Select Version
&pagelevel(3)&pagelevel
Domain: Conversion functions
The FROM-C-LITERAL( ) function converts a C literal to the corresponding string value. The leading C and the single quotes at the beginning and end of the literal are deleted.
FROM-C-LITERAL( ) is the reverse function of TO-C-LITERAL( ).
Format
FROM-C-LITERAL( ) FROM-C-LIT( ) |
STRING = string_expression |
Result type
STRING
Input parameters
STRING = string_expression
Designates a C literal; the identifying C at the beginning of the literal is removed along with the single quotes at the beginning and end of the literal. Double quotes within the string are reduced to single quotes.
Result
String
Error message
SDP0433 GIVEN STRING NOT A C-LITERAL
Example
/B = FROM-C-LITERAL(STRING = 'C''ABC''') /SHOW-VARIABLE B B = ABC /A = 'ABC' /B = FROM-C-LITERAL(STRING = A) SDP0433 GIVEN STRING NOT A C-LITERAL SDPO431 ERROR 'SDPO433' IN BUILTIN FUNCTION 'FROM-C-LITERAL' SDP0239 ERROR DURING EVALUATION OF RIGHT SIDE OF ASSIGNMENT
ABC is not a C literal and can thus not be converted.