[OpenSCAD] DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.

adrianv avm4 at cornell.edu
Wed May 22 07:46:13 EDT 2019


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/



More information about the Discuss mailing list