|
 |
Josh English <Jos### [at] joshuarenglish com> 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
|
 |