Setting a CRLF (carraige return + line feed) in string
Looked through the reference manual, the entire forum, and even Google . . . anyone know how to create a constant for CRLF (carriage return + line feed)? I did see something on the forum from 2009, but it doesn't seem to work correctly.
According to the 2009 forum entry, this is how to define a CRLF constant:
#const $CRLF$ = "%0D%0A"
Set Variable %LOGTEXT% to "Zeile1$CRLF$Zeile2"
Doesn't seem to work in SB 8.1.
The whole idea behind needing this is to string a list of values into one variable, each value separated by a CRLF in the variable so that when the variable is displayed in a Display Message Box, it displays a nice vertical list.
1 Attachment(s)
Re: Setting a CRLF (carraige return + line feed) in string
Hi Jerry,
The \n macro should do what you are looking for.
For example:
Set Variable %LOGTEXT% to "Zeile1\nZeile2\nZeile3\nZeile4"
See attached screenshot.
Does this help?
Friedrich
Re: Setting a CRLF (carraige return + line feed) in string
Thanks you for the response. Interesting. I did a search through the Developer's Guide PDF and didn't see any reference to a \n macro. Tricks of the trade, I suppose.
Re: Setting a CRLF (carraige return + line feed) in string
Jerry,
Glad it's working fine.
BTW, I agree. It's nearly impossible to find that \n macro trick in the documentation :( Currently, we are working hard on improved documentation and I'll make sure we improve this particular area. The SetupBuilder code has moved ahead faster than the documentation and examples :(
Friedrich