# [PD] Newbie: Dollar sign explanation needed

Sat Oct 25 16:43:18 CEST 2008

```
Hi Afif,

The dollar can have more than one meaning depending on where it is used.

When it is in a message box, like [1 \$1 3 \$2( it behaves as a substitution
operator. The nth element of a list will be substituted in the \$n position
and the list message is passed on. So, if a two element list 2, 4 was
presented to the message box above the result would be a four element
list 1, 2, 3, 4

When it is used in other object boxes in the form \$1 or \$2 etc it becomes
the \$nth parameter of an abstraction. In other words, if you create an
abstraction (separate pd file) called [myabs] and create an instance like
[myabs 10 20 30] then inside  that instance \$1 will have a value of 10,
\$2 a value of 20 and \$3 will equal 30.

A special use is where you declare \$0. This always has a unique value
per patch (or abstraction instance). It can be used to prefix a variable
name so that it is unique. For example, arrays must always have a unique
name. You can create an array called \$0-a in an abstraction, and if you
make several copies of that abstraction the array names will not clash.

On Sat, 25 Oct 2008 15:15:28 +0100
"Arif Driessen" <arifd86 at gmail.com> wrote:

> Hello all.
>
> Since starting Uni this year I have gotten really into Pd! I'm still reading
> up and learning the basics but have tried and tried to get my head around
> the \$ parameter (parameter?) but can't
>
> Can someone break it down into a very basic explanation so I can take that
> with me to the help files for further understanding.
>
> As I see it, \$ pretty much denotes storage of a variable, either float or
> symbol, and works only locally. When added to an object it means: take
> incoming value and store it under \$1 (or \$2 e.t.c) for recall later. If
> there is a series of in incoming values \$1 will always refer to the first
> value and \$2 to the second. Sometimes you don't want to recall it, but need
> to tell the object to store a value in order to process it with the very
> next action, such as in
>
> OBJECT: openpanel > MESSAGE: read \$1 destination > OBJECT: soundfiler
>
> Am I right, somewhat right, or dangerously wrong?
>
> And lastly I get this in the Pd window everytime it starts up (Pd extended
> on Mac), is that heathly?:
>
> libdir loader \$Revision: 1.8 \$
>     written by Hans-Christoph Steiner <hans at at.or.at>
>     compiled on Jul 29 2008 at 04:03:05
>     compiled against Pd version 0.40.3.extended
> /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/Gem/Gem.pd_darwin:
> dlopen(/Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/Gem/Gem.pd_darwin, 10):
>   Referenced from: /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/Gem/Gem.pd_darwin
> /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pdp.pd_darwin:
> dlopen(/Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pdp.pd_darwin, 10): Library
>   Referenced from: /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pdp.pd_darwin
> /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pidip.pd_darwin:
> dlopen(/Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pidip.pd_darwin, 10): Library
>   Referenced from: /Applications/Pure
> Data/Pd-extended.app/Contents/Resources/extra/pidip.pd_darwin
>
>
>
> ///////////
>
> Thanks so much everyone.
>

--
Use the source

```