I was wondering if "<none>"
was a special value (as it is in <> like errs are)?
Also, is there a good way to produce a "<none>"
value? ""
doesn’t work.
Thanks.
Chris
I was wondering if "<none>"
was a special value (as it is in <> like errs are)?
Also, is there a good way to produce a "<none>"
value? ""
doesn’t work.
Thanks.
Chris
‘nothing’ will, I believe, give a ‘none’. As will empty set results.
Try these…
names of keys whose (name of it = "this key does not exist") of keys "hklm\software" of registry
if exists key "hklm\software\this key does not exist" of registry then values of key "hklm\software\this key does not exist" of registry else nothing
pathname of key "hklm\software\this key does not exist" of registry | nothing
(line 0 of file "c:\i am not here.txt") | nothing
You can do something kind of like that with ERROR "none"
or you can do NOTHINGS
or NOTHING
These are all special conditions you can use directly in relevance:
One thing cool about error
is that it isn’t restricted by type: (the following always returns 1)
If TRUE then 1 else ERROR "this is not an int, but it works"
This gives a type mismatch error: (never returns 1)
If TRUE then 1 else "this is not an int, so it doesn't work"
This is only by my own personal style guide, but I try to always do full caps for boolean constants, boolean operators, null, nothings, error… but otherwise Relevance ignores capitalization in the inspector names, operators, and properties.
Something to note about error "blah"
vs nothing
is that error "blah"
will set the error flag on the property result and can be retrieved via error message of <bes property result>
where-as <none>
is literally no result and nothing via the api will give you “none” as a message.
Thank you all! This helps greatly.
I foresee Dude and nihilists jokes for the rest of the day.
if “Dude” = “Lebowski” then “abide” else nothings
I avoid If/Then where I can:
"abide" of names whose(it contains "Lebowski") of current users