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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5800bd3879e0759a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 14:02:12 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail From: "Des Walker" Newsgroups: comp.lang.ada Subject: Re: Strings dynamic Date: Wed, 11 Apr 2001 22:00:10 +0100 Message-ID: <9b2glm$4qd$1@news7.svr.pol.co.uk> References: NNTP-Posting-Host: modem-36.dexfenfluramine.dialup.pol.co.uk X-Trace: news7.svr.pol.co.uk 987022838 4941 62.136.89.164 (11 Apr 2001 21:00:38 GMT) NNTP-Posting-Date: 11 Apr 2001 21:00:38 GMT X-Complaints-To: abuse@theplanet.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Xref: supernews.google.com comp.lang.ada:6788 Date: 2001-04-11T21:00:38+00:00 List-Id: wrote in message news:PPGTqiNch2sc@zipi.fi.upm.es... > Hello, > i have a question for all the group...i am a new ada programmer.... > i came from c and i want to know how to make strings dynamic, with length > diffrentes... Thank you very much > > Answers please to: rrilNOSPAMpm@arrakis.es > > i am a student of computer sciencie > A good place to start would be with Unbounded_Strings. As the name suggests they do not have a prespecified length but can change length to accomodate what you store in them. You should familiarise yourself with the facilities of the Ada.Strings.Unbounded package (you should have one in your standard set of packages). This package should provide all the facilities you need to manipulate Unbounded_Strings so you have to try decoding their structure by yourself. One nice advantage. particularly for a beginner, is that the unbounded string takes care of its own memory management, so you don't have to worry about things like storage leaks. A good place to familiarise yourself with the basics of unbounded strings is the Lovelace tutorial. You can access it on the web: goto http://www.adahome.com scroll to the bottome of the page, and from the Floors block select Lovelace Tutorial (on the right hand side). >From the Lovelace opening page select "The master outline of all the lessons", and you find the discussion of strings in Lesson 8, with an example program using Unbounded Strings (at the end of the lesson). HTH Des Walker