Differences From Artifact [c3e5676656]:

To Artifact [ea07b68f51]:


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

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

# Bourne shell script: sympar2par_txt2m

# Symbolic parameters parameter conversion
# Used in lang_header
# Copyright (C) 2000 by Peter J. Gawthrop




case $2 in
    zero)
	  strip_comments <$1_sympar.txt  |\
          gawk '{
          i++; printf("  %s %s = 0.0;\n",  tolower($1));
          }' 
	;;
    set)
	  strip_comments <$1_sympar.txt  |\
         gawk '{
           i++; printf("  %s mttpar(%i) \t= %s;\n", i, tolower($1));
         }' 
        ;;
    *)
         strip_comments <$1_sympar.txt  |\
         gawk '{
           i++; printf("  %s %s \t= mttpar(%i%s);\n", decl, tolower($1), i, minusone);
         }' decl="$3" minusone="$4"
	;;
esac
















>
>
>
















|
|






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

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

# Bourne shell script: sympar2par_txt2m

# Symbolic parameters parameter conversion
# Used in lang_header
# Copyright (C) 2000 by Peter J. Gawthrop

Lb=${5:-'('}
Rb=${6:-')'}

case $2 in
    zero)
	  strip_comments <$1_sympar.txt  |\
          gawk '{
          i++; printf("  %s %s = 0.0;\n",  tolower($1));
          }' 
	;;
    set)
	  strip_comments <$1_sympar.txt  |\
         gawk '{
           i++; printf("  %s mttpar(%i) \t= %s;\n", i, tolower($1));
         }' 
        ;;
    *)
         strip_comments <$1_sympar.txt  |\
         gawk '{
           i++; printf("  %s %s \t= mttpar%c%i%s%c;\n", decl, tolower($1), Lb, i, minusone, Rb);
         }' decl="$3" minusone="$4" Lb=$Lb Rb=$Rb
	;;
esac





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