[OpenSCAD] DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
doug at moens.org
Wed May 22 09:01:46 EDT 2019
In my opinion, this is just a bug that should be fixed. I believe that there is a lot more code out there that is broken by this behaviour, than there is code that depends on this behaviour. So fixing the bug will fix more programs than it breaks.
On Wed, May 22, 2019, at 7:47 AM, adrianv wrote:
> Every so often I get this warning message.
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated.
> It means my code has a bug, because I *never* write [5:0] to mean [0:5]---I
> don't understand why anybody thought that was a good idea---so it means I'm
> potentially getting some non-empty list when I should be getting the empty
> list as a result.
> The fix is easy: rewrite [a:b] as [a:1:b]. And I guess I should try to get
> in the habit of never writing [a:b] and just always writing [a:1:b] to
> prevent this problem in the future. But I get no hint as to where in my
> code the problem is, which makes it kind of troublesome to track down. Is
> there any way to get more information?
> Sent from: http://forum.openscad.org/
> OpenSCAD mailing list
> Discuss at lists.openscad.org
More information about the Discuss