Overview
| Comment: | i --> MTTi |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
d0d26321edd5d35a8f7c9ee67ee5446a |
| User & Date: | gawthrop@users.sourceforge.net on 1998-07-26 11:11:32.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1998-07-26
| ||
| 11:13:38 |
Fixed name classes with globs - ide is that all @strong{MTT} variables start with @strong{MTT} check-in: 954ceb115a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 11:11:32 | i --> MTTi check-in: d0d26321ed user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 11:02:20 |
Put mtt or MTT in front of variable names to avoid clashes with globals check-in: 8d8ebf28ff user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/switch_txt2m
from [3ecc3caa72]
to [bf7ae14172].
| ︙ | ︙ | |||
18 19 20 21 22 23 24 |
#Write some file headers
lang_header $1 switch m mttx '[mttxs]' > $1_switch.m
# This is the main transformation using gawk
awk '{
if ($1=="#"){
| | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#Write some file headers
lang_header $1 switch m mttx '[mttxs]' > $1_switch.m
# This is the main transformation using gawk
awk '{
if ($1=="#"){
printf("for MTTi=1:%s\n", Nx)
printf(" mttxs(MTTi) = mttx(MTTi);\n")
printf("end;\n\n")
}
else{
printf("if (%s==0.0)\n mttxs(%s)=0.0;\nend;\n\n", $1,$2)
printf("if (%s<0.0)\n if (mttx(%s)<0.0)\n mttxs(%s)=0.0;\n end;\nend;\n", $1,$2,$2)
}
}' Nx=$Nx < $1_switch.txt >> $1_switch.m
|
| ︙ | ︙ |