merge
authorMario de Sousa <msousa@fe.up.pt>
Mon, 26 Nov 2012 16:38:15 +0000
changeset 755 7b90dd17f0ba
parent 752 8f05bde3efa8 (current diff)
parent 754 36f91a5e4fc8 (diff)
child 756 634f476cb60f
merge
--- a/stage1_2/create_enumtype_conversion_functions.cc	Fri Nov 23 09:31:55 2012 +0000
+++ b/stage1_2/create_enumtype_conversion_functions.cc	Mon Nov 26 16:38:15 2012 +0000
@@ -47,7 +47,7 @@
 		"DINT"  ,
 		"LINT"  ,
 		"USINT" ,
-		"UNIT"  ,
+		"UINT"  ,
 		"UDINT" ,
 		"ULINT" ,
 		NULL
@@ -157,6 +157,7 @@
    STRING_TO_<ENUM> := <ENUM.VALUE_N>;
    RETURN;
   END_IF;
+  ENO := FALSE;
   END_FUNCTION
 
   Note: if you change code below remember to update this comment.
@@ -172,9 +173,10 @@
        std::string value = *itr;
        text += "IF IN = '" + value + "' THEN\n";
        text += " " + functionName + " := " + value + ";\n";
-       text += " RETURN;\n";
+       text += " RETURN;\n"; 
        text += "END_IF;\n";
     }
+    text += "ENO := FALSE;\n";
     text += "END_FUNCTION\n\n";
 }
 
@@ -196,6 +198,7 @@
    <ENUM>_TO_STRING := '<ENUM.VALUE_N>';
    RETURN;
   END_IF;
+  ENO := FALSE;
   END_FUNCTION
 
   Note: if you change code below remember to update this comment.
@@ -214,6 +217,7 @@
         text += " RETURN;\n";
         text += "END_IF;\n";
     }
+    text += "ENO := FALSE;\n";
     text += "END_FUNCTION\n\n";
 }
 
@@ -235,6 +239,7 @@
    <INTEGER>_TO_<ENUM> := <ENUM.VALUE_N>;
    RETURN;
   END_IF;
+  ENO := FALSE;
   END_FUNCTION
 
   Note: if you change code below remember to update this comment.
@@ -260,6 +265,7 @@
         text += "END_IF;\n";
         count++;
     }
+    text += "ENO := FALSE;\n";
     text += "END_FUNCTION\n\n";
 }
 
@@ -281,6 +287,7 @@
    <ENUM>_TO_<INTEGER> := N;
    RETURN;
   END_IF;
+  ENO := FALSE;
   END_FUNCTION
 
   Note: if you change code below remember to update this comment.
@@ -306,6 +313,7 @@
         text += "END_IF;\n";
         count++;
     }
+    text += "ENO := FALSE;\n";
     text += "END_FUNCTION\n\n";
 }