comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: escaping long lines
Date: Wed, 1 Dec 2004 18:29:41 -0600
Date: 2004-12-01T18:29:41-06:00	[thread overview]
Message-ID: <pKednfyyK4I0_DPcRVn-qA@megapath.net> (raw)
In-Reply-To: coll8h$pho$1@qbiathome.news.kubieziel.de

"Jens Kubieziel" <nospam@kubieziel.de> wrote in message
news:coll8h$pho$1@qbiathome.news.kubieziel.de...
> Hi,
>
> assume I have a large line like:
> TYPE enum1 is (aa, bb, cc, dd, ...);
> or
> Put("This is a reaaaaaaaaaaaaaaaaaaaaaaaaallllllllllyyyyyyyy long
output");
> which is more than 80 chars.
> How can I escape those long lines? I'm looking for something like "\" in
> shell syntax or a "%" in LaTeX.

There aren't any escapes in Ada. Ada compilers should support lines of 200
characters (see 2.2(14)) so it's not necessary to break lines just because
they've reached 80 characters.

But if you still want to, just concatenate the parts together.

Put("This is a reaaaaaaaaaaaaaaaaaaaaaaaaallllllllll" &
       "yyyyyyyy long output");

String literals are static, so all compilers have to combine them at compile
time -- so using the "&" operator has no runtime cost. As usual, say what
you want, and trust the Ada compiler to generate the best code.

                        Randy.






      reply	other threads:[~2004-12-02  0:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01 23:48 escaping long lines Jens Kubieziel
2004-12-02  0:29 ` Randy Brukardt [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