[REBOL] [Truth test fails]
From: tim::johnsons-web::com at: 18-May-2004 13:53
I'm seeing unexpected behavior from a truth test in a context.
Here is the code for the context:
writer: make object![
keys: [bold size color family]
bold: true
bold-tag: ""
bold-end-tag: ""
fix: func[args[block!]][
foreach [key val] args[
?? key
if not find keys key [
make error!
reform[key "is not an acceptable key for htm-writer. Use:" keys]]
set in self key val
]
?? bold
either bold [
print "creating tag"
bold-tag: "<b>"
bold-end-tag: "</b>"
][
print "no tag"
bold-tag: ""
bold-end-tag: ""
]
]
]
Now here is sample code execution:
>> writer/fix [bold false]
key: bold
bold: false
creating tag
== "</b>"
I would expect that the false-block for 'either
would be executed.
What am I doing wrong?
thanks
tim
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com