in reply to Syntax errors with {s
if ($var < 0) { <do something> if ($var2 == 1) { <do something else> }#close second if } elsif ($var == 0) { <do this other thing> } else { <do something completely different> }#close first if
Its really a matter of preference, find something that works and stick with it. Keeping things indented and in line helps as well. Marking the closing braces can be used with for loops, code blocks or anything like that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Syntax errors with {s
by Prior Nacre V (Hermit) on Oct 11, 2004 at 10:25 UTC |