What is the syntax for having multi-line literals?

2 views
Skip to first unread message

mrusoff

unread,
Jan 16, 2009, 1:45:23 PM1/16/09
to Sleep Developers
I did not see it in the manual...

Thanks in advance!!!
-MHR

Raphael Mudge

unread,
Jan 16, 2009, 1:52:29 PM1/16/09
to sleep-de...@googlegroups.com
Multiline literals? We don't need no steenking multiline literals!
I think this is a good point, I will look at the documentation and
include this as a potential addition. In the meantime, here is how
you do multiline literals in Sleep:

$x = "this
is
a
multiline
literal!"

It works with single quoted expressions as well. If you're looking
for something like Perl's <<EOL, Sleep doesn't have that at this time.

-- Raphael

Raphael Mudge

unread,
Jan 16, 2009, 2:00:09 PM1/16/09
to Sleep Developers
My apologies, I forgot a semicolon.

$x = "this
is
a
multiline
literal";
Reply all
Reply to author
Forward
0 new messages