cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
mnf
mnf
Level I

Newline character

Hello,

I would like to simply insert a newline character at the end of each item in an array, being written to file.  Does JMP not recognize '\n'?  If so how would I get it to output

file1

file2

file3

rather than

file1\nfile2\nfile3

for(i=1,i<=length(Files),i++,
	filestring=filestring|| " " || char(Files[i]) || "\n");
f=Save Text File(pypath || "argfile.txt",filestring,mode("replace"));

Thanks!

 

 

3 REPLIES 3
txnelson
Super User

Re: Newline character

The complete list of Escape Characters can be found in the Scripting Guide

     Help==>Books==>Scripting Guide

For your need, \!n is the escape character sequence

Jim
mnf
mnf
Level I

Re: Newline character

Thanks!

Is there any (logical) reason why it is not simply \n, as in many other languages?

txnelson
Super User

Re: Newline character

I am not aware of why JMP implemented a 2 character escape sequence.  Maybe to help with double byte characters.  Maybe someone at JMP may have the logic of their decision.

Jim

Recommended Articles