Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

new line character

how do I add a newline character to the end of a string??

Comments

  • Probably "
    ", it might depend on the usage though.
    Russell Drown
  • I tried using "
    " but it gave me "unexpected unknown token" errors. What I really need is a newline character and a carriage return character which in most other languages that I've used would be represented as "

    ". Has anyone else ran into this problem? Does anyone have a solution or can this not be done using RAPID Strings??
     

    Thanx
  • Try something like this:
     

    str1:="Line11310"+"Line21310"+"Line310";

     

    You can append control characters to string literals with "XX", where XX is the hex value of the control character.

     

    Note that this does not work with instructions like TPWrite, probably only works with write instructuions to files or ports.
    RussD2009-05-29 19:51:34
    Russell Drown