Results 1 to 4 of 4

Thread: NewLine identifier

  1. #1
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post NewLine identifier

    Hey,

    I am looking to use a string to store lots of debug information, but i want it to be able to type each on a newline.

    example:
    the coma represent the newline identifier

    S:= Walked to tree , Cut tree , Walked to Bank , Banked

    Walked to tree
    Cut tree
    Walked to Bank
    Banked

    how i want it all to be store is in a single string per RS character.

    i know that /n or \n works in other languages but whats the equivalent to use in Simba?

  2. #2
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Doesn't each writeln get its own line? so...

    Code:
    var S: String;
    
    S := [Walked to tree , Cut tree , Walked to Bank , Banked];
    for i := 0 to High(S) do
      writeln(S[i]);
    Unless I am missing something that you are asking?

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    #13#10 is "Enter" for Windows
    #10 is "Enter" for Linux

    Example: S:= 'Walked to tree'#13#10'Cut tree'#13#10'Walked to Bank'#13#10'Banked';

  4. #4
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    #13#10 is "Enter" for Windows
    #10 is "Enter" for Linux

    Example: S:= 'Walked to tree'#13#10'Cut tree'#13#10'Walked to Bank'#13#10'Banked';
    awesome, thats just what i was looking for thanks

Thread Information

Users Browsing this Thread

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

Posting Permissions

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