POV-Ray : Newsgroups : povray.advanced-users : zero length arrays : Re: zero length arrays Server Time
6 May 2024 05:08:20 EDT (-0400)
  Re: zero length arrays  
From: Mike Horvath
Date: 5 Feb 2016 19:00:50
Message: <56b537b2@news.povray.org>
On 2/5/2016 4:16 AM, dick balaska wrote:
> On 2/4/2016 8:56 PM, Mike Horvath wrote:
>> I'm trying to write a script that gets its objects from arrays. However,
>> some of these arrays are empty, and cause parsing to stop. Why are zero
>> length arrays not allowed? This is not true of most of the programming
>> languages I am familiar with, and means I have to write a lot of extra
>> code to handle this situation.
>>
>
> If I have an array that may be of size 0, then I just don't define it
> and later check for #ifdef when I want to use it.
>

This means I will have to rewrite Chris Colefax's CityGen, since he uses 
arrays to store lots of stuff. :(


Post a reply to this message

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