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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,9f5373f7d078262 X-Google-Attributes: gid103376,public From: dale@cs.rmit.edu.au (Dale Stanbrough) Subject: Re: Length & Last Attributes. Date: 1998/10/13 Message-ID: #1/1 X-Deja-AN: 400450995 References: <6vtr9b$hp9$1@platane.wanadoo.fr> X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 908240213 27903 144.205.16.58 (13 Oct 1998 00:56:53 GMT) Organization: Department of Computer Science, RMIT NNTP-Posting-Date: 13 Oct 1998 00:56:53 GMT Newsgroups: comp.lang.ada Date: 1998-10-13T00:56:53+00:00 List-Id: 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