Wiki source for KeyPgOpPpEscape

Show raw source

{{fbdoc item="title" value="Operator ! (Escaped String Literal)"}}----
Explicitly indicates that a string literal should be processed for escape sequences.

{{fbdoc item="syntax"}}##
{{fbdoc item="param"}}
The preprocessor escaped string operator
The string literal containing escape characters

{{fbdoc item="desc"}}
This operator explicitly indicates that the string literal following it (wrapped in double quotes) should be processed for escape sequences. This a preprocessor operator and can only be used with string literals at compile time.

The default behavior for string literals is that they not be processed for escape sequences. ##[[KeyPgOptionescape|Option Escape]]## can be used in the //[[CompilerOptlang|-lang fblite]]// dialect to override this default behaviour causing all strings to be processed for escape sequences.

Use the [[KeyPgOpPpNoescape|$ operator (Non-Escaped String Literal)]] operator to explicitly indicate that a string should not be processed for escape sequences.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/prepro/escape.bas"}}%%(freebasic)
print "Some escape sequence examples:"
print !"1.\tsingle quote (\\\') : \'"
print !"2.\tdouble quote (\\\") : \""
print !"3.\tbackslash (\\\\) : \\"
print !"4.\tascii char (\\65): \65"

'' Some escape sequence examples:
'' 1. single quote (\') : '
'' 2. double quote (\") : "
'' 3. backslash (\\) : \
'' 4. ascii char (\65): A

{{fbdoc item="diff"}}
- New to ""FreeBASIC""

{{fbdoc item="see"}}
- [[KeyPgOpPpNoescape|Operator $ (Non-Escaped String Literal)]]
- ##[[KeyPgOptionescape|Option Escape]]##
- [[CatPgPreProcess|Preprocessor]]
- [[ProPgLiterals|Literals]]
- [[TblEscapeSequences|Escape Sequences]]

{{fbdoc item="back" value="CatPgOpPrepro|Preprocessor Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}}
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki phatcode