<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>
      <blockquote type="cite">I often create abstractions using $0 as an
        argument, such as [line-seg 1 2 $0], and then $3 in the
        abstraction is the same as $0 in the parent. </blockquote>
      That's a common pattern, yes. Your example doesn't contradict my
      point, though: because [line-seq] can't access the parent $0 *),
      you have to pass it from the outside.</p>
    <p>
      <blockquote type="cite">if you really want, you can export the
        individual $0-values to a text file to be read in the command
        line.</blockquote>
      Please don't. $0 are potentially different every time you open the
      abstraction. Currently, they start with 1000 and increment
      monotonically, but this is really an implementation detail that
      you shouldn't rely upon.<br>
    </p>
    <p>Christof<br>
    </p>
    <p>*) with [iemguts/canvasdollarzero] you can<br>
    </p>
    <div class="moz-cite-prefix">On 12.12.2021 13:28, João Pais wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:e87a1eed-fae9-a877-4c7d-e85b6ba6c0c0@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>you can send something to $0-xxx variables, but you should only
        do it if it makes sense.</p>
      <p>I often create abstractions using $0 as an argument, such as
        [line-seg 1 2 $0], and then $3 in the abstraction is the same as
        $0 in the parent. if you really want, you can export the
        individual $0-values to a text file to be read in the command
        line. But is it necessary?<br>
      </p>
      <div class="moz-cite-prefix"><br>
      </div>
      <blockquote type="cite"
        cite="mid:15b826ae-81a2-93aa-0e74-441e394e9946@christofressi.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        $0 is a unique number that only the abstraction itself knows
        about. Typically you use it to keep things local. Just like you
        can't send a message to [r $0_msg] from another patch, you can't
        do it with "-send", either.
        <p>Just create a new patch, put your abstraction there and add a
          [receive foo] (without $0!) that will send the appropriate
          message to the abstraction. Now you can do</p>
        <pre>$ pd -nogui -send "foo 1"</pre>
        <p>Christof<br>
        </p>
        <div class="moz-cite-prefix">On 12.12.2021 12:16, padovani
          wrote:<br>
        </div>
        <blockquote type="cite"
cite="mid:CA+ZFxkECUx+9KjezTFv6Ow3UW6SMKreM2bLhNPacjOeoQvqGug@mail.gmail.com">
          <meta http-equiv="content-type" content="text/html;
            charset=UTF-8">
          <div dir="ltr">
            <div>Hi,</div>
            <div><br>
            </div>
            <div>I have a patch like <br>
            </div>
            <div><br>
            </div>
            <div>[r $0_msg]</div>
            <div>|</div>
            <div>[print]</div>
            <div><br>
            </div>
            <div>And would like to run Pd from command line (-nogui
              -send "....") and send something to the receive object.</div>
            <div><br>
            </div>
            <div>How can I pass the '$0_msg' name in a way bash and Pd
              understand it?</div>
            <div><br>
            </div>
            <div>Have tried different combinations of quotes and bars,
              but nothing works... :/</div>
            <div><br>
            </div>
            <div>thanks!</div>
            <div>josé<br>
            </div>
          </div>
          <br>
          <fieldset class="moz-mime-attachment-header"></fieldset>
          <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Pd-list@lists.iem.at" moz-do-not-send="true">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
        </blockquote>
        <br>
        <fieldset class="moz-mime-attachment-header"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Pd-list@lists.iem.at" moz-do-not-send="true">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-manageme</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
  </body>
</html>