stage4/generate_cc/generate_cc_st.cc
changeset 24 7e830409f72a
parent 22 08bcc40be1fa
child 25 e6a841e365b7
equal deleted inserted replaced
23:d5b55ac4efe6 24:7e830409f72a
   395 
   395 
   396     /* now output the value assignment */
   396     /* now output the value assignment */
   397     if (param_value != NULL)
   397     if (param_value != NULL)
   398       if ((param_direction == function_param_iterator_c::direction_in) ||
   398       if ((param_direction == function_param_iterator_c::direction_in) ||
   399           (param_direction == function_param_iterator_c::direction_inout)) {
   399           (param_direction == function_param_iterator_c::direction_inout)) {
       
   400         print_variable_prefix();
   400         symbol->fb_name->accept(*this);
   401         symbol->fb_name->accept(*this);
   401         s4o.print(".");
   402         s4o.print(".");
   402         param_name->accept(*this);
   403         param_name->accept(*this);
   403         s4o.print(" = ");
   404         s4o.print(" = ");
   404         param_value->accept(*this);
   405         param_value->accept(*this);
   407   } /* for(...) */
   408   } /* for(...) */
   408 
   409 
   409   /* now call the function... */
   410   /* now call the function... */
   410   function_block_type_name->accept(*this);
   411   function_block_type_name->accept(*this);
   411   s4o.print(FB_FUNCTION_SUFFIX);
   412   s4o.print(FB_FUNCTION_SUFFIX);
   412   s4o.print("(&");
   413   s4o.print("(");
       
   414   print_variable_prefix();
   413   symbol->fb_name->accept(*this);
   415   symbol->fb_name->accept(*this);
   414   s4o.print(")");
   416   s4o.print(")");
   415 
   417 
   416   /* loop through each function parameter, find the variable to which
   418   /* loop through each function parameter, find the variable to which
   417    * we should atribute the value of all output or inoutput parameters.
   419    * we should atribute the value of all output or inoutput parameters.
   433       if ((param_direction == function_param_iterator_c::direction_out) ||
   435       if ((param_direction == function_param_iterator_c::direction_out) ||
   434           (param_direction == function_param_iterator_c::direction_inout)) {
   436           (param_direction == function_param_iterator_c::direction_inout)) {
   435         s4o.print(";\n"+ s4o.indent_spaces);
   437         s4o.print(";\n"+ s4o.indent_spaces);
   436         param_value->accept(*this);
   438         param_value->accept(*this);
   437         s4o.print(" = ");
   439         s4o.print(" = ");
       
   440         print_variable_prefix();
   438         symbol->fb_name->accept(*this);
   441         symbol->fb_name->accept(*this);
   439         s4o.print(".");
   442         s4o.print(".");
   440         param_name->accept(*this);
   443         param_name->accept(*this);
   441       }
   444       }
   442   } /* for(...) */
   445   } /* for(...) */