[PD-dev] $0 in messages, was: multiple $arg-expansion

Frank Barknecht fbar at footils.org
Sun Jan 15 15:28:39 CET 2006


Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> What I would be interested in more is being able to use $0 and other
> $x *literally*, for example to be able to dynamically create
> objects which use $0 as argument like:
>   
>   [obj 100 100 f $0(
>   |
>   [s pd-subpatch]
> 
> to create a [f $0] in [pd subpatch] and not a [f 1001].

Ah, scrap that: Using "$0" this way in messages is not good, as it
would be too different from how "$1,..." are used. Of course it's not
possible nor useful to create a [f $1] by using "obj 100 100 f $1"
This stuff needs proper escaping.

So what about this, which tries to keep a bit of backwards
compatibility:

* Object arguments change from $x to #x with x in 0(sic!),1,...,n

* $x in objects are kept for a while for compatibility

* Messages will get additional placeholders for canvas-properties,
  that start with a #hash and directly correspond to the object
  arguments from above. They will keep $-placeholders starting from
  1(sic!) as in the past. 
  
* There will be no $0 anymore in the long run.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-dev mailing list