It just always reports true.
Snap! handles all non-boolean values as true if they're put in boolean functions.
How does that help?
I was showcasing what kind of data the inputs report.
The t/f input evaluates the input beforehand, and reports a boolean.
The unevaluated boolean is much like the unevaluated any input; it ringifies the value. It has to be called before it can report a boolean.
Like I said in the post,
If you need to use them as boolean values, call the input wherever it shows up:
But if the value isn't used in any repeat loops or anything like that, where it would need to evaluate several times, just substitute it for a t/f value.
Not 0
or "
or null
or anything else other than undefined
that JavaScript casts to false
yeah i forgot to say that
I mean:
Does not work as I expect it to
If bool is unevaluated, then you have to use call to evaluate it. You were giving if a ringified predicate, which it doesn't automatically call.
thats literally what i was explaining in the last 2 posts
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.