Hi Scott
Just a quick tip. This works:
switch/default type?/word 'aWord [
word! [ print "a word is a word."]
] [
print "A word is not always a word."
]
You need to have word! be a word in the switch list, not a datatype.
-Larry
----- Original Message -----
From: "Scott Dunlop" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 7:07 AM
Subject: [REBOL] Unable to use Switch and Datatypes..
> Is this a bug or a feature?
>
> The following code, which I would expect to generate 'A word is a word.',
> outputs 'A word is not always a word.', indicating that word! is not
> equivalent to word! for the purposes of switch. This also appears to be
> the case with the string! datatype. The interesting thing is that [word!
==
> word!] returns true.
>
> switch/default type? 'aWord [
> word! [ print "a word is a word."]
> ] [
> print "A word is not always a word."
> ]
>
> Thanks in advance for any suggestions people have for working around this,
> aside from a long chain of Either statements..
>
> --Scott.
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.