comp.lang.ada
 help / color / mirror / Atom feed
From: "Des Walker" <des.walker@dessy.fsnet.co.uk>
Subject: Re: Strings dynamic
Date: Wed, 11 Apr 2001 22:00:10 +0100
Date: 2001-04-11T21:00:38+00:00	[thread overview]
Message-ID: <9b2glm$4qd$1@news7.svr.pol.co.uk> (raw)
In-Reply-To: PPGTqiNch2sc@zipi.fi.upm.es


<g990406@zipi.fi.upm.es> 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





  parent reply	other threads:[~2001-04-11 21:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-11 18:32 Strings dynamic g990406
2001-04-11 20:17 ` chris.danx
2001-04-11 21:00 ` Des Walker [this message]
2001-04-11 22:29 ` James Rogers
2001-04-12 15:03   ` Marin David Condic
     [not found]   ` <wTjB6.4345$FY5.306564@www.newsranger.com>
2001-04-20 11:52     ` Georg Bauhaus
replies disabled

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