From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,WEIRD_QUOTING autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cf72236526e50aab X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: newbie question: the " character inside a string Date: 2000/05/24 Message-ID: <8ggrm2$ein$1@nnrp1.deja.com>#1/1 X-Deja-AN: 626694490 References: <8ggcnp$83r$1@inf2.informatik.uni-stuttgart.de> X-Http-Proxy: 1.0 x60.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed May 24 15:15:31 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-05-24T00:00:00+00:00 List-Id: In article <8ggcnp$83r$1@inf2.informatik.uni-stuttgart.de>, "Martin Tobisch" wrote: > what do i have to do if i want to include a " inside of a string? I know you already got a RTFM answer, but most manuals I have seen don't properly address string handling in Ada (it really ought to have its own chapter) and the LRM seems like overkill for such a simple question. There are two simple ways (I know of) to do this: 1) Catenate a quotation character to your string eg: Value : constant String := "The name is " & '"' & Some_String_Variable & '"'; 2) "Escape" the quotation character in the string literal with another quotation character: Value : constant String "= The name is """ & Some_String_Variable & """"; If you are using emacs, you'll probably want to stick to method 2, since method 1 throws off Ada-mode's colorization. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.