[REBOL] Re: Using Switch with Words ??/C/C++
From: joel:neely:fedex at: 1-Nov-2001 20:00
Hi, Anton,
Ooops!
Anton Rolls wrote:
> Except for the fact that you forgot the brackets!
> He he :) Too much rebol, I think.
> Anton.
>
> > cout << value << endl;
> >
> > (but I couldn't resist writing a C version that's exactly one
> > keystroke shorter! ;-)
>
> > Given that the same thing can be coded in C as
> > printf "%d\n", value;
>
OK, then I'll make it Perl and tie for keystroke count! ;-)
printf "%d\n", $value;
-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" ;