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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ccb8bd6b4c3162fd X-Google-Attributes: gid103376,public From: Andreas Winckler Subject: Re: Beginner's questions Date: 1999/05/03 Message-ID: <372D3B9A.5CBA1ABC@frqnet.de>#1/1 X-Deja-AN: 473413426 Content-Transfer-Encoding: 7bit References: <372da49c.12366381@news.rwth-aachen.de> X-Accept-Language: de Content-Type: text/plain; charset=us-ascii X-Posting-Server-Note: This article has been posted on a newsserver of Xlink Internet Services. It does not necessarily represent the opinion of Xlink. Please report abuses to news-support@xlink.net Organization: FREQUENTIS Network Systems GmbH Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-03T00:00:00+00:00 List-Id: 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