[Gambas-user] Parsing error with Replace$/Instr

Rob sourceforge-raindog2 at ...94...
Sun Jan 13 05:59:21 CET 2008


On Saturday 12 January 2008 20:08, richard terry wrote:
> Here is some for demo purposes of my code, which bombs with the
> error message: "Bad character constant in string".
>
> sResult = Replace$(alltext, "\plain\f3\fs24 \par }",
> "</body></html>")

You need to change all your "\"'s into "\\"'s.  Gambas interpolates 
character constants, such as "\n" for newline, in strings.  

Rob




More information about the User mailing list