Grasshopper

algorithmic modeling for Rhino

Can someone explain the subtleties of how expressions are handled in the expression editor?  I must be missing something obvious here.  In the attached image want to make a simple function with three variables - all doubles.  I call them pc, max, min.  The expression is very simple:  (pc*(max-min))+min  I tried either with the F(x)3 component or the F(x)n with 3 inputs, the expression editor in F(x)n gives me the warning "invalid, expected ( instead of -"

I then tried naming the variables x,y,z and it seems to work with either component...  so, what am I not understanding here?  Thanks for any light you can shed...  --Mitch

Views: 4571

Attachments:

Replies to This Discussion

Hello Mitch,
Max and Min are reserved keywords in the expression editors. They are functions you can use, thus, their names are not a good idea to use elsewhere. I often use MX or MN to denote max and min. Naming any input or slider 'Max' or 'Min' is not a good idea.
Hey Luis,
OK, that explains it, thanks! - I really thought I was going nuts! I will keep an eye out for this kind of stuff in the future...
Ciao, --Mitch
you can check out in the expression editor the function list...avoid these words unless you want to use them in an expression...

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service