The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Return and New Line
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kid

USA
20 Posts

Posted - 05/31/2002 :  6:59:59 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I want to inset a return and new line in a string that will latter become my legend text

I'm using this scrip to build my legend:
(1)loop(ii,1,count){
(2) %A=legend.text$;
(3) %Z=ini.master.legendPlot$(ii)$;
(4) if(ii==1)
(5) legend.text$="\L(1) %Z";
(6) else
(7) legend.text$="%A\L($(ii)) %Z";
(8)}

I try inserting <\r\n> in lines 5 and 7, but then the legend displays the letters rn istead of inserting a new line.

Kid

cpyang

USA
1406 Posts

Posted - 05/31/2002 :  7:03:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
LabTalk is not C, so strings are ok to be multiline, so you can simply


 
(5)legend.text$="\L(1) %Z
";

in other words, strings in labtalk will be treated as is, so you can just put tab and newline directly.

CP


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000