POV-Ray : Newsgroups : povray.newusers : Good ways to keep curly braces straight : Re: Good ways to keep curly braces straight Server Time
14 May 2024 23:52:37 EDT (-0400)
  Re: Good ways to keep curly braces straight  
From: Alain
Date: 10 Mar 2014 23:00:59
Message: <531e7c6b@news.povray.org>

> ... and the subject was intended to read just like THAT!   :D
>
> Anyway,
> I have a small (~500 line) file that I keep having issues with after
> editing, where I either have an extra, or a missing curly brace.
>
> I'd like some tips and tricks on organizing and visually keeping track
> of my SDL code, and maybe even some clever thingsd embedded in the code
> to help locate where the offending error resides.

Assuming that you are using the Windows version.

With the cursor on a brace, you can use Ctrl+] to find the matching brace.

On the menu, under the "Text" heading, sellect:
Auto-Indent style -> Language scope
Now, if you start a new line after a brace, it will be idented.
After you close a brace, the next line identation will get reduced. When 
you find yourself with no identation, it mean that all braces are matched.
This will also tend to make your code more readable.



Alain


Post a reply to this message

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