digitalmars.D - Multiline string constants
- Andrew Fedoniouk (38/38) Apr 14 2005 Take a look on this code:
- Ant (17/65) Apr 14 2005 this is valid:
- jicman (15/80) Apr 14 2005 While we're on this subject, it would be nice to that r" be exactly what...
- Thomas Kuehne (1/1) Apr 14 2005 http://digitalmars.com/d/lex.html -> "alternate form of wysiwyg"
- Andrew Fedoniouk (3/5) Apr 14 2005 Thanks, guys.
Take a look on this code: (this ~= new HtmlPanel()).load( "<HTML><H1 padding=3px back-color='edit dialog'>H1:This is <I>HTML text</I> loaded into <B>HTMLPanel</B> - simple non scrollable HTML container.</H1>" "<P>Image:<IMG src='c:/test.png'/> </P>" "<P><CODE>code example;</CODE></P>" "<P>And here goes the Table:</P>" "<TABLE cellspacing=10px cellpadding=10px padding=10px border-width=1px border-style=solid border-color=dialog-shadow >" "<TR>" "<TD width=30%>one: <INPUT type=text value='hello world' width=100px /></TD>" "<TD>two</TD><TD width=40 back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>1</TD>" "</TR>" "<TR>" "<TD border='1px solid dialog-shadow'>three three</TD><TD>four</TD><TD back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>2</TD>" "</TR>" "<TR>" "<TD colspan=2 back-color='dialog-light dialog-shadow'>colspan=2</TD><TD back-color='dialog-light dialog-light scrollbar dialog-shadow'>3</TD>" "</TR>" "</TABLE>" "<P>Hyperlink test: <A href='http://terrainformatica.com'>Terra Informatica</A></P>" "</HTML>"); Ugly, isn't it ? It would be just nice if it will be possible to say this ~= new (HtmlPanel()).load( <+ my multiline string constant +> ); PHP does have something like this. But D is not PHP and PHP is not D.
Apr 14 2005
Andrew Fedoniouk wrote:Take a look on this code: (this ~= new HtmlPanel()).load( "<HTML><H1 padding=3px back-color='edit dialog'>H1:This is <I>HTML text</I> loaded into <B>HTMLPanel</B> - simple non scrollable HTML container.</H1>" "<P>Image:<IMG src='c:/test.png'/> </P>" "<P><CODE>code example;</CODE></P>" "<P>And here goes the Table:</P>" "<TABLE cellspacing=10px cellpadding=10px padding=10px border-width=1px border-style=solid border-color=dialog-shadow >" "<TR>" "<TD width=30%>one: <INPUT type=text value='hello world' width=100px /></TD>" "<TD>two</TD><TD width=40 back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>1</TD>" "</TR>" "<TR>" "<TD border='1px solid dialog-shadow'>three three</TD><TD>four</TD><TD back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>2</TD>" "</TR>" "<TR>" "<TD colspan=2 back-color='dialog-light dialog-shadow'>colspan=2</TD><TD back-color='dialog-light dialog-light scrollbar dialog-shadow'>3</TD>" "</TR>" "</TABLE>" "<P>Hyperlink test: <A href='http://terrainformatica.com'>Terra Informatica</A></P>" "</HTML>"); Ugly, isn't it ? It would be just nice if it will be possible to say this ~= new (HtmlPanel()).load( <+ my multiline string constant +> ); PHP does have something like this. But D is not PHP and PHP is not D.this is valid: void main() { printf("hello there and over there and to the left\n"); } produces hello there and over there and to the left Ant
Apr 14 2005
While we're on this subject, it would be nice to that r" be exactly what is suppose to be. For example, char[] str; str = r" many many lines to add and more and even more and end it."; This would be nice. Python has the """ which ends with """ and anything in between is a string. But, r" should be Ant says...Andrew Fedoniouk wrote:Take a look on this code: (this ~= new HtmlPanel()).load( "<HTML><H1 padding=3px back-color='edit dialog'>H1:This is <I>HTML text</I> loaded into <B>HTMLPanel</B> - simple non scrollable HTML container.</H1>" "<P>Image:<IMG src='c:/test.png'/> </P>" "<P><CODE>code example;</CODE></P>" "<P>And here goes the Table:</P>" "<TABLE cellspacing=10px cellpadding=10px padding=10px border-width=1px border-style=solid border-color=dialog-shadow >" "<TR>" "<TD width=30%>one: <INPUT type=text value='hello world' width=100px /></TD>" "<TD>two</TD><TD width=40 back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>1</TD>" "</TR>" "<TR>" "<TD border='1px solid dialog-shadow'>three three</TD><TD>four</TD><TD back-color='dialog-light scrollbar' border='1px solid dialog-shadow'>2</TD>" "</TR>" "<TR>" "<TD colspan=2 back-color='dialog-light dialog-shadow'>colspan=2</TD><TD back-color='dialog-light dialog-light scrollbar dialog-shadow'>3</TD>" "</TR>" "</TABLE>" "<P>Hyperlink test: <A href='http://terrainformatica.com'>Terra Informatica</A></P>" "</HTML>"); Ugly, isn't it ? It would be just nice if it will be possible to say this ~= new (HtmlPanel()).load( <+ my multiline string constant +> ); PHP does have something like this. But D is not PHP and PHP is not D.this is valid: void main() { printf("hello there and over there and to the left\n"); } produces hello there and over there and to the left Ant
Apr 14 2005
http://digitalmars.com/d/lex.html -> "alternate form of wysiwyg"
Apr 14 2005
Thanks, guys. "Thomas Kuehne" <thomas-dloop kuehne.thisisspam.cn> wrote in message news:d6f3j2-afe.ln1 lnews.kuehne.cn...http://digitalmars.com/d/lex.html -> "alternate form of wysiwyg"
Apr 14 2005