comp.lang.ada
 help / color / mirror / Atom feed
From: Michal Nowak <vinnie@inetia.pl>
Subject: Re: To_Unbounded_String and PROGRAM_ERROR
Date: Fri, 01 Feb 2002 13:34:44 +0100
Date: 2002-02-01T13:34:44+01:00	[thread overview]
Message-ID: <mailman.1012566902.20604.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <pan.2002.02.01.12.06.41.213262.3637@zamek.gda.pl>

On 02-02-01 at 12:06 Michal Nowikowski wrote:

>Hello
>
>I've this code:
>
>---
>Path : array(1..1500) of Unbounded_String;
>...
>for I in 1..1500 loop
>	Path(I) := To_Unbounded_String(Get_Current_Dir & Some_String);
>end loop;
>---
>
>and get sth like that
>raised PROGRAM_ERROR : a-strunb.ads:368
>
>This occure after few iterations - it depends of length of converted
>string. It looks for me that the limmit of memory is exceeded.
>Have You any idea how to cope with it?

You may handle an exception. But I suppose this is not the kind of answer
you want. 
You may also try to estimate the maximum lenght of string you want to
store and do something like this:
Path : array(1..1500) of String (1 .. Max_Length);
If you are really low on memory, this won't run also.
But, if this work, maybe not the lack of memory is the problem.
Maybe there is something in Get_Current_Dir function?

Hope this gave some help,
Mike:
-----------------------------------------
                             ____|
                             \%/ |~~\
  O                                  |
 o>>        Mike Nowak               |
 T                                   |
/ >       vinnie@inetia.pl           |
http://www.geocities.com/vinnie14pl _|__




  reply	other threads:[~2002-02-01 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 11:06 To_Unbounded_String and PROGRAM_ERROR Michal Nowikowski
2002-02-01 12:34 ` Michal Nowak [this message]
2002-02-01 14:02 ` Preben Randhol
2002-02-01 16:11 ` Ted Dennison
2002-02-11  9:53   ` Michal Nowikowski
2002-02-14  0:32     ` Nick Roberts
2002-02-01 16:38 ` Jeffrey Carter
replies disabled

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