POV-Ray : Newsgroups : povray.bugreports : #debug, #render ... windows : Re: #debug, #render ... windows Server Time
23 Jun 2024 14:42:41 EDT (-0400)
  Re: #debug, #render ... windows  
From: Peter Popov
Date: 10 Apr 1999 14:58:56
Message: <370f8756.26362743@news.povray.org>
On Fri, 26 Mar 1999 12:57:24 +0100, Spider <spi### [at] bahnhofse> wrote:

>I belive I have foundd a bug, or at least a minor irritation in the windows
>version of pov-ray. 
>
>appearance :
>in a very slow loop I have(some 140 000 items) I wanted a percentage meter, and
>thus I made a #if(mod(Y,N/10)=0) #debug "." #end
>statement(this isn't the real one, I actually had a bit more optimized code, as
>well as some statistics) but to my irritation, a line isn't updated with new
>output unless I add a "\n" to the output. I really didn't want to output
>everything to a new line, but this seems impossible. I've tried with
>#debug
>#render
>#statistics
>#warning 
>by obvious reasons, #error isn't very appropiate .-)
>
>version of POV :
>Version 3.1e.watcom.win32 [Pentium II optimized]
>
>I don't know if this is some optimization, to output to a line only when it is
>full, but either a addition to the help files(that this is the case) or a
>software addition.
>
>Thankyou.

This is not a bug in any case. That's just how windoze treats console
output. You may try to use \r which is a carriage return. This will
flush the stream or whatever you programmers call it. I have
successfully used it for the exact same purpose as you, and I remember
it was quite simple. You need a string (eg. yourString) containing 100
dots '.' and then, every time you advance a percentage in your loop,
use something like
 #debug concat ("\r", substr(yourString, 1, currentProgress))
and that's all. HTH.


---------
Peter Popov
ICQ: 15002700


Post a reply to this message

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