IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 23, 2004, 1:12:00 PM (22 years ago)
Author:
jhoblitt
Message:

allow multiple lexical variables to be declared on the same line under some circumstances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/misc/perlCodeConventions.tex

    r2404 r2407  
    1 %%% $Id: perlCodeConventions.tex,v 1.28 2004-11-23 05:03:47 jhoblitt Exp $
     1%%% $Id: perlCodeConventions.tex,v 1.29 2004-11-23 23:12:00 jhoblitt Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    457457\subsection{Lexical Variables}
    458458
    459 One declaration per line with a single place between \code{my} and the identifier.
     459One declaration per line with a single place between \code{my} and the identifier:
    460460
    461461\begin{verbatim}
     
    464464\end{verbatim}
    465465
    466 is preferred over
     466is preferred over:
    467467
    468468\begin{verbatim}
     
    471471
    472472In almost all situations with the exception of when parameters are being passed
    473 into a subroutine.
    474 
    475 Do not put different types on the same line. Example:
    476 \begin{verbatim}
    477     my ($foo, @fooArray);                  # AVOID!
     473into a subroutine or variables are highly related \emph{and} the intent is
     474plainly obvious.
     475
     476\begin{verbatim}
     477    my ($verbose, $help);                   # Correct when the meaning is clear
     478\end{verbatim}
     479
     480Do not put different types on the same line.  Example:
     481
     482\begin{verbatim}
     483    my ($foo, @fooArray);                   # AVOID!
    478484\end{verbatim}
    479485
Note: See TracChangeset for help on using the changeset viewer.