[Gridflow-dev] [#expr] (was: jMax)
Jonathan Wilkes
jancsika at yahoo.com
Sun Sep 26 05:56:58 EDT 2010
--- On Sat, 9/25/10, Mathieu Bouchard <matju at artengine.ca> wrote:
> From: Mathieu Bouchard <matju at artengine.ca>
> Subject: Re: [#expr] (was: jMax)
> To: "Jonathan Wilkes" <jancsika at yahoo.com>
> Cc: pd-list at iem.at, gridflow-dev at artengine.ca
> Date: Saturday, September 25, 2010, 5:30 AM
> On Fri, 24 Sep 2010, Jonathan Wilkes
> wrote:
>
> >> btw i just added sin() cos() exp() log() tanh()
> sqrt()
> >> abs() rand().
For some reason, [expr] has random, which takes two arguments,
but no rand.
I noticed that [#expr] (i.e., with no args) doesn't create.
If I do [#expr max(1,3)] and send a float to the inlet it
crashes Pd. (Same with other functions)
What are rem, cmp, c2p and p2c?
>
> I just added min() max() div() rem() cmp() hypot() atan2()
> avg() c2p() p2c().
>
> > It's a little ugly:
> > [expr _$0_a]
> > [v _$0_a]
>
> yikes. actually, I'd rather write 'a' and have it mean
> '$0-a'. However, I can't put that '$0-' prefix as an
> attribute of [#expr] because :
>
> 1. comma-messages only are sent after the
> constructor processes the
> arguments
>
> 2. comma-messages are disabled for [#expr] anyway,
> using the new
> CLASS_NOCOMMA option, because
> comma already means something in
> [#expr] (for the two-argument
> function support that I have just
> added)
>
> And then I'd rather not write things like [#expr -local $0-
> a-b] because that's three meanings of "-" in the same box.
> ;) I mean something like a commandline switch that would set
> "$0-" as the prefix of all following variables.
>
> > [expr _$0.a] seems to fail, and of course [expr _$0-a]
> won't do what you want.
>
> I suppose only /[_A-Za-z][_A-Za-z0-9]*/ are accepted in
> symbols, just like C syntax.
>
>
> _______________________________________________________________________
> | Mathieu Bouchard ------------------------------ Villeray,
> Montréal, QC
More information about the Gridflow-dev
mailing list