Fix bug SFC action index declarations were different in POUS.c and VARIABLES.csv when boolean variables are used as action name in step action association
authorLaurent Bessard
Wed, 12 Sep 2012 01:14:38 +0200
changeset 630 5250fbf20999
parent 629 06abc9867095
child 631 1a4f5ce62962
Fix bug SFC action index declarations were different in POUS.c and VARIABLES.csv when boolean variables are used as action name in step action association
stage4/generate_c/generate_c_sfcdecl.cc
--- a/stage4/generate_c/generate_c_sfcdecl.cc	Tue Sep 11 16:27:33 2012 +0200
+++ b/stage4/generate_c/generate_c_sfcdecl.cc	Wed Sep 12 01:14:38 2012 +0200
@@ -192,6 +192,8 @@
           break;
         case actiondef_sd:
           s4o.print("// Actions definitions\n");
+          for(int i = 0; i < symbol->n; i++)
+             symbol->elements[i]->accept(*this);
           {
             std::list<VARIABLE>::iterator pt;
             for(pt = variable_list.begin(); pt != variable_list.end(); pt++) {
@@ -204,8 +206,6 @@
               action_number++;
             }
           }
-          for(int i = 0; i < symbol->n; i++)
-            symbol->elements[i]->accept(*this);
           s4o.print("\n");
           break;
         case stepundef_sd: