Changes between Version 5 and Version 6 of EscapeSequencesExample
- Timestamp:
- 05/30/10 20:14:50 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EscapeSequencesExample
v5 v6 16 16 import std.stdio; 17 17 18 const char[]backslashWYSIWYG = `\`;19 const char[]quoteWYSIWYG = `'`;20 const char[]doubleQuoteWYSIWYG = `"`;18 const string backslashWYSIWYG = `\`; 19 const string quoteWYSIWYG = `'`; 20 const string doubleQuoteWYSIWYG = `"`; 21 21 22 const char[]doubleQuoteReg = "\"";23 const char[]quoteReg = "\'";24 const char[]backslashReg = "\\";22 const string doubleQuoteReg = "\""; 23 const string quoteReg = "\'"; 24 const string backslashReg = "\\"; 25 25 26 26 const char quoteChar = '\''; 30 30 void main() 31 31 { 32 writef (cast(char[]) (doubleQuoteReg ~ "That's what I said!" ~ doubleQuoteReg ~ \n\0));32 writefln(doubleQuoteReg ~ "That's what I said!" ~ doubleQuoteReg); 33 33 } 34 34 }}} 39 39 || Author || jcc7 || 40 40 41 == Caveat ==42 43 This main part of this program can be simplified:44 45 {{{46 #!d47 void main()48 {49 writefln(doubleQuoteReg ~ "That's what I said!" ~ doubleQuoteReg);50 }51 }}}