cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Translate the entire conversation x

String issue with carriage return (new line) between Mathcad Prime version 10.0.1 and 11.0.1

LarryJ
10-Marble

String issue with carriage return (new line) between Mathcad Prime version 10.0.1 and 11.0.1

Why doesn’t Mathcad Prime 11.0.1 no longer accept ASCII code [13] for carriage return (new line)?

It appears to work in version 10.0.1 but not in 11.0.1. Is this true for everyone else or just me?

I have both versions on the same computer--is there something I am missing? 

 

LarryJ_0-1762038888849.png

 

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald IV
(To:LarryJ)

Yes, it is true for everyone else.

 

There is a workaround - use 133 instead of 13.  But if you want to write such strings to a file, take note of Werner's comments near the end of the following thread.

 

https://community.ptc.com/t5/Mathcad/Problem-Report-newline-character-no-longer-works-in-a-string/m-p/1033331#M218687

 

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald IV
(To:LarryJ)

Yes, it is true for everyone else.

 

There is a workaround - use 133 instead of 13.  But if you want to write such strings to a file, take note of Werner's comments near the end of the following thread.

 

https://community.ptc.com/t5/Mathcad/Problem-Report-newline-character-no-longer-works-in-a-string/m-p/1033331#M218687

 

Stuart

Thank you so much for the quick informative response. I had a Prime number worksheet that displays the results which needs the CR for the output otherwise the results go off the paper (see attached)

StuartBruff
23-Emerald IV
(To:LarryJ)

Neat.  I've also used the string breaking for similar purposes ... IIRC, prime numbers were such a use and a few OEIS sequences.

 

2025 11 02 A.png

 

  • Right justification without a monospaced font looks silly, and left justification can look a bit ragged with a proportional font.
  • The strreplace wasn't needed; a strjoin on ", " would have sufficed, but I was testing a modified strreplace function.
  • The string justification functions have wider applicability than just sequences.  Where would cowsay be without it?

 

Stuart

Announcements

Top Tags