comp.lang.ada
 help / color / mirror / Atom feed
* Re: In Ada, is it possible to print an array on the screen without a loop?
       [not found] <01bc8c7f$e29ce6c0$25bad084@SbastienGemme.uqam.ca>
@ 1997-07-09  0:00 ` John Herro
  1997-07-10  0:00   ` Richard A. O'Keefe
  1997-07-11  0:00 ` In ada, is it possible to print an array on the screen whithout " Roy Grimm
  1 sibling, 1 reply; 3+ messages in thread
From: John Herro @ 1997-07-09  0:00 UTC (permalink / raw)



"SG" <sg@money.com> writes:
> In ada, is it possible to print an array
> on the screen without a loop?

Text_IO.Put_Line(
     "Of course! ... if the array happens to be a string! :-)  ");
-- ...but in general, I think the answer is no.

- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor





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

* Re: In Ada, is it possible to print an array on the screen without a loop?
  1997-07-09  0:00 ` In Ada, is it possible to print an array on the screen without a loop? John Herro
@ 1997-07-10  0:00   ` Richard A. O'Keefe
  0 siblings, 0 replies; 3+ messages in thread
From: Richard A. O'Keefe @ 1997-07-10  0:00 UTC (permalink / raw)



"SG" <sg@money.com> writes:
> In ada, is it possible to print an array
> on the screen without a loop?

johnherro@aol.com (John Herro) writes:
>Text_IO.Put_Line(
>     "Of course! ... if the array happens to be a string! :-)  ");
>-- ...but in general, I think the answer is no.

Clearly there has to be a loop _somewhere_, but this answer is somewhat
misleading.  It doesn't follow that _SG_ has to write the loop.

It is possible to write a generic procedure, and then SG just has to
instantiate it once.  The only reason I've never bothered to do this
is that there are a lot of issues in formatting an array that don't
arise in formatting a single item.
-- 
Four policemen playing jazz on an up escalator in the railway station.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.




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

* Re: In ada, is it possible to print an array on the screen whithout a loop?
       [not found] <01bc8c7f$e29ce6c0$25bad084@SbastienGemme.uqam.ca>
  1997-07-09  0:00 ` In Ada, is it possible to print an array on the screen without a loop? John Herro
@ 1997-07-11  0:00 ` Roy Grimm
  1 sibling, 0 replies; 3+ messages in thread
From: Roy Grimm @ 1997-07-11  0:00 UTC (permalink / raw)



SG wrote:
> 
> In ada, is it possible to print an array on the screen whithout a loop?

In Ada, anything is possible.  However, I'm assuming you are asking if
there is native support in the language for printing arrays.  The only
native support for printing any kind of array is if it happens to be an
array of characters, i.e. a string.  Other than that, you have to
manufacture your own print routine from the existing language
components, i.e. using a loop.

-- 
Roy A. Grimm                    |  The two fundamental principles
Rockwell Collins Avionics       |   of Engineering:
Cedar Rapids, Iowa              |  1.  F=MA
ragrimm@collins.rockwell.com    |  2.  You can't push a rope
Voicing my own opinion, not speaking as a company representative.
All unsolicited email is quietly forwarded to /dev/null.




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

end of thread, other threads:[~1997-07-11  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <01bc8c7f$e29ce6c0$25bad084@SbastienGemme.uqam.ca>
1997-07-09  0:00 ` In Ada, is it possible to print an array on the screen without a loop? John Herro
1997-07-10  0:00   ` Richard A. O'Keefe
1997-07-11  0:00 ` In ada, is it possible to print an array on the screen whithout " Roy Grimm

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