The Persistence of Vision Raytracer (POV-Ray).
This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
Attached to Project: POV-Ray
Opened by Mike H - 2010-06-09
Last edited by Christoph Lipka - 2010-08-29
Opened by Mike H - 2010-06-09
Last edited by Christoph Lipka - 2010-08-29
FS#122 - #ELSEIF statement
Request an #ELSEIF statement in POV SDL.
implemented with change #5021
Isn't the current #switch implementation an elseif variant?
The #switch directive is only designed for situations where all conditions are identity or range comparisons with one common expression; #elseif on the other hand is designed to help with the generic case where the #else branch is comprised of just another #if directive, as in:
With #elseif, this can be written much prettier as:
There is also a way to do this with #switch, but I wouldn't consider it very intuitive, and it also comes with some pitfalls.
#switch also only compares against a single value. Further, in some languages you are limited to only string and number values (not sure how this applies to POV-Ray since there are no objects in the programming sense...).