[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

General Delimited String Syntax Question

Lothar Scholz

7/15/2003 4:23:00 AM

The "Programming Ruby" books says in the section "General Delimited
Input"

Following the type character is a delimiter, which can be any
character. If the delimiter is one of the characters
``('', ``['', ``{'', or ``<'', the literal consists of the
characters up to the matching closing delimiter

But i tried it with

print %Qahelloa
print %Q1hello1

and this does not work. Why? What characters are allowed ?



1 Answer

Dave Thomas

7/15/2003 4:54:00 AM

0

Lothar Scholz wrote:

> The "Programming Ruby" books says in the section "General Delimited
> Input"
>
> Following the type character is a delimiter, which can be any
> character. If the delimiter is one of the characters
> ``('''', ``['''', ``{'''', or ``<'''', the literal consists of the
> characters up to the matching closing delimiter
>
> But i tried it with
>
> print %Qahelloa
> print %Q1hello1
>
> and this does not work. Why? What characters are allowed ?


It changed... %-style literals no longer allow alphanumerics or
multi-byte characters as delimiters.

Cheers


Dave