From: dale@cs.rmit.edu.au (Dale Stanbrough)
Subject: Re: Length & Last Attributes.
Date: 1998/10/13
Date: 1998-10-13T00:56:53+00:00 [thread overview]
Message-ID: <dale-1310981103240001@dale.bu.cs.rmit.edu.au> (raw)
In-Reply-To: 6vtr9b$hp9$1@platane.wanadoo.fr
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
BARDIN Marc wrote:
with Text_Io; use Text_Io;
procedure Test_Tri_Fichier is
Max_Descripteur : Positive;
subtype Ch_L_Cha�ne is String (1..Max_Descripteur);
Fin_Sc : Positive range Ch_L_Cha�ne'range;
package Ent_Es is new Text_Io.Integer_Io (Integer);
begin
Max_Descripteur := 5;
Put (" Length : "); Ent_Es.Put (Ch_L_Cha�ne'Length, 5);
Fin_Sc := Ch_L_Cha�ne'Last;
Put (" Fin_Sc : "); Ent_Es.Put (Fin_Sc, 5);
end Test_Tri_Fichier;
No, sorry, you can't do this in Ada in this way. More than likely
the better solution is to use Unbounded_Strings, found in package
Ada.Strings.Unbounded (for some strange reason, this wonderfully
useful type never seems to be mentioned in introductory text books,
despite the amazing simplicity it brings to the "string" model, esp.
for beginning students).
Dale
next prev parent reply other threads:[~1998-10-13 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-12 0:00 Length & Last Attributes BARDIN Marc
1998-10-12 0:00 ` Steve Doiel
1998-10-13 0:00 ` Dale Stanbrough [this message]
1998-10-13 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox