comp.lang.ada
 help / color / mirror / Atom feed
From: Andreas Winckler <andreas.winckler@frqnet.de>
Subject: Re: Beginner's questions
Date: 1999/05/03
Date: 1999-05-03T00:00:00+00:00	[thread overview]
Message-ID: <372D3B9A.5CBA1ABC@frqnet.de> (raw)
In-Reply-To: 372da49c.12366381@news.rwth-aachen.de


Marco Schmidt wrote:

> 2) I want to use a fixed-size array of constant strings to store some
> names which do not all have the same length, but no name is longer
> than 20 characters. My approach looks like this:
> 
>   type t_my_array is array(0..17) of String;
> 
>   names : constant t_my_array := ("string 1", "string 2", ...,
>     "string 18");
> 
> The compiler doesn't like this (unconstrained element type). If I
> replace String with String(0..19), it is compiled, but a runtime error
> is raised. How should I do it?

For programmers used to Pascal the strings in Ada can be really
irritating, at least it was for me. I usually use unbounded strings
which are comparable to the strings in Pascal.


Greetings,

AW
-- 
------------------------------------------------------------------------
Andreas Winckler
Dipl.ing.
Software Engineering

FREQUENTIS Network Systems GmbH
Department MHS
Bahnhofsplatz 1
88045 Friedrichshafen
Tel: (+49) (7541) 282 - 462  Fax: (+49) (7541) 282 - 299
http://www.frqnet.de




  parent reply	other threads:[~1999-05-03  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-02  0:00 Beginner's questions Marco Schmidt
1999-05-02  0:00 ` Matthew Heaney
1999-05-03  0:00   ` Marco Schmidt
1999-05-03  0:00     ` Matthew Heaney
1999-05-03  0:00 ` dennison
1999-05-04  0:00   ` Tucker Taft
1999-05-04  0:00     ` dennison
1999-05-10  0:00       ` Tucker Taft
1999-05-03  0:00 ` Andreas Winckler [this message]
1999-05-03  0:00   ` Matthew Heaney
1999-05-03  0:00     ` Andreas Winckler
1999-05-03  0:00       ` David Starner
1999-05-04  0:00         ` Andreas Winckler
1999-05-04  0:00           ` Larry Kilgallen
1999-05-04  0:00             ` Martin C. Carlisle
1999-05-04  0:00               ` Larry Kilgallen
1999-05-05  0:00                 ` Andreas Winckler
1999-05-04  0:00 ` czgrr
1999-05-04  0:00   ` Nick Roberts
1999-05-07  0:00     ` Robert Dewar
1999-05-07  0:00       ` David Starner
1999-05-08  0:00         ` ak
replies disabled

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