Changeset 2478
- Timestamp:
- Nov 24, 2004, 4:40:37 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/misc/perlCodeConventions.tex (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/misc/perlCodeConventions.tex
r2474 r2478 1 %%% $Id: perlCodeConventions.tex,v 1.3 6 2004-11-25 02:23:35jhoblitt Exp $1 %%% $Id: perlCodeConventions.tex,v 1.37 2004-11-25 02:40:37 jhoblitt Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 292 292 \item Prefer higher-level breaks to lower-level breaks. 293 293 294 \item Align the new line with the beginning of the expression at the 295 same level on the previous line\footnote{For emacs users, this means 296 the indentation that \code{<tab>} generally produces}. 297 298 \item If the above rules lead to confusing code or to code that's 299 squished up against the right margin, just indent 8 spaces 300 instead.\footnote{This should be \emph{very} rare! Consider whether 301 you should be e.g. factoring code into a subroutine.} 294 \item Indent new lines 4 spaces deeper than the nesting depth of the line on 295 which the expression began. 296 297 \item If it is convenient to list one statement per line (similar to a hash 298 declaration) place the closing parenthesis or brace on a new line. 302 299 303 300 \end{itemize} … … 307 304 \begin{verbatim} 308 305 someSub(longExpression1, longExpression2, longExpression3, 309 longExpression4, longExpression5);306 longExpression4, longExpression5); 310 307 311 $var = someSub(longExpression1, 312 someSub(longExpression2, 313 longExpression3)); 308 $var = someSub( 309 longExpression1, 310 someSub(longExpression2, longExpression3) 311 ); 314 312 \end{verbatim} 315 313 … … 333 331 334 332 $alpha = (aLongBooleanExpression) ? $beta 335 : $gamma;333 : $gamma; 336 334 337 335 $alpha = (aLongBooleanExpression) 338 ? $beta339 : $gamma;336 ? $beta 337 : $gamma; 340 338 \end{verbatim} 341 339
Note:
See TracChangeset
for help on using the changeset viewer.
