POV-Ray : Newsgroups : povray.advanced-users : <no subject> : Re: <no subject> Server Time
28 Apr 2024 06:54:09 EDT (-0400)
  Re: <no subject>  
From: clipka
Date: 15 Sep 2018 19:39:25
Message: <5b9d982d$1@news.povray.org>
Am 16.09.2018 um 00:50 schrieb Bald Eagle:
> and to home in on the problem:
> 
>  #for (U, 0, Usize)
> 
> no effect         #local YVal=0;
> code proceeds     #local U=0;
> no effect             #local UArray[U]=<0,0,1.047>;

Maybe I'm a bit daft here, but can you please elaborate on the above
notation? Does each line represent something you tried inserting...
somehwere? After the `#for()` statement?... with the left showing the
result and the right showing the statement you tried? Did you try each
of the lines individually, or did you add them one after the other in
the above order? Does "no effect" mean you didn't get the desired
effect, or does it mean the observed effect isn't there? Does "Code
proceeds" mean the code works, or does it mean the `#if` clause is skipped?

Hunting down obscure bugs is a matter of precision. This seems to be
something so strange that I need to understand /exactly/ what you're
doing and /exactly/ what your results are.

This is all the more important since I still don't seem to get the same
results; so either I didn't fully understand your description to allow
me to reproduce it - in which case precision is important so that I can
figure out what I'm still doing differently than you - or thre is
something fundamentally different between my environment and yours - in
which case precision is important because your description of the
scenario is all I have to go by to understand the root cause.

> So I tried #local U = int (U);   Nope.

You tried that where? And what exactly does "Nope" mean?

> So, #for (U, 0, .... doesn't actually start at 0???   :|

I can pretty much rule that one out: The parser takes the literal `0`
and immediately assigns it to the local variable U, with no other fancy
operations involved. If there are any two statements by which you can
absolutely positively reliably get a clean genuine zero into some
variable, it is `#declare/local Foo=0;` and `#for (Foo,0,...)`.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.