POV-Ray : Newsgroups : povray.general : Dynamic arrays : Re: Dynamic arrays Server Time
13 Aug 2024 01:15:04 EDT (-0400)
  Re: Dynamic arrays  
From: Thorsten Froehlich
Date: 7 Dec 1998 15:07:59
Message: <366c359f.0@news.povray.org>
In article <366C1A35.DF1EDDB8@peak.edu.ee> , Margus Ramst <mar### [at] peakeduee> 
wrote:

>The subject kind of says it. I would like to see dynamic arrays (size not
>predefined) in POV, since there are always situations where one can't predict
>the size of an array.
>Comments, anybody?

Making something "dynamic" always sounds good, but the fact is that the arrays in
POV-Ray are simple data structures in memory, allocated as *one* block. In order to
change this, its memory would have to be extended (which is no problem) each time the
size is changed, which would add significant overhead in a simple C implementation
like POV-Ray. Of course the nice vector templatein the C++ standard library (former
STL) would be helpful in this case...


    Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.