chiark / gitweb /
quacks-ingredients: fix syntax error
[reprap-play.git] / quacks-ingredients-counts
index 6f15df0a87ea40749deb6b88e72177aec7d42dd9..5c20fc8ffa5c689d96c2941494f76c906f8d4b0e 100755 (executable)
@@ -57,10 +57,10 @@ our $max_nrows=0;
 our $max_rowsz=0;
 
 sub wrtoplevel () {
-    print "module ${which}_$name(){ ////toplevel\n";
     my $cs = $count{$name};
     my $total = 0; $total += $_ foreach values %$cs;
     return unless $total;
+    print "module ${which}_$name(){ ////toplevel\n";
     my $rowsz = ceil(sqrt($total));
     my $nrows = ceil($total / $rowsz);
     $total_count += $total;