Gabriel Guzman <mailto:[EMAIL PROTECTED]>
on Tuesday, July 29, 2003 9:44 AM said:
> A tip on avoiding errors cause by not enough }'s is to close any
> bracket immediately after you open it, so if I were writing a block
> of code:
Good tip. I do this too.
> I would write the above first, and then fill in between the {}'s.
[snip]
> You can do this with others, but these are
> usually the hardest to track down once you have a large amount of
> code (with a large number of {}).
Especially when you write code like:
function doit() {
for() {
if() {
...
} else {
...
}
}
}
As opposed to the much easier to read (and line up curly braces) method:
function doit()
{
for()
{
if()
}
...
}
else
{
...
}
}
}
See how those curly braces line up all nicely? ;)
chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php