POV-Ray : Newsgroups : povray.general : dynamic memory possible? : Re: dynamic memory possible? Server Time
31 Jul 2024 16:31:02 EDT (-0400)
  Re: dynamic memory possible?  
From: KalleK
Date: 6 Jun 2007 16:22:59
Message: <466717a3$1@news.povray.org>
Warp wrote:
> 
>   Wouldn't it be more efficient if the script wrote this in the file:
> 
> #declare My_data[<the amount of data>] =
> { the values here };
> 
> instead of a huge bunch of assignments?
> 
...but you don't know <the amount of data> beforehand...
But you could write the data in a file the way you proposed (i.e. just 
comma-separated-values with curly brackets), counting the amount, and 
then include them in an initializerstatement:


#declare My_data[<the amount of data>] = #include 
"my_prepared_array_initalizerfile"

cukk


Post a reply to this message

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