Fixed bug in ST code generator when function output variable has no name
authorLaurent Bessard
Wed, 15 May 2013 08:20:17 +0200
changeset 1143 59818c488ead
parent 1142 8ded55ada6d6
child 1144 21475ee0e688
Fixed bug in ST code generator when function output variable has no name
plcopen/structures.py
--- a/plcopen/structures.py	Wed May 15 00:30:12 2013 +0200
+++ b/plcopen/structures.py	Wed May 15 08:20:17 2013 +0200
@@ -98,7 +98,7 @@
             if one_input_connected:
                 for i, variable in enumerate(output_variables):
                     parameter = variable.getformalParameter()
-                    if not inout_variables.has_key(parameter) and parameter in output_names + ["ENO"]:
+                    if not inout_variables.has_key(parameter) and parameter in output_names + ["", "ENO"]:
                         if variable.getformalParameter() == "":
                             variable_name = "%s%d"%(type, block.getlocalId())
                         else: