WYSIWYG string still limited

Swer swer at yoyocowo.com.nb
Sat Dec 15 13:08:21 PST 2007


r"abc\s*$"  ok
r"abc"s*$"  fail

 `abc"s*$`  ok
 `abc`s*$`  fail

as a improvement from C/C++, D use [`] as WYSIWYG string delimiter easy to 
use, but still not enough. why dont perfect solution to WYSIWYG string. perl 
has one, but not fit for D. My poposal below.

pargam(delimiter, "[[WYSIWYG]]");

const char [] somestr = [[WYSIWYG]]
You can use write any some here.
const char [] code_demo1 = `demo1`;
const char [] code_demo2 = r"demo2";
[[WYSIWYG]]

ofcause you can replace the delimiter from "[[WYSIWYG]]" to any string you 
like. 





More information about the Digitalmars-d mailing list