File mttroot/mtt/bin/trans/sympar2params_txt2c artifact b4d5f24a4d part of check-in 9c7043790b


#! /bin/sh

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

# Bourne shell script: sympar2params_txt2c

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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1997/03/20 15:17:45  peterg
## All variables are in lower case.
##
# Revision 1.1  1997/03/20  10:25:55  peterg
# Initial revision
#
###############################################################



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

rm -f mtt_error

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


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


echo "#include \"$1_sympar.c\""  >> $1_params.c
echo "$1_params()" >> $1_params.c
echo '{' >> $1_params.c

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

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




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