+ Reply to Thread
Results 1 to 4 of 4

Thread: Setting a CRLF (carraige return + line feed) in string

  1. #1

    Default 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.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,317

    Default 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
    Attached Images Attached Images  

  3. #3

    Default 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.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,317

    Default 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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •