> /PeO wrote:
> > Just can't find out what's wrong
> >
> > Two examples in the included source, the first, "checkcmd" uses words for
> the switch cases, the other uses strings..
> >
> > Also included is my addition to the switch function (but that itself is
> not the one causing this problem)
> 
> Put 'reduce before your case block.
> 
> So instead of this:
>         switch/default command [
> 
>     do this:
>         switch/default command reduce [
>             ; blah blah blah.

I figured that out a couple of hours ago, thanx anyway

> Also, instead of this:
>         RPL_WELCOME [
>             print "welcome"
>     this is easier:
>         print switch/default command [
>         RPL_WELCOME [
>             "welcome"
> 

The print stuff was only for the test program, in the real program alot of
more things are done for each command.

> And, for case sensitive switch, this is clearer:
...
I think my case sensitive switch was the clearer one (and also shorter)..
The only thing that really is wrong with it is calling the case-sensitive
switch for /cs (since case was already in use by REBOL's own switch
function).. Anyway, that's a problem that is easy to correct...

/PeO

Reply via email to