[plt-scheme] Scribble and here strings
On Jul 27, Jens Axel Søgaard wrote:
> Hi All,
>
> What's the correct way of scribbling here strings?
>
> This is what my code looks like:
>
> (define-sql (create-table-entries)
> #<<SQL
> CREATE TABLE entries (
> entry_id INTEGER PRIMARY KEY,
> title TEXT,
> url TEXT,
> score INTEGER )
> SQL
>
> I tried to wrap it in a simple @schemeblock[...] but that is not enough,
> due to the way the parser works.
I'm not sure that there is a `schemeblock' solution (at some point
we'll need something similar that works at the string level instead of
reading expressions), but a better way of writing that code is to not
use here strings:
(define SQL string-append)
(define-sql (create-table-entries)
@SQL{
CREATE TABLE entries (
entry_id INTEGER PRIMARY KEY,
title TEXT,
url TEXT,
score INTEGER )})
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!