[PD] Expr does not play well with ints?
B. Bogart
ben at ekran.org
Tue Jul 24 17:38:38 CEST 2007
Ah, I see now.
I could not use that method, since 8/6 was an example, and I wanted to
do $8 / $6, so treating "$8" as a symbol would not have helped.
.b.
Mathieu Bouchard wrote:
> On Mon, 23 Jul 2007, B. Bogart wrote:
>>> Mathieu, are you really able to put 8.0 in an expr argument? In my PD
>>> (.39 ubuntu package) the 8.0 gets turned into 8 and remains an int.
>> Ah! [expr float(8) / 6] does the trick, I'm damn happy there is float()
>> in there!!!
>
> if you write any character next to the number that causes pd to read it
> as a symbol, then pd won't rewrite it before expr reads it.
>
> [expr (8.0) / (6.0)] = 1.25
> [expr 8.0 / 6.0] = 1
> [expr 8.0 /6.0] = 1.25
> [expr 8.0/ 6.0] = 1.25
> [expr 8.0/6.0] = 1.25
>
> _ _ __ ___ _____ ________ _____________ _____________________ ...
> | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Pd-list
mailing list