changeset 298:effde12004ea misc

Comments.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Mar 2015 14:06:38 +0200
parents 0620fe91a259
children 61445fa4b804
files materials/parsematerial.pl
diffstat 1 files changed, 21 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/materials/parsematerial.pl	Mon Mar 09 14:04:44 2015 +0200
+++ b/materials/parsematerial.pl	Mon Mar 09 14:06:38 2015 +0200
@@ -583,7 +583,9 @@
 ### Output functionality begins here
 ###
 
-# Print names only
+###
+### Print material names only, one per line
+###
 if ($opt_mode eq "-names")
 {
   foreach my $name (@entries)
@@ -591,8 +593,9 @@
     print $name."\n";
   }
 }
-
-# Print CSV list
+###
+### Print CSV format list
+###
 elsif ($opt_mode eq "-csv")
 {
   foreach my $name (@entries)
@@ -600,8 +603,9 @@
     print join(";", map { get_datastr($name, $$_{"i"}) } @fieldInfo)."\n";
   }
 }
-
-# Dump normal data to files
+###
+### Dump long-format material data to individual files
+###
 elsif ($opt_mode eq "-dumpfiles")
 {
   foreach my $name (@entries)
@@ -613,8 +617,9 @@
     close(OUTFILE);
   }
 }
-
-# Dump normal data to stdout
+###
+### Dump long-format material data to stdout
+###
 elsif ($opt_mode eq "-dump")
 {
   foreach my $name (@entries)
@@ -624,8 +629,9 @@
     print_material_long(\*STDOUT, $data{$name}, $name);
   }
 }
-
-# Print TinyFugue formatted data
+###
+### Print TinyFugue script variables
+###
 elsif ($opt_mode eq "-tf")
 {
   print "/set gmat_names=".join(' ', @entries)."\n";
@@ -639,8 +645,9 @@
       join('|', @{$matByType{$type}})."\n";
   }
 }
-
-# Print normal table
+###
+### Print a nice ASCII table
+###
 elsif ($opt_mode eq "-table")
 {
   my $str = join("",
@@ -660,8 +667,9 @@
       } @fieldInfo)."\n";
   }
 }
-
-# Dump a Perl module with material data
+###
+### Dump a Perl module with material data
+###
 elsif ($opt_mode eq "-perl")
 {
   $Data::Dumper::Indent = 0;