File mttroot/mtt/bin/trans/sympar2params_txt2m artifact cb4bac324f part of check-in fc177d09e6


#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: sympar2params_txt2m

# Symbolic parameters to default paramers (m)
# P.J.Gawthrop March 1997
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1997/04/17 11:18:34  peterg
## Write out the RCS header first!
##
# Revision 1.2  1997/04/16  11:40:31  peterg
# Added global variables.
#
# Revision 1.1  1997/04/16  11:31:41  peterg
# Initial revision
#
###############################################################



# Inform user
echo "Creating $1_params.m"

rm -f mtt_error

#Write some file headers
echo "% Parameter file for system $1 ($1_params.m)"   > $1_params.m
echo "% This file provides the system params for simulation:"  >> $1_params.m
echo "% Generated by MTT at `date`"  >> $1_params.m
echo "% These default parameters should be changed by the user"  >> $1_params.m
echo  >> $1_params.m

cat $MTTPATH/trans/rcs_header.m >> $1_params.m
echo  >> $1_params.m


#Write out the global variables
sympar2global_txt2m $1 >> $1_params.m


#Write out the variables in c format.
gawk '{i++; print tolower($1) " = \t1.0;"}' $1_sympar.txt  >> $1_params.m

# Now invoke the standard error handling.
# mtt_error mtt_error.txt




MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]