Overview
Comment:Declare state array (x).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e031e694ec2de3b5134eb929b5ea41807bdf4079a4d0f00477c5d040a276d059
User & Date: gawthrop@users.sourceforge.net on 1997-05-15 08:33:07
Other Links: branch diff | manifest | tags
Context
1997-05-15
08:39:56
Don't initialise states - now done in numpar file. check-in: b91f5e3f60 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:33:07
Declare state array (x). check-in: e031e694ec user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:30:14
Now write default states (using _struc file). check-in: cde2507a4a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/numpar_txt2c from [4cb2100ab9] to [786083af67].

11
12
13
14
15
16
17



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

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



# Revision 1.2  1997/05/01  08:35:18  peterg
# # is now the comment symbol in the .txt file
#
# Revision 1.1  1997/05/01  08:25:31  peterg
# Initial revision
#
###############################################################







>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3  1997/05/03  15:01:42  peterg
# Don't write out RCS headers.
#
# Revision 1.2  1997/05/01  08:35:18  peterg
# # is now the comment symbol in the .txt file
#
# Revision 1.1  1997/05/01  08:25:31  peterg
# Initial revision
#
###############################################################
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49
50
51
echo '/*' > $1_numpar.c
echo "Parameter file for system $1 ($1_numpar.c)"   >> $1_numpar.c
echo "This file provides the system numerical parameters in c form"  >> $1_numpar.c
echo "Generated by MTT at `date`"  >> $1_numpar.c
echo '*/' >> $1_numpar.c
echo  >> $1_numpar.c


echo "#include \"$1_sympar.c\""  >> $1_numpar.c
echo "$1_numpar()" >> $1_numpar.c
echo '{' >> $1_numpar.c

#Write out the variables in c format.
awk -F#  '{
  if (NF<2) print $1
  if (NF>1)  print $1 "/* " $2 " */"
}' $1_numpar.txt  >> $1_numpar.c
echo '}' >> $1_numpar.c








>











37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
echo '/*' > $1_numpar.c
echo "Parameter file for system $1 ($1_numpar.c)"   >> $1_numpar.c
echo "This file provides the system numerical parameters in c form"  >> $1_numpar.c
echo "Generated by MTT at `date`"  >> $1_numpar.c
echo '*/' >> $1_numpar.c
echo  >> $1_numpar.c

echo "extern double x[MTTNX1];"  >> $1_numpar.c
echo "#include \"$1_sympar.c\""  >> $1_numpar.c
echo "$1_numpar()" >> $1_numpar.c
echo '{' >> $1_numpar.c

#Write out the variables in c format.
awk -F#  '{
  if (NF<2) print $1
  if (NF>1)  print $1 "/* " $2 " */"
}' $1_numpar.txt  >> $1_numpar.c
echo '}' >> $1_numpar.c


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