12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IntroductionA string literal is zero or more characters enclosed in double (“) or single (’) quotes.Note: For C/C++ programmers: Except for the use of single quotes, string literals have thesame syntax as in C and C++.Here are examples of string literals:"My name is Hal"’My name is Hal’’"Hi there", he said’"3.14""Hello, world\n"In these examples, the first and second strings are identical.The backslash character \ can be used to introduce an escape sequence, which stands for acharacter which cannot be directly expressed in a string literal.Escape sequences in stringsEscape sequence\n\t\\\”\’\b\f\r\xhh\oooStands forNewlineTabBackslash character (\)Double quote (")Single quote (’)BackspaceForm feedCarriage returnThe character whose ASCII code is hh, where hh is a sequence of twohexadecimal digits.The character whose ASCII code is ooo, where ooo is a sequence of one, two,or three octal digits.Here are examples of string literals using escape sequences:222I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!