Ticket #687 ( Pending Customer )

Short Description Way to specify Newline or CR?
Entered By: Michael - Charleston When: 2001-03-05 17:11:14 Build: 2.0.11B GA
Categories Type: Question   Department: Product   Category: SurferScript
Description
Is there a way to specify a newline or carriage return in a 
text variable like:

<TESET var = "Dear User," + NL + "This is to let ...">

The reason I ask is that I have a template with a section of 
code that outputs some information for a web page, then 
pretty much repeats the code section again to create a 
<TEMAIL> message (for non-HTML, plain text only email).  If 
there were some way to append the information to a string 
variable with some newline characters (so the text wasn't 
all in one continuous line) while I was processing the code 
during the first run-through, then I could avoid the 
repetition.
Append By: "Hello....Newman"  When: 2001-03-06 14:08:15  New Status: Pending Customer
Comment
Michael

We have received your ticket and we are researching the 
problem.  Some one will be in touch with you shortly.


Thank you
Append By: Big Kahuna  When: 2001-03-07 14:04:58  New Status: Pending Customer
Comment
Michael, you can code something similar to the following:

<tedeclare var test text 100>
<teset test = "this is the first line<br>this is the second 
line">

When you do a <teshow>...similar to the following:

<teshow "this is the test variable:"+test>

The results are the following:

this is the test variable:this is the first line
this is the second line

Does this help?  If not, please let us know.  Thanks!
 
Append By: WindSurfer  When: 2001-03-07 15:38:01  New Status: Pending Customer
Comment
Actually, what you want to use is the same escape sequences 
that work in Javascript, backslash-n (\n) for linefeed, \t 
for tab...

Or, just emit the text in a section, and format as you want 
it to be.