Index: mttroot/mtt/bin/trans/sympar2numpar_r2m
==================================================================
--- mttroot/mtt/bin/trans/sympar2numpar_r2m
+++ mttroot/mtt/bin/trans/sympar2numpar_r2m
@@ -2,20 +2,23 @@
 
      ###################################### 
      ##### Model Transformation Tools #####
      ######################################
 
-# Bourne shell script: mknumpar
+# Bourne shell script: sympar2numpar_r2m
 # Creates the deafault numerical parameters file for the system
 
 # Copyright (c) P.J.Gawthrop 1996
 
 ###############################################################
 ## Version control history
 ###############################################################
 ## $Id$
 ## $Log$
+## Revision 1.7  1996/08/24 14:11:56  peter
+## Global parameter passing.
+##
 ## Revision 1.6  1996/08/20 08:21:24  peter
 ## *** empty log message ***
 ##
 ## Revision 1.5  1996/08/16 14:27:25  peter
 ## Make a dummy function when no parameters (MTTNVar=0).
@@ -37,26 +40,22 @@
 
 # Inform user
 echo Creating $1_numpar.m
 
 # Remove the old log file
-rm -f mknumpar.log
-
+rm -f sympar2numpar_r2m.log
 
 # Use reduce to accomplish the transformation
-reduce >mknumpar.log << EOF
+reduce >sympar2numpar_r2m.log << EOF
 
 %Set up the number of argument variables to zero in case the user has forgotten
 MTTNVar := 0;
 
 %Read the symbolic parameters file
 IN "$1_sympar.r";
 
-OUT "$1_numpar.m";
-
-write "% Script $1_numpar;";
-write "% Created by MTT";
+OUT "$1_numpar1.m";
 
 IF MTTNvar>0 THEN
 BEGIN
   write "global ...;;";
   FOR i := 1:MTTNvar DO
@@ -76,11 +75,34 @@
 END;
 
 if MTTNVar=0 THEN
   write "foo=0";
 
-SHUT "$1_numpar.m";
+SHUT "$1_numpar1.m";
+
+EOF
+
+matlab_tidy $1_numpar1.m
+
+#Create the numpar file complete with headers.
+echo "%% Symbolic parameter file ($1_numpar.m)" > $1_numpar.m
+echo "%% Generated by MTT at `date`" >> $1_numpar.m
+cat $MTTPATH/trans/m/rcs_header.txt  >> $1_numpar.m
+cat $1_numpar1.m >> $1_numpar.m
+
+rm $1_numpar1.m
+
+
+# Now invoke the standard error handling.
+mtt_error_r sympar2numpar_r2m.log
+
+
+
+
+
+
+