<div dir="ltr">Hi Julian,<div><br></div><div>I think this is a bug in expr code. Incidentally I just recently noticed it as well. I have not had a chance to find the bug yet, but as a work around if you add spaces before and after the variables that have the $0, your patch should open fine.  I am listing your patch below which I edited accordingly and it opens fine. Let me know if you are still seeing a problem.</div><div><br></div><div>Cheers,</div><div>Shahrokh</div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#N canvas 950 538 450 300 12;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#N canvas 961 878 744 300 something 1;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">floatatom</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> 302 68 5 0 0 0 - - -;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">floatatom</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> 517 67 5 0 0 0 - - -;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 67 35 inlet~;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 87 98 </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">fexpr</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">~ if((CR_\$0 > HT_\$0) \, CG_\$0 = $</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">f3</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">* CG_\$0 + (1-$</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">f3</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)*$</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">x1</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> \, 0) \; if((CA_\$0 > HT_\$0) \, CG_\$0 = $</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">f2</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">* CG_\$0 + (1-$</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">f2</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)*$</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,215,215)">x1</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> \,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">0), f 62;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X connect 0 0 3 1;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X connect 1 0 3 2;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X connect 2 0 3 0;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X restore 88 89 pd something;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 250 59 v CG_\$0;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 83 46 noise~;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 252 95 v CA_\$0;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X obj 248 131 v CR_\$0;</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#X connect 2 0 0 0;</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 19, 2020 at 5:08 PM <<a href="mailto:pd-list-request@lists.iem.at">pd-list-request@lists.iem.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Pd-list mailing list submissions to<br>
        <a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmM7sIIF_$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmM7sIIF_$</a> <br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:pd-list-request@lists.iem.at" target="_blank">pd-list-request@lists.iem.at</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pd-list-owner@lists.iem.at" target="_blank">pd-list-owner@lists.iem.at</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Pd-list digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. fexpr and dollar zero weirdness (Julián Villegas)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 20 Jul 2020 08:57:24 +0900<br>
From: Julián Villegas <<a href="mailto:villegas.julian@gmail.com" target="_blank">villegas.julian@gmail.com</a>><br>
To: <a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a><br>
Subject: [PD] fexpr and dollar zero weirdness<br>
Message-ID: <<a href="mailto:E5F4A1BC-CDD9-4950-B20A-E4371A6E6D1B@gmail.com" target="_blank">E5F4A1BC-CDD9-4950-B20A-E4371A6E6D1B@gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi list,<br>
<br>
I have a program that uses [fexpr~] and values ending in $0, similar to the program in the attachment.<br>
When I create the program, it works just as intended. I then save it and close Pd, but when I open the program again some of the “$0" are replaced  by “_\$0” breaking the program (as in the pdf I’m also sending, but I’m not sure if you would be able to see it). I can easily edit it again, but every time I reopen the program I have to do the same.<br>
<br>
I’m using Pd 0.51.0 on macOS 10.15.5 (Catalina). Am I doing something wrong? is this a bug? <br>
<br>
Additionally, I also have problems when open programs in two different screens: I connect my laptop to a larger screen since my eyes are not so good anymore. If I edit the program in the large screen and save it, next time I try to open it, Pd crashes even before opening the patch. <br>
By reading the Pd patch on a text editor, I have detected that this is caused by negative coordinates given to the canvas. I can easily change those by “0” and the program opens again correctly. Is this something I should report as a bug? the thing is that I don’t have a reproducible examples and I think this is highly dependent on the screen setup. However, may be making sure that canvases are not saved with negative coordinates could fix the problem.<br>
<br>
<br>
Thank you for your advice,<br>
<br>
<br>
Julian.<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: dollar0weirdness.pd<br>
Type: application/octet-stream<br>
Size: 519 bytes<br>
Desc: not available<br>
URL: <<a href="https://urldefense.com/v3/__http://lists.puredata.info/pipermail/pd-list/attachments/20200720/f480a8c0/attachment.obj__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmJ0yKB6x$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://lists.puredata.info/pipermail/pd-list/attachments/20200720/f480a8c0/attachment.obj__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmJ0yKB6x$</a> ><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: Screen Shot 2020-07-17 at 16.08.32 PM.pdf<br>
Type: application/pdf<br>
Size: 81544 bytes<br>
Desc: not available<br>
URL: <<a href="https://urldefense.com/v3/__http://lists.puredata.info/pipermail/pd-list/attachments/20200720/f480a8c0/attachment.pdf__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmHKmFt25$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://lists.puredata.info/pipermail/pd-list/attachments/20200720/f480a8c0/attachment.pdf__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmHKmFt25$</a> ><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Pd-list mailing list<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a><br>
to manage your subscription (including un-subscription) see<br>
<a href="https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmM7sIIF_$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!Qjzha_s4GuePW0RPaxcXWPGtEn1p9tKU220rAT-4XVc7bjH5RjIsmM7sIIF_$</a> <br>
<br>
<br>
------------------------------<br>
<br>
End of Pd-list Digest, Vol 184, Issue 36<br>
****************************************<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr">Shahrokh Yadegari</div><div dir="ltr">Professor, Music Department<br>University of California, San Diego<br>Director, Sonic Arts R&D and IDEAS<br>Qualcomm Institute</div><div dir="ltr">Email: <a href="mailto:sdy@ucsd.edu" style="color:rgb(17,85,204)" target="_blank">sdy@ucsd.edu</a><br>Web: <a href="http://yadegari.org/" style="color:rgb(17,85,204)" target="_blank">http://yadegari.org</a></div></div></div>