Welcome to %s forums

BrainModular Users Forum

Login Register

How to embed a carriagle return/line feed in a scripted output string?

I need help on a Patch
Post Reply
ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 28 Aug 2016, 22:45

Any suggestions as to how to embed at a carriage return/line feed in the string output of a script?

Something like this:

s:= 'SET_VAR DROP_FILENAME "C:Hollyhockspatchesmake_tr_selector_button_top.pat"' +<CR/LF> +
'SET_VAR DROP_SHORT_FILENAME "make_tr_selector_button";

I've tried adding #13#10 between the two string segments but only the first part of the string is recognised by hh.

Thanks!
Regards,

Scott

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 29 Aug 2016, 03:44

Did you use +, e.g.,
str := 'Newline' + #13 + #10

I haven't tried this, but it'd be the first thing I'd try...
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 31 Aug 2016, 23:19

Thanks Shawn. Not sure if I tried putting a "+" between the hash signs. I'll give it a try.
Regards,

Scott

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 01 Sep 2016, 04:39

A quick test using either of the following work:
trace ('line1'+#13+#10+'line2');
trace ('line1'+#13#10+'line2');

Maybe it depends where you're using it?
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests