Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: escaping characters?

From: joel:neely:fedex at: 10-Mar-2002 9:34

Hi, Adrian, The escape for REBOL strings is the caret, not the backslash. In addition there are two ways to "bracket" strings: double-quote marks and curly braces. So either of the options below should take care of your need.
>> print {"hello"}
>> print "^"hello^""
"hello" -jn- Adrian wrote:
> I`m new to Rebol and I have a simple question. I don`t seem to > be able to find the answer to. > How do you print quotes? I tried print ""hello"" print "\"hello\"" and > others. Is there a way to escape characters like you do in C and other > languages. Also newlines (\n) . Any input is appreciated. >
-- ; 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" ;