POV-Ray : Newsgroups : povray.general : Serializing a dictionary : Re: Serializing a dictionary Server Time
12 Jul 2025 22:05:10 EDT (-0400)
  Re: Serializing a dictionary  
From: Bald Eagle
Date: 7 Jul 2025 10:30:00
Message: <web.686bd980e086e5d1f625f77c25979125@news.povray.org>
Josh English <Jos### [at] joshuarenglishcom> wrote:

> AAARGH! Thank you. Yeah, that was the problem (and the missing quotation
> marks in the resulting text file).
>
> I wish the Windows UI had a better way to tell me where the errors
> actually are. I make mistakes like this and it fails in some other part
> of the code.
>
> I want to build a linter for POV-Ray some day, maybe that will help.

So, this is a common problem, with start and end bracketing "directives" or
whatever we call them

#if #end
#while #end
texture {     }
function {     }
etc

I use large (5-space) TABS to maximize the visual placing of the start and end
of my code blocks.

I have also (mostly) trained myself to type the opening AND closing parts first,
and then fill in the space between.

On top of that, if I'm not being lazy, I specifically comment my closing
directive to match the opening one.  I will number or name nested code blocks.
"Outer", "Middle", "Inner"
"#if 1", "#if 2", "#if 3"

I wrote a bunch of macros to help keep track of where in the hierarchy I am when
my code craps out.

Maybe someone can suggest a command-line script to grep opening and closing
parentheses and give a count.

Might be able to paste it into a spreadsheet and get a count that way.

- BE


Post a reply to this message

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