File mttroot/mtt/bin/trans/sympar2global_txt2m artifact cef2e8e876 part of check-in 67469e3515


#! /bin/sh

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

# Bourne shell script: sympar2global_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.5  1998/11/18 11:34:24  peterg
## Cleaned up to:
##   work properly for no globals
##   no need to repeat las global
##
## Revision 1.4  1998/07/26 10:44:08  peterg
## Now strips comment lines first
##
## Revision 1.3  1998/07/25 18:27:45  peterg
## now uses the (extended with switch) sympars.txt file
##
## Revision 1.2  1998/03/22 11:13:27  peterg
## Back under RCS
##
# Revision 1.1  1997/04/16  11:37:22  peterg
# Initial revision
#
###############################################################


#Write out the variables in matlab global format
strip_comments <$1_sympars.txt  |\
awk '
{i++; 
  if ((i==1)&&(NF>0)) {
    printf ("global");
    globals_exist=1
  }
  if (NF>0)
    printf (" ...\n     %s", tolower($1));
}
END{
  if (globals_exist)
    print " ;"
}' 

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




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