comp.lang.ada
 help / color / mirror / Atom feed
* escaping long lines
@ 2004-12-01 23:48 Jens Kubieziel
  2004-12-02  0:29 ` Randy Brukardt
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Kubieziel @ 2004-12-01 23:48 UTC (permalink / raw)


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.

Thanks in advance
-- 
Jens Kubieziel                                   http://www.kubieziel.de
FdI#266: Allradantrieb
Allradantrieb bedeutet, dass man dort stecken bleibt, wo der
Abschleppwagen nicht hinkommt.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: escaping long lines
  2004-12-01 23:48 escaping long lines Jens Kubieziel
@ 2004-12-02  0:29 ` Randy Brukardt
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Brukardt @ 2004-12-02  0:29 UTC (permalink / raw)


"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.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-02  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 23:48 escaping long lines Jens Kubieziel
2004-12-02  0:29 ` Randy Brukardt

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