[racket] specifying strings without escaping backslash
On Thu, Dec 5, 2013 at 2:30 AM, Laurent <laurent.orseau at gmail.com> wrote:
> On Wed, Dec 4, 2013 at 11:47 PM, Harry Spier <vasishtha.spier at gmail.com>wrote:
>
>> 2)
>> What am I doing wrong here. -- everything :-)
>> I'm trying to change the command character from @ to # so that I can
>> have raw strings containing both \ and @
>> looking at the racket documentation here:
>>
>> http://docs.racket-lang.org/scribble/reader-internals.html?q=at-exp#%28def._%28%28lib._scribble%2Freader..rkt%29._make-at-readtable%29%29
>>
>> I've done this:
>>
>> #lang at-exp racket
>> (require scribble/reader)
>> (use-at-readtable #:command-char #\#)
>> (define RAW string-append)
>> (display #RAW{C:\Users\Harry\SANSKRIT\GRETIL ALL\adyappu.htm})
>> (display #RAW{harryspier at hotmail.com})
>>
>
> I don't know enough about readtables to help you here, but it seems that
> `use-at-readtable' is only for the REPL:
>
> http://docs.racket-lang.org/scribble/reader-internals.html?q=use-read-table#%28def._%28%28lib._scribble%2Freader..rkt%29._use-at-readtable%29%29
>
>
Yes it works with the REPL
------------------------------
DEFINITIONS WINDOW
#lang at-exp racket
(require scribble/reader)
(use-at-readtable #:command-char #\#)
(define RAW string-append)
----------------------------------------
INTERACTIONS WINDOW
Welcome to DrRacket, version 5.3.6 [3m].
Language: at-exp racket [custom]; memory limit: 1024 MB.
> (display #RAW{harryspier at hotmail.com})
harryspier at hotmail.com
>
---------------------------------------------
> Someone ought to build the `at-any-exp' language Matthew was talking about
> a few days ago, so that one can write
> #lang at-any-exp $ racket
> $~a{Yay, dollar-exp syntax!}
>
> Laurent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131205/a95eaa21/attachment.html>