[REBOL] Re: Using Switch with Words ??
From: joel:neely:fedex at: 1-Nov-2001 5:31
Hi, Matt,
Matt Fitzgerald wrote:
> switch(value) {
> case 1 :
> cout << value << endl;
> break;
>
> case 2 :
> cout << value << endl;
> break;
>
> default :
> cout << value << endl;
> }
>
Given that the same thing can be coded in C as
printf "%d\n", value;
it's easy to see what an improvement C++ is... ;-)
-jn-
--
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;