comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Using Quotes in Quotes (if you see what I mean)
Date: Thu, 11 Aug 2011 16:10:09 -0700 (PDT)
Date: 2011-08-11T16:10:09-07:00	[thread overview]
Message-ID: <3370ee0c-9d6a-4c6c-988f-c7570dfa1f0a@k3g2000vbz.googlegroups.com> (raw)
In-Reply-To: f0f2f90e-9f19-4b94-9006-5c36160f4bd6@w24g2000yqw.googlegroups.com

On Aug 5, 2:15 am, tonyg <tonytheg...@gmail.com> wrote:
> I'm trying to search for a string containing the string "day = "2""
> within some xml using gnat ada. Unfortunately the "2" is causing a
> problem in that ada thinks it is the end of the string before it gets
> to the end. Can someone tell me how I need to represent this to search
> successfully ?

Well, if you're using that string as a constant, or an initialzation,
the correct way is to double up the quotes OR use the & operator with
the character literal.

Examples:
 Search_String : String:= "day = ""2""";
OR
 Search_String : String:= "day = " & '"' & "2" & '"';



      parent reply	other threads:[~2011-08-11 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05  7:15 Using Quotes in Quotes (if you see what I mean) tonyg
2011-08-05  9:14 ` Jacob Sparre Andersen
2011-08-11 23:10 ` Shark8 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox