Changeset 2404
- Timestamp:
- Nov 22, 2004, 7:03:47 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/misc/perlCodeConventions.tex (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/misc/perlCodeConventions.tex
r2403 r2404 1 %%% $Id: perlCodeConventions.tex,v 1.2 7 2004-11-23 04:24:52jhoblitt Exp $1 %%% $Id: perlCodeConventions.tex,v 1.28 2004-11-23 05:03:47 jhoblitt Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1082 1082 \end{verbatim} 1083 1083 1084 \subsubsection{Array Subscripts} 1085 1086 Use ``cuddled'' brackets \code{[]} when accessing an array element. 1087 1088 \begin{verbatim} 1089 $foo[-1]; # Correct 1090 (someSub($foo))[1]; # Correct 1091 $foo[ 6 ]; # AVOID! 1092 \end{verbatim} 1093 1094 \subsubsection{Hash Subscripts} 1095 1096 Use ``cuddled'' brackets \CODE.{}. when accessing a hash element. It is 1097 acceptable to use ``bare-words'' as a hash key (Note: this rule may be subject 1098 to change). 1099 1100 \begin{verbatim} 1101 $foo{bar}; # Correct 1102 $foo{$baz}; # Correct 1103 $foo{'fiddle'}; # Correct 1104 $foo{ lish }; # AVOID! 1105 $foo{ 'zab' }; # AVOID! 1106 \end{verbatim} 1107 1108 1084 1109 %------------------------------------------------------------------------------ 1085 1110 \appendix %Begin Appendices
Note:
See TracChangeset
for help on using the changeset viewer.
