POV-Ray : Newsgroups : povray.general : Enabling debug output to console under Windows Server Time
25 Feb 2024 08:29:37 EST (-0500)
  Enabling debug output to console under Windows (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:25:00
Message: <web.63de787e6feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> looks like parsing problem:
> ...
> // #declare s_ = "a string to display"; // This works
> #declare s_ = "----------------- DEBUG -----------------------------"; // This
> not

fwiw, cannot reproduce, works on the Linux box.  as a workaround (perhaps), will
breaking the string in to "{hyphens}", "DEBUG", "{hyphens}" inside the concat
work?  (in my own macros I tend to use the brackets, eg '--[someword]--' to
surround the (key)word)


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:25:00
Message: <web.63de78c86feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> ...
> #error "No objects in scene"

(there is one, though)


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:30:00
Message: <web.63de799b6feb0ae94ad5859710800fb2@news.povray.org>
-------------------------------------
/* try1 */

#version 3.7;

global_settings {assumed_gamma 1}

box {0,1}

// #declare s_ = "a string to display"; // THis works
#declare s_ = "----------------- DEBUG -----------------------------"; // This
not

#debug concat(s_, "\n")

#error "No objects in scene"
// #warning "end-of-file"
-------------------------------------
Gives:
"C:\temp\povtest\try1.pov" line 14: Parse Error: Parse halted by #error
directive: No objects in scene

without console output, but with debug print in try1.txt (attached).


Post a reply to this message


Attachments:
Download 'try1.txt' (1 KB)

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:35:00
Message: <web.63de7a946feb0ae91f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > ...
> > #error "No objects in scene"
>
> (there is one, though)
>
>
> regards, jr.

#declare your = 0;
#declare ears = 1;

// imma gonna
box {your, ears}

I was suggesting suppressing the render output until the other issue got
resolved  :P

I'm gonna get you a pendant that reads "Pedant".


Post a reply to this message

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:35:00
Message: <web.63de7b176feb0ae91f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> -------------------------------------
> /* try1 */
>
> #version 3.7;
>
> global_settings {assumed_gamma 1}
>
> box {0,1}
>
> // #declare s_ = "a string to display"; // THis works
> #declare s_ = "----------------- DEBUG -----------------------------"; // This
> not
>
> #debug concat(s_, "\n")
>
> #error "No objects in scene"
> // #warning "end-of-file"
> -------------------------------------
> Gives:
> "C:\temp\povtest\try1.pov" line 14: Parse Error: Parse halted by #error
> directive: No objects in scene
>
> without console output, but with debug print in try1.txt (attached).


Hi Sergey,

Excellent.   Now you can comment out the #error message and get on with what
you've been trying to do for the last several hours.

This is "fun", eh?

-Bill


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:50:00
Message: <web.63de7e8a6feb0ae94ad5859710800fb2@news.povray.org>
Hi,

> I'm gonna get you a pendant that reads "Pedant".
Thanks, this is a part of the profession )

> This is "fun", eh?
No doubt )

Final word: number of hyphens are matter - threshold is 14:

#declare s_ = "--------------";  // This works
#declare s_ = "---------------"; // This not

Regards,
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de82e66feb0ae91f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:

> "Final word"

HAhahahahahahahahahahahahahahahahaha!  Famous last words.  :D

I'm dying over here.

I'm getting output with:

#debug
"----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------\n"

But there is definitely something strange going on with the string size, the
output to the file, and possibly with concat ().


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de82f56feb0ae992a18f0689db30a9@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> Hi,
>
> > I'm gonna get you a pendant that reads "Pedant".
> Thanks, this is a part of the profession )
>
> > This is "fun", eh?
> No doubt )
>
> Final word: number of hyphens are matter - threshold is 14:
>
> #declare s_ = "--------------";  // This works
> #declare s_ = "---------------"; // This not

I just tested in the official Windows v3.7:
If there are several lines with 15 or more minuses, the first one is
converted to a solid horizontal line and the others are not shown.
It might be a feature - but I would consider it to be a bug.

Also, if you do not add a "\n" after the last debug line, it is
not shown.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de83196feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> ...
> > This is "fun", eh?
> No doubt )

BE's not wrong though.  the parser is full of "surprises", and I think it's
pretty cool you should have managed to run into your first, so quickly :-).

re '#debug', although you can make strings longer than 255 chars, #debug will
silently truncate lines to its "preferred" limit; I once ran into this, if in
doubt emit short(er) lines/text.


> Final word: number of hyphens are matter - threshold is 14:

:-)


regards, jr.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Enabling debug output to console under Windows
Date: 5 Feb 2023 10:39:45
Message: <63dfcdc1$1@news.povray.org>
Op 4-2-2023 om 16:32 schreef Bald Eagle:
> #declare your = 0;
> #declare ears = 1;
> 
> // imma gonna
> box {your, ears}
> 

LOL!

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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