|
|
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Render cancelled by user.
> Break point:
> File: C:\POVDIR\POVFILE.pov Line: 9
> #declare j=j+1;
> Active loop:
> File: C:\POVDIR\POVFILE.pov Line: 6
> #while (i<100)
> Iteration count: 12345
> Active loop:
> File: C:\POVDIR\POVFILE.pov Line: 8
> #while (j<100)
> Iteration count: 67
Nice one. That would indeed be handy.
> I'm not
> familiar with the code, but I should think it wouldn't be an overly difficult
> task to add this as POV would already need to keep track of open loops within
> it's code parsing.
I haven't paid much attention to loop handling yet, but nested loops are handled
by recursive calls, and I guess aborting parsing is done by throwing an
exception; so it would mean adding...
- a local variable to count loop iterations while in a loop
- code to catch the exception while in a loop, and throw it onward with added
information about the current loop
- code to pass the detailed information to the front-end
- code in the front-end to output the information
Nothing that sounds dramatically complicated.
Being on it, it would be nice to have the same mechanism kick in if parsing is
aborted for any other reason.
Another thing that would greatly faciliate debugging would be a simpler syntax
to output a single variable, so that for instance
#declare Foo = 47.11000;
#local Bar = sphere { <0,0,0>, 1 }
#debug_var Foo, Bar
#debug_var Foobar
might print:
Foo (global): 47.11
Bar (local): object
Foobar: undefined
Post a reply to this message
|
|