Grasshopper

algorithmic modeling for Rhino

Hello there this is my first attempt to write a vb component. I need to give GH this condition
46<=x<=135 if true then x=70, if false x=30. else x=0
How would you write this in .net
Thank you all

cheers

Views: 238

Replies to This Discussion

What's the difference between false and else?
Avoiding your else condition, it would be something like this:

If x >= 46 And x <= 135 Then
x = 70
Else
x = 30
End If
a = x
Your are Right Vicente the else condition has nothing to do here. Thank you. One question :

the ''AND'' word can be replaced by ''&''?

thank you
probably can. just for fun check out the c3 way:
x = x >= 46 && x <= 135 ? 70 : 30;

this has to be one of the main reasons i like c syntax better :)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service