Overview
Comment:Moved headers in shell script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 108bdd7d5045b3aad8e58a495d6f6ee8128ad7bc0b949d8adc7cb13521265b20
User & Date: gawthrop@users.sourceforge.net on 1996-08-30 19:37:43
Other Links: branch diff | manifest | tags
Context
1996-08-30
19:42:36
Added newline at end of file. check-in: f7bf929c86 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:37:43
Moved headers in shell script. check-in: 108bdd7d50 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:05:52
Initial revision check-in: a2ef29aad5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sympar2numpar_r2m from [af70df1666] to [391cb8639d].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16



17
18
19
20
21
22
23
#! /bin/sh

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

# Bourne shell script: mknumpar
# Creates the deafault numerical parameters file for the system

# Copyright (c) P.J.Gawthrop 1996

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



## 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).
##
## Revision 1.4  1996/08/15 12:46:59  peter






|









>
>
>







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
#! /bin/sh

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

# 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).
##
## Revision 1.4  1996/08/15 12:46:59  peter
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
##
###############################################################

# Inform user
echo Creating $1_numpar.m

# Remove the old log file
rm -f mknumpar.log


# Use reduce to accomplish the transformation
reduce >mknumpar.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";

IF MTTNvar>0 THEN
BEGIN
  write "global ...;;";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), " ..."







<
|


|







|
<
<
<







38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
53
54
55
56



57
58
59
60
61
62
63
##
###############################################################

# Inform user
echo Creating $1_numpar.m

# Remove the old log file

rm -f sympar2numpar_r2m.log

# Use reduce to accomplish the transformation
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_numpar1.m";




IF MTTNvar>0 THEN
BEGIN
  write "global ...;;";
  FOR i := 1:MTTNvar DO
  BEGIN
     IF i<MTTNvar THEN write MTTVar(i,1), " ..."
74
75
76
77
78
79
80
81























82
83
84
85
86
87
88
89
90
91
92
93
    write MTTVar(i,1), "  = 1;	% Default value";
  END;
END;

if MTTNVar=0 THEN
  write "foo=0";

SHUT "$1_numpar.m";










































|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    write MTTVar(i,1), "  = 1;	% Default value";
  END;
END;

if MTTNVar=0 THEN
  write "foo=0";

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




















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