| Next | Program
Repair Shop ![]() |
157 |
print_cell is called from only one place
That is not a red flag
Such subroutines are often valuable for dividing programs into chunks
However, print_cell doesn't actually do anything
295 sub print_cell {
296 my $squares = $_[0]; ##import semi-existant array of squares
297 my $page = $_[1]; ##import html stuffs
298 my $x = $_[2]; ##import the number that the foreach is on
299 my $row = $_[3]; ##import the row we are on
300 my $cell = "[$row][$x]"; ##get square coordinates for use in naming checkbx
301 #
302 print ("<td>");
303 print ("<input type='checkbox' name='choice' value='$cell'>\n");
304 print ("</td>");
305 }
Most of this is structural
Only the three prints are actually interesting
| Next | ![]() |
Copyright © 2002 M. J. Dominus |