[PD] receiving messages in [expr] ?

Jonathan Wilkes jancsika at yahoo.com
Thu Aug 25 18:21:33 CEST 2011

[v $0-myvalue] = associate the symbol "$0-myvalue" with a float value
[expr $0-myvalue] = subtract the float value associated with the symbol "myvalue" from $0

Therefore, [expr] should always return the value of $0 (unless you're assigning a value to "myvalue" somewhere)

[expr]'s parser seems only to recognize an atom as a symbol when the first character is not a number, so try the following workarounds:

[expr _$0myvalue]
[expr myvalue$0]

Both are ugly.  If using tables you can avoid this mess by using an $s variable.


>From: Michael Zacherl. <sdiy-mz01 at blauwurf.info>
>To: PD list <pd-list at iem.at>
>Sent: Thursday, August 25, 2011 11:19 AM
>Subject: Re: [PD] receiving messages in [expr] ?
>On 25.8.2011, at 14:43 , tim vets wrote:
>> something like [expr myvalue] and [v myvalue]?
>> gr,
>> Tim
>great, thanks Tim!  
>any chance to get $0 working?  [v $0-myvalue] is fine, [bang(--[expr $0-myvalue]  (might be utterly wrong) delivers strange values, not even $0.
>noise chasers: http://blauwurf.at 
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110825/a523bc51/attachment.htm>

More information about the Pd-list mailing list