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.


FS#102 - #switch directive parsing problem

Attached to Project: POV-Ray
Opened by Jim Holsenback (jholsenback) - Wednesday, 21 April 2010, 13:44 GMT
Last edited by Christoph Lipka (clipka) - Monday, 28 June 2010, 21:25 GMT
Task Type Definite Bug
Category Backend → Parser/SDL
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The #switch directive isn’t parsing correctly. In the following construct NO warning or error is generated:

#switch (RF)

case (0)
	rotate z*355
case (144)
	rotate z*7.5
case (216)
	rotate z*5


RF is a variable passed to the macro in which this construct resides. The first ‘case’ action IS executed, but none of the others are on successive calls to the macro. If I properly add ‘#’ to the second case the 1st and 2nd condition are executed but not the last. If ‘#’ is REMOVED from any of the break directives an error is generated and parsing halts.

This task depends upon

Closed by  Christoph Lipka (clipka)
Monday, 28 June 2010, 21:25 GMT
Reason for closing:  Fixed
Comment by Christoph Lipka (clipka) - Wednesday, 21 April 2010, 19:54 GMT

POV-Ray's inability to throw an error on the "case (0)" can be cured; actually I have just thrown together a patch that does right that.

As for the other missing "#", that's an entirely different story. (Note that you can put just about anything there without POV-Ray ever complaining, not just "case", "range" or "else".)

Comment by Christoph Lipka (clipka) - Wednesday, 21 April 2010, 23:25 GMT

change #4946 will cause POV-Ray to issue an error when the first "case" is not preceded by a "#".

Comment by Jim Holsenback (jholsenback) - Monday, 28 June 2010, 17:44 GMT

This got submitted in beta37 if that's correct I'll close this one .. or maybe you should ... take yer pick!