Overview
Comment:Useful utility not yet in mtt
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: fe7a4ae6c6045988b55b5b28d4018665cb31f73ee3bc289774a333b0c95cf271
User & Date: gawthrop@users.sourceforge.net on 2002-11-14 05:48:53
Other Links: branch diff | manifest | tags
Context
2002-11-16
02:58:16
Replaced fixed filename by the argument-generated version check-in: 8d21da1f09 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-11-14
05:48:53
Useful utility not yet in mtt check-in: fe7a4ae6c6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-11-12
17:17:42
Added ability to call ssSetErrorStatus during i/o processing. check-in: b06fa3bb8b user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/numpar2subs_txt2r version [668abd8135].









































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/sh

  ###################################### 
  ##### Model Transformation Tools #####
  ######################################
  
## Makes algebraic substitution file from numpar file.
## Omitting all parameter in 2nd argument

  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ###############################################################

# Copyright (C) 2002 by Peter J. Gawthrop

sys=$1
pars=$2

outfile=${sys}_subs.r
infile=${sys}_numpar.txt

echo Creating ${outfile} from ${infile}
cat<<EOF > ${outfile}_1
%% File ${outfile} generated on `date` from  ${infile}
%% All parameters replaced by numbers except for:
%%   ${pars}

EOF

sed 's/#/%/g' < Compensator_numpar.txt | sed 's/=/:=/' >> ${outfile}_1

cat >> ${outfile}_1 <<EOF
ON ROUNDED; %% Floating point
END;
EOF

gawk '
{
N=split(pars,par);
matched=0;
for (i=1;i<=N;i++)
  if ($1==par[i]) 
    matched=1;

if (!matched) print $0
}' pars="$pars" < ${outfile}_1 > ${outfile}

rm ${outfile}_1


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