On Thursday, March 20, 2003, at 10:37 AM, Paul Harvey wrote:
Going back a ways now (1984-ish), I had a BASIC computer (Sinclair
Spectrum in the UK, some Timex thingy in the States) that could do
this:
theBooleanResult=(1 and thisVar>thatVar)+(0 and thisVar<=thatVar)
The result was that if thisVar was greater than thatVar,
theBooleanResult
would get the value 1, otherwise it would get the value 0
Is there any way to produce a similar one-line way of doing this? i'm
thinking most specifically about Checkboxes and their Value property,
which, if I want to translate into 1 or 0 has to typically go through a
if cbBox.Value then
result="1"
else
result="0"
end
I would be interested in your thoughts!
If you do this regularly, then you could subclass Checkbox, giving it a
function IntegerValue as Integer.
Charles Yeomans
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.
|