Overview
Comment:begin on same line as for and if
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 30c874d920342ee7a9e1d6685ac57a27f9140973db90d0f1f537547d6e12fe06
User & Date: gawthrop@users.sourceforge.net on 1998-07-25 12:39:57
Other Links: branch diff | manifest | tags
Context
1998-07-25
13:05:46
Reorganised initialisation check-in: b1d77fef00 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:39:57
begin on same line as for and if check-in: 30c874d920 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:43:10
No assignments of x or u if sm rep. check-in: 1086ab7408 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_m2p from [eafaf239b6] to [1a6aeb0003].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop 1998

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



###############################################################



# Set up variables
args=`echo $1 | sed 's/_/ /' | sed 's/\./ /'`
Sys=`echo $args  | awk '{print $1}'`







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/07/25 09:42:52  peterg
## Initial revision
##
###############################################################



# Set up variables
args=`echo $1 | sed 's/_/ /' | sed 's/\./ /'`
Sys=`echo $args  | awk '{print $1}'`
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
	echo "    InputVector  =ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector =ARRAY[1..$Ny] OF REAL;"
	echo "VAR"
        echo "    t,LAST,DT : REAL;"
	echo "    mttx,mttdx      : StateVector;"
	echo "    mttu            : InputVector;"
	echo "    mtty            : OutputVector;"
	echo "    i,j,k,it,iLast,STEPFACTOR,METHOD : INTEGER;"

        ;;
    *)	echo "PROCEDURE $Sys_rep;"
        ;;
esac) > $Filename

cat<<EOF >> $Filename








|
>







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	echo "    InputVector  =ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector =ARRAY[1..$Ny] OF REAL;"
	echo "VAR"
        echo "    t,LAST,DT : REAL;"
	echo "    mttx,mttdx      : StateVector;"
	echo "    mttu            : InputVector;"
	echo "    mtty            : OutputVector;"
	echo "    i,j,k,it,iLast,STEPFACTOR : INTEGER;"
	echo "    METHOD : STRING;"
        ;;
    *)	echo "PROCEDURE $Sys_rep;"
        ;;
esac) > $Filename

cat<<EOF >> $Filename

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
        if (doing_header==1)
          comment[++j] = $0
        else
          printf("%s\n", $0)
      }
      else {
        if ($1=="if") {
          print tolower($0)
          print "begin"
        }
        else{ 
          if ($1=="for"){
          sub(/:/," TO ",$0)
          sub(/=/,":=",$0)
          printf("%s DO\n", $0)
          print "begin"
          }
          else {
            sub(/=/,":=",$0)
            sub(/\^/,"**",$0)
            printf("%s\n",$0)
          }
        }







|
<





|
<







153
154
155
156
157
158
159
160

161
162
163
164
165
166

167
168
169
170
171
172
173
        if (doing_header==1)
          comment[++j] = $0
        else
          printf("%s\n", $0)
      }
      else {
        if ($1=="if") {
          print tolower($0) " begin"

        }
        else{ 
          if ($1=="for"){
          sub(/:/," TO ",$0)
          sub(/=/,":=",$0)
          printf("%s DO\n", $0) " begin"

          }
          else {
            sub(/=/,":=",$0)
            sub(/\^/,"**",$0)
            printf("%s\n",$0)
          }
        }
182
183
184
185
186
187
188

189
190

191
192
    else
      print "END;"
}' sys=$sys rep=$rep Nx=$Nx Nu=$Nu |\
sed 's/(\([0-9]*\))/\[\1\]/' \
>> $Filename

# p2c doesn't like mixed case filenames!

echo Creating $filename
cp $Filename $filename










>
|
|
>


184
185
186
187
188
189
190
191
192
193
194
195
196
    else
      print "END;"
}' sys=$sys rep=$rep Nx=$Nx Nu=$Nu |\
sed 's/(\([0-9]*\))/\[\1\]/' \
>> $Filename

# p2c doesn't like mixed case filenames!
if [ "$Filename" != "$filename" ]; then
  echo Creating $filename
  cp -f $Filename $filename
fi



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