POV-Ray : Newsgroups : povray.advanced-users : zero length arrays : Re: zero length arrays Server Time
5 May 2024 20:04:32 EDT (-0400)
  Re: zero length arrays  
From: scott
Date: 5 Feb 2016 02:43:20
Message: <56b45298$1@news.povray.org>
> 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.

In C# (which I mostly use) if there is any chance there will be zero 
elements then I normally use a List rather than an array. I believe 
there is something similar in C++, and probably in other languages too.


Post a reply to this message

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