Index: mttroot/mtt/bin/trans/mtt_m2p ================================================================== --- mttroot/mtt/bin/trans/mtt_m2p +++ mttroot/mtt/bin/trans/mtt_m2p @@ -13,10 +13,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.3 1998/07/25 14:03:30 peterg +## Added () to [] conversion when the variable is i j k or an integer or +## combination +## ## Revision 1.2 1998/07/25 12:39:57 peterg ## begin on same line as for and if ## ## Revision 1.1 1998/07/25 09:42:52 peterg ## Initial revision @@ -42,11 +46,11 @@ Nu=`grep "MTTNu " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'` Ny=`grep "MTTNy " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'` #Regexps name="[a-zA-Z0-9]*" - fun_name="$name\_$name" + fun_name="$Sys\_$name" space="[ \t]*" spaces="[ \t][ \t]*" non_space="[^ ]*" # Heading @@ -80,11 +84,11 @@ 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 " i,j,it,iLast,STEPFACTOR : INTEGER;" echo " METHOD : STRING;" ;; *) echo "PROCEDURE $Sys_rep;" ;; esac) > $Filename @@ -169,11 +173,11 @@ sub(/=/,":=",$0) printf("%s DO BEGIN\n", $0) } else { sub(/=/,":=",$0) - sub(/\^/,"**",$0) + gsub(/\^/,"**",$0) printf("%s\n",$0) } } } }