POV-Ray : Newsgroups : povray.newusers : Good ways to keep curly braces straight : Re: Good ways to keep curly braces straight Server Time
15 May 2024 12:43:51 EDT (-0400)
  Re: Good ways to keep curly braces straight  
From: Le Forgeron
Date: 10 Mar 2014 16:33:49
Message: <531e21ad$1@news.povray.org>
Le 10/03/2014 20:42, Bald Eagle nous fit lire :
> ... 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.

what editor are you using ?
Some have the capability to:
 1. find the matching braces
 2. indent the code according to braces

For instance, with vi/vim/gvim, one basic trick is: all opening &
closing curly are alone on their own line. Indenting is just a matter of
moving to one curly brace and press =% (just two keys: = then % )
and everything inside the block get indented (to the amount of sw, so
':set sw=2' for an indent of 2 spaces)


Post a reply to this message

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