Overview
Comment:Dont declare MTTVAR array when there are no variables.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 022d9a8bae2eebcfa41f469b3a8d1a5486a11e9d8cf7bc2680265d09b5b1e9a4
User & Date: gawthrop@users.sourceforge.net on 1997-05-09 14:20:49
Other Links: branch diff | manifest | tags
Context
1997-05-09
14:21:35
Default to flow,component_name check-in: 4c5c40d895 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:20:49
Dont declare MTTVAR array when there are no variables. check-in: 022d9a8bae user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:18:45
Put ./ in front of a.out (again) check-in: 7af1b5e5c1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sympar_txt2r from [c233518259] to [ae3d6f19fa].

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
# Copyright (c) P.J.Gawthrop, 1997.

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



# Revision 1.2  1997/03/18  17:56:35  peterg
# Cosmetic changes.
#
###############################################################


# Inform user
echo "Creating $1_sympar.r"

rm -f mtt_error

#Write some file headers
echo "%% Symbolic parameter file ($1_sympar.r)"  > $1_sympar.r
echo "%% Generated by MTT at `date`"  >> $1_sympar.r
echo  >> $1_sympar.r

#Count the lines in the file
lines=`grep -c  '.' $1_sympar.txt`


echo "MATRIX MTTVAR($lines,1);"   >> $1_sympar.r

echo "MTTNVAR = $lines;"   >> $1_sympar.r
echo   >> $1_sympar.r

#Write out the variables in reduce format.
awk '{i++; print "MTTVAR(" i ",1) := " $1 ";"}' $1_sympar.txt  >> $1_sympar.r

echo 'END;'  >> $1_sympar.r

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









>
>
>


















>
>
|
>
|











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
53
54
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3  1997/03/19  16:39:12  peterg
# Put in the correct date.
#
# Revision 1.2  1997/03/18  17:56:35  peterg
# Cosmetic changes.
#
###############################################################


# Inform user
echo "Creating $1_sympar.r"

rm -f mtt_error

#Write some file headers
echo "%% Symbolic parameter file ($1_sympar.r)"  > $1_sympar.r
echo "%% Generated by MTT at `date`"  >> $1_sympar.r
echo  >> $1_sympar.r

#Count the lines in the file
lines=`grep -c  '.' $1_sympar.txt`

if [ -z "$lines" ]; then
    echo "MATRIX MTTVAR($lines,1);"   >> $1_sympar.r
fi
echo "MTTNVAR := $lines;"   >> $1_sympar.r
echo   >> $1_sympar.r

#Write out the variables in reduce format.
awk '{i++; print "MTTVAR(" i ",1) := " $1 ";"}' $1_sympar.txt  >> $1_sympar.r

echo 'END;'  >> $1_sympar.r

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



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