stage4/generate_c/generate_c_il.cc
changeset 762 a3d917474ae4
parent 721 5dc33058e041
child 793 268bf4ca5fa1
equal deleted inserted replaced
761:7b52623a2f37 762:a3d917474ae4
   901       case function_param_iterator_c::direction_in:
   901       case function_param_iterator_c::direction_in:
   902         if (nb_param > 0)
   902         if (nb_param > 0)
   903           s4o.print(",\n"+s4o.indent_spaces);
   903           s4o.print(",\n"+s4o.indent_spaces);
   904         if (param_value == NULL) {
   904         if (param_value == NULL) {
   905           /* If not, get the default value of this variable's type */
   905           /* If not, get the default value of this variable's type */
   906           param_value = (symbol_c *)current_param_type->accept(*type_initial_value_c::instance());
   906           param_value = type_initial_value_c::get(current_param_type);
   907         }
   907         }
   908         if (param_value == NULL) ERROR;
   908         if (param_value == NULL) ERROR;
   909         s4o.print("(");
   909         s4o.print("(");
   910         if (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
   910         if (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
   911           get_datatype_info_c::lint_type_name.accept(*this);
   911           get_datatype_info_c::lint_type_name.accept(*this);
  1290       case function_param_iterator_c::direction_in:
  1290       case function_param_iterator_c::direction_in:
  1291         if (nb_param > 0)
  1291         if (nb_param > 0)
  1292           s4o.print(",\n"+s4o.indent_spaces);
  1292           s4o.print(",\n"+s4o.indent_spaces);
  1293         if (param_value == NULL) {
  1293         if (param_value == NULL) {
  1294           /* If not, get the default value of this variable's type */
  1294           /* If not, get the default value of this variable's type */
  1295           param_value = (symbol_c *)current_param_type->accept(*type_initial_value_c::instance());
  1295           param_value = type_initial_value_c::get(current_param_type);
  1296         }
  1296         }
  1297         if (param_value == NULL) ERROR;
  1297         if (param_value == NULL) ERROR;
  1298         s4o.print("(");
  1298         s4o.print("(");
  1299         if      (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
  1299         if      (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
  1300                  get_datatype_info_c::lint_type_name.accept(*this);
  1300                  get_datatype_info_c::lint_type_name.accept(*this);