generative modeling for Rhino
Hey everyone,
I'm wondering what the term is for checking if an integer (or double) input is null in a custom VB component.
I though is was "Nothing" but 0 counts as nothing so that doesn't do the trick.
Thanks,
-Brian
Tags:
Permalink Reply by Giulio Piacentino on March 22, 2012 at 3:25am Hi Brian,
You can't. Numbers are structures so you can use Integer (System.Int32) as value but not as reference. This implies that there is no Nothing/null for it. You could instead use Object, and the value will be boxed into a reference, so there will be Nothing again.
If you were writing the code, then the solution would be to use Nullable(Of Integer). But this is not the case in the input of the function of the custom scripting component.
Thanks,
- Giulio
_______________
giulio@mcneel.com
Permalink Reply by Brian Harms on March 22, 2012 at 1:58pm Ok thanks Giulio
Added by Mgeorgio 0 Comments 0 Likes
Added by Mgeorgio 0 Comments 0 Likes
© 2013 Created by Scott Davidson.
Powered by