f: func [][
        c: ask "Please type a primary color? "
        example: switch/default c [
                "red"           ["Roses are red."]
                "blue"  ["Violets are blue."]
                "yellow"        ["Daisies are yellow."]
        ][
                rejoin ["'"c "' is not a primary color."]
        ]
        print example
]

(Sorry about the earlier multiple posts, the MS Exchange server sent it
multiple times, not me!)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 22, 2000 5:19 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] example of switch...



Can some one please give me an example of how to use /default in a switch 
construction?

TIA

Brad

P.S. The dictionary *really* falls down in advanced examples...

Reply via email to