[racket] specifying strings without escaping backslash
Thanks everyone,
The @ syntax does what I want.
After I asked the question I found the answer on the Racket list.
The below based on this
http://www.mail-archive.com/users@racket-lang.org/msg07162.html
-------------------------------------------------------
#lang at-exp racket
(define RAW string-append)
(display @RAW{C:\Users\Harry\SANSKRIT\GRETIL ALL\adyappu.htm})
----------------------------------------------------------
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})
On Wed, Dec 4, 2013 at 9:41 AM, Laurent <laurent.orseau at gmail.com> wrote:
>
> On Wed, Dec 4, 2013 at 1:21 PM, Greg Hendershott <
> greghendershott at gmail.com> wrote:
>
>> If you don't mind using `#lang at-exp racket`, I think you could write
>>
>> @~a{C:\Users\Harry\SANSKRIT\GRETIL ALL\adyappu.htm}
>>
>
> Or better here: @values{C:\Users\Harry\SANSKRIT\GRETIL ALL\adyappu.htm} to
> avoid the superfluous ~a operation.
> Of course if used often, it can be abbreviated.
>
> I've just surprised myself testing @(...){...} and seeing that it works:
> @(lambda(x)x){C:\Users\Harry\SANSKRIT\GRETIL ALL\adyappu.htm}
>
> Laurent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131204/00b75ca2/attachment.html>