[Gambas-user] Quote() doesn't manage special italian chars - bug?

Stefano Palmeri rospolosco at ...152...
Sat Nov 10 18:18:52 CET 2007


Alle 18:10, sabato 10 novembre 2007, Benoit Minisini ha scritto:
> On samedi 10 novembre 2007, Stefano Palmeri wrote:
> > Sorry, could you redirect me to some page that explains the Quote()
> > function and what it's used for? :-)
> > Thanks,
> >
> > Stefano
>
> You can use Quote() to store arbitrary strings on one line in a settings
> file. Then you will use UnQuote() to read it later, and get the original
> string.
>
> As written in the wiki, it quotes a string for the Gambas interpreter, i.e.
> it transforms a string into something than can be evaluated to the same
> string by the Gambas interpreter.
>
> So:
>
> PRINT Eval(Quote(AnyString))
>
> is an exact equivalent of
>
> PRINT AnyString
>
> Regards,

Ok, now it's clear. But the explanation in the current help online
is a bit less clear (for a hobbist/newbie like me):
-------------------------------------------------------------------------
Syntax
STATIC FUNCTION Quote ( String AS String ) AS String

Quotes a string by using the Gambas string syntax. 

Example
PRINT Quote("This is not a \"quoted\"\nmulti-line string.")

This is not a \"quoted\"\nmulti-line string.
--------------------------------------------------------------------------

Anyway, thanks for attention.
Regards,

Stefano




More information about the User mailing list