stage4/generate_c/st_code_gen.c
changeset 316 baa7a1585585
parent 314 41d4ac0b4821
child 348 990ecb883731
equal deleted inserted replaced
315:c62a4078f269 316:baa7a1585585
    29 /****
    29 /****
    30  *REAL_TO_SINT
    30  *REAL_TO_SINT
    31  */
    31  */
    32     case function_real_to_sint :
    32     case function_real_to_sint :
    33     {
    33     {
       
    34         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
    35 
       
    36         {
       
    37             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
    38             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    39             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
    40             symbol_c *IN_type_symbol = NULL;
       
    41             
       
    42             /* Get the value from a foo(<param_value>) style call */
       
    43             if (IN_param_value == NULL)
       
    44               IN_param_value = function_call_param_iterator.next_nf();
       
    45             if (IN_param_value != NULL) {
       
    46               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    47               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    48             }
       
    49             
       
    50             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
    51             {
       
    52         
       
    53                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
    54                 
       
    55                 if (IN_type_symbol == NULL)
       
    56                   IN_type_symbol = last_type_symbol;
       
    57                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
    58                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    59                 function_type_prefix = return_type_symbol;
       
    60                 break;
       
    61                 
       
    62             }
       
    63             
       
    64             
       
    65             ERROR;
       
    66         }
       
    67         
       
    68     }/*function_real_to_sint*/
       
    69     break;
       
    70 
       
    71 /****
       
    72  *REAL_TO_LINT
       
    73  */
       
    74     case function_real_to_lint :
       
    75     {
       
    76         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
    77 
       
    78         {
       
    79             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
    80             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    81             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
    82             symbol_c *IN_type_symbol = NULL;
       
    83             
       
    84             /* Get the value from a foo(<param_value>) style call */
       
    85             if (IN_param_value == NULL)
       
    86               IN_param_value = function_call_param_iterator.next_nf();
       
    87             if (IN_param_value != NULL) {
       
    88               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    89               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    90             }
       
    91             
       
    92             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
    93             {
       
    94         
       
    95                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
    96                 
       
    97                 if (IN_type_symbol == NULL)
       
    98                   IN_type_symbol = last_type_symbol;
       
    99                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   100                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   101                 function_type_prefix = return_type_symbol;
       
   102                 break;
       
   103                 
       
   104             }
       
   105             
       
   106             
       
   107             ERROR;
       
   108         }
       
   109         
       
   110     }/*function_real_to_lint*/
       
   111     break;
       
   112 
       
   113 /****
       
   114  *REAL_TO_DINT
       
   115  */
       
   116     case function_real_to_dint :
       
   117     {
       
   118         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   119 
       
   120         {
       
   121             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   122             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   123             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   124             symbol_c *IN_type_symbol = NULL;
       
   125             
       
   126             /* Get the value from a foo(<param_value>) style call */
       
   127             if (IN_param_value == NULL)
       
   128               IN_param_value = function_call_param_iterator.next_nf();
       
   129             if (IN_param_value != NULL) {
       
   130               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   131               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   132             }
       
   133             
       
   134             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   135             {
       
   136         
       
   137                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
   138                 
       
   139                 if (IN_type_symbol == NULL)
       
   140                   IN_type_symbol = last_type_symbol;
       
   141                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   142                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   143                 function_type_prefix = return_type_symbol;
       
   144                 break;
       
   145                 
       
   146             }
       
   147             
       
   148             
       
   149             ERROR;
       
   150         }
       
   151         
       
   152     }/*function_real_to_dint*/
       
   153     break;
       
   154 
       
   155 /****
       
   156  *REAL_TO_DATE
       
   157  */
       
   158     case function_real_to_date :
       
   159     {
       
   160         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   161 
       
   162         {
       
   163             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   165             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   166             symbol_c *IN_type_symbol = NULL;
       
   167             
       
   168             /* Get the value from a foo(<param_value>) style call */
       
   169             if (IN_param_value == NULL)
       
   170               IN_param_value = function_call_param_iterator.next_nf();
       
   171             if (IN_param_value != NULL) {
       
   172               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   173               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   174             }
       
   175             
       
   176             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   177             {
       
   178         
       
   179                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   180                 
       
   181                 if (IN_type_symbol == NULL)
       
   182                   IN_type_symbol = last_type_symbol;
       
   183                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   184                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   185                 function_type_prefix = return_type_symbol;
       
   186                 break;
       
   187                 
       
   188             }
       
   189             
       
   190             
       
   191             ERROR;
       
   192         }
       
   193         
       
   194     }/*function_real_to_date*/
       
   195     break;
       
   196 
       
   197 /****
       
   198  *REAL_TO_DWORD
       
   199  */
       
   200     case function_real_to_dword :
       
   201     {
       
   202         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   203 
       
   204         {
       
   205             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   206             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   207             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   208             symbol_c *IN_type_symbol = NULL;
       
   209             
       
   210             /* Get the value from a foo(<param_value>) style call */
       
   211             if (IN_param_value == NULL)
       
   212               IN_param_value = function_call_param_iterator.next_nf();
       
   213             if (IN_param_value != NULL) {
       
   214               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   215               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   216             }
       
   217             
       
   218             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   219             {
       
   220         
       
   221                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   222                 
       
   223                 if (IN_type_symbol == NULL)
       
   224                   IN_type_symbol = last_type_symbol;
       
   225                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   226                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   227                 function_type_prefix = return_type_symbol;
       
   228                 break;
       
   229                 
       
   230             }
       
   231             
       
   232             
       
   233             ERROR;
       
   234         }
       
   235         
       
   236     }/*function_real_to_dword*/
       
   237     break;
       
   238 
       
   239 /****
       
   240  *REAL_TO_DT
       
   241  */
       
   242     case function_real_to_dt :
       
   243     {
       
   244         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   245 
       
   246         {
       
   247             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   249             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   250             symbol_c *IN_type_symbol = NULL;
       
   251             
       
   252             /* Get the value from a foo(<param_value>) style call */
       
   253             if (IN_param_value == NULL)
       
   254               IN_param_value = function_call_param_iterator.next_nf();
       
   255             if (IN_param_value != NULL) {
       
   256               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   257               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   258             }
       
   259             
       
   260             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   261             {
       
   262         
       
   263                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   264                 
       
   265                 if (IN_type_symbol == NULL)
       
   266                   IN_type_symbol = last_type_symbol;
       
   267                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   268                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   269                 function_type_prefix = return_type_symbol;
       
   270                 break;
       
   271                 
       
   272             }
       
   273             
       
   274             
       
   275             ERROR;
       
   276         }
       
   277         
       
   278     }/*function_real_to_dt*/
       
   279     break;
       
   280 
       
   281 /****
       
   282  *REAL_TO_TOD
       
   283  */
       
   284     case function_real_to_tod :
       
   285     {
       
   286         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   287 
       
   288         {
       
   289             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   291             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   292             symbol_c *IN_type_symbol = NULL;
       
   293             
       
   294             /* Get the value from a foo(<param_value>) style call */
       
   295             if (IN_param_value == NULL)
       
   296               IN_param_value = function_call_param_iterator.next_nf();
       
   297             if (IN_param_value != NULL) {
       
   298               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   299               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   300             }
       
   301             
       
   302             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   303             {
       
   304         
       
   305                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   306                 
       
   307                 if (IN_type_symbol == NULL)
       
   308                   IN_type_symbol = last_type_symbol;
       
   309                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   310                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   311                 function_type_prefix = return_type_symbol;
       
   312                 break;
       
   313                 
       
   314             }
       
   315             
       
   316             
       
   317             ERROR;
       
   318         }
       
   319         
       
   320     }/*function_real_to_tod*/
       
   321     break;
       
   322 
       
   323 /****
       
   324  *REAL_TO_UDINT
       
   325  */
       
   326     case function_real_to_udint :
       
   327     {
       
   328         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   329 
       
   330         {
       
   331             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   333             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   334             symbol_c *IN_type_symbol = NULL;
       
   335             
       
   336             /* Get the value from a foo(<param_value>) style call */
       
   337             if (IN_param_value == NULL)
       
   338               IN_param_value = function_call_param_iterator.next_nf();
       
   339             if (IN_param_value != NULL) {
       
   340               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   341               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   342             }
       
   343             
       
   344             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   345             {
       
   346         
       
   347                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   348                 
       
   349                 if (IN_type_symbol == NULL)
       
   350                   IN_type_symbol = last_type_symbol;
       
   351                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   352                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   353                 function_type_prefix = return_type_symbol;
       
   354                 break;
       
   355                 
       
   356             }
       
   357             
       
   358             
       
   359             ERROR;
       
   360         }
       
   361         
       
   362     }/*function_real_to_udint*/
       
   363     break;
       
   364 
       
   365 /****
       
   366  *REAL_TO_WORD
       
   367  */
       
   368     case function_real_to_word :
       
   369     {
       
   370         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   371 
       
   372         {
       
   373             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   374             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   375             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   376             symbol_c *IN_type_symbol = NULL;
       
   377             
       
   378             /* Get the value from a foo(<param_value>) style call */
       
   379             if (IN_param_value == NULL)
       
   380               IN_param_value = function_call_param_iterator.next_nf();
       
   381             if (IN_param_value != NULL) {
       
   382               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   383               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   384             }
       
   385             
       
   386             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   387             {
       
   388         
       
   389                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   390                 
       
   391                 if (IN_type_symbol == NULL)
       
   392                   IN_type_symbol = last_type_symbol;
       
   393                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   394                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   395                 function_type_prefix = return_type_symbol;
       
   396                 break;
       
   397                 
       
   398             }
       
   399             
       
   400             
       
   401             ERROR;
       
   402         }
       
   403         
       
   404     }/*function_real_to_word*/
       
   405     break;
       
   406 
       
   407 /****
       
   408  *REAL_TO_STRING
       
   409  */
       
   410     case function_real_to_string :
       
   411     {
       
   412         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   413 
       
   414         {
       
   415             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   417             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   418             symbol_c *IN_type_symbol = NULL;
       
   419             
       
   420             /* Get the value from a foo(<param_value>) style call */
       
   421             if (IN_param_value == NULL)
       
   422               IN_param_value = function_call_param_iterator.next_nf();
       
   423             if (IN_param_value != NULL) {
       
   424               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   425               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   426             }
       
   427             
       
   428             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   429             {
       
   430         
       
   431                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
       
   432                 
       
   433                 if (IN_type_symbol == NULL)
       
   434                   IN_type_symbol = last_type_symbol;
       
   435                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   436                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   437                 function_type_prefix = return_type_symbol;
       
   438                 break;
       
   439                 
       
   440             }
       
   441             
       
   442             
       
   443             ERROR;
       
   444         }
       
   445         
       
   446     }/*function_real_to_string*/
       
   447     break;
       
   448 
       
   449 /****
       
   450  *REAL_TO_LWORD
       
   451  */
       
   452     case function_real_to_lword :
       
   453     {
       
   454         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   455 
       
   456         {
       
   457             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   458             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   459             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   460             symbol_c *IN_type_symbol = NULL;
       
   461             
       
   462             /* Get the value from a foo(<param_value>) style call */
       
   463             if (IN_param_value == NULL)
       
   464               IN_param_value = function_call_param_iterator.next_nf();
       
   465             if (IN_param_value != NULL) {
       
   466               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   467               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   468             }
       
   469             
       
   470             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   471             {
       
   472         
       
   473                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   474                 
       
   475                 if (IN_type_symbol == NULL)
       
   476                   IN_type_symbol = last_type_symbol;
       
   477                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   478                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   479                 function_type_prefix = return_type_symbol;
       
   480                 break;
       
   481                 
       
   482             }
       
   483             
       
   484             
       
   485             ERROR;
       
   486         }
       
   487         
       
   488     }/*function_real_to_lword*/
       
   489     break;
       
   490 
       
   491 /****
       
   492  *REAL_TO_UINT
       
   493  */
       
   494     case function_real_to_uint :
       
   495     {
       
   496         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   497 
       
   498         {
       
   499             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   500             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   501             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   502             symbol_c *IN_type_symbol = NULL;
       
   503             
       
   504             /* Get the value from a foo(<param_value>) style call */
       
   505             if (IN_param_value == NULL)
       
   506               IN_param_value = function_call_param_iterator.next_nf();
       
   507             if (IN_param_value != NULL) {
       
   508               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   509               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   510             }
       
   511             
       
   512             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   513             {
       
   514         
       
   515                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   516                 
       
   517                 if (IN_type_symbol == NULL)
       
   518                   IN_type_symbol = last_type_symbol;
       
   519                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   520                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   521                 function_type_prefix = return_type_symbol;
       
   522                 break;
       
   523                 
       
   524             }
       
   525             
       
   526             
       
   527             ERROR;
       
   528         }
       
   529         
       
   530     }/*function_real_to_uint*/
       
   531     break;
       
   532 
       
   533 /****
       
   534  *REAL_TO_LREAL
       
   535  */
       
   536     case function_real_to_lreal :
       
   537     {
       
   538         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   539 
       
   540         {
       
   541             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   542             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   543             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   544             symbol_c *IN_type_symbol = NULL;
       
   545             
       
   546             /* Get the value from a foo(<param_value>) style call */
       
   547             if (IN_param_value == NULL)
       
   548               IN_param_value = function_call_param_iterator.next_nf();
       
   549             if (IN_param_value != NULL) {
       
   550               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   551               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   552             }
       
   553             
       
   554             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   555             {
       
   556         
       
   557                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   558                 
       
   559                 if (IN_type_symbol == NULL)
       
   560                   IN_type_symbol = last_type_symbol;
       
   561                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   562                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   563                 function_type_prefix = return_type_symbol;
       
   564                 function_type_suffix = IN_type_symbol;
       
   565                 break;
       
   566                 
       
   567             }
       
   568             
       
   569             
       
   570             ERROR;
       
   571         }
       
   572         
       
   573     }/*function_real_to_lreal*/
       
   574     break;
       
   575 
       
   576 /****
       
   577  *REAL_TO_BYTE
       
   578  */
       
   579     case function_real_to_byte :
       
   580     {
       
   581         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   582 
       
   583         {
       
   584             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   585             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   586             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   587             symbol_c *IN_type_symbol = NULL;
       
   588             
       
   589             /* Get the value from a foo(<param_value>) style call */
       
   590             if (IN_param_value == NULL)
       
   591               IN_param_value = function_call_param_iterator.next_nf();
       
   592             if (IN_param_value != NULL) {
       
   593               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   594               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   595             }
       
   596             
       
   597             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   598             {
       
   599         
       
   600                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   601                 
       
   602                 if (IN_type_symbol == NULL)
       
   603                   IN_type_symbol = last_type_symbol;
       
   604                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   605                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   606                 function_type_prefix = return_type_symbol;
       
   607                 break;
       
   608                 
       
   609             }
       
   610             
       
   611             
       
   612             ERROR;
       
   613         }
       
   614         
       
   615     }/*function_real_to_byte*/
       
   616     break;
       
   617 
       
   618 /****
       
   619  *REAL_TO_USINT
       
   620  */
       
   621     case function_real_to_usint :
       
   622     {
       
   623         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   624 
       
   625         {
       
   626             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   627             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   628             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   629             symbol_c *IN_type_symbol = NULL;
       
   630             
       
   631             /* Get the value from a foo(<param_value>) style call */
       
   632             if (IN_param_value == NULL)
       
   633               IN_param_value = function_call_param_iterator.next_nf();
       
   634             if (IN_param_value != NULL) {
       
   635               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   636               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   637             }
       
   638             
       
   639             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   640             {
       
   641         
       
   642                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   643                 
       
   644                 if (IN_type_symbol == NULL)
       
   645                   IN_type_symbol = last_type_symbol;
       
   646                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   647                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   648                 function_type_prefix = return_type_symbol;
       
   649                 break;
       
   650                 
       
   651             }
       
   652             
       
   653             
       
   654             ERROR;
       
   655         }
       
   656         
       
   657     }/*function_real_to_usint*/
       
   658     break;
       
   659 
       
   660 /****
       
   661  *REAL_TO_ULINT
       
   662  */
       
   663     case function_real_to_ulint :
       
   664     {
       
   665         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   666 
       
   667         {
       
   668             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   669             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   670             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   671             symbol_c *IN_type_symbol = NULL;
       
   672             
       
   673             /* Get the value from a foo(<param_value>) style call */
       
   674             if (IN_param_value == NULL)
       
   675               IN_param_value = function_call_param_iterator.next_nf();
       
   676             if (IN_param_value != NULL) {
       
   677               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   678               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   679             }
       
   680             
       
   681             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   682             {
       
   683         
       
   684                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   685                 
       
   686                 if (IN_type_symbol == NULL)
       
   687                   IN_type_symbol = last_type_symbol;
       
   688                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   689                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   690                 function_type_prefix = return_type_symbol;
       
   691                 break;
       
   692                 
       
   693             }
       
   694             
       
   695             
       
   696             ERROR;
       
   697         }
       
   698         
       
   699     }/*function_real_to_ulint*/
       
   700     break;
       
   701 
       
   702 /****
       
   703  *REAL_TO_BOOL
       
   704  */
       
   705     case function_real_to_bool :
       
   706     {
       
   707         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   708 
       
   709         {
       
   710             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   711             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   712             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   713             symbol_c *IN_type_symbol = NULL;
       
   714             
       
   715             /* Get the value from a foo(<param_value>) style call */
       
   716             if (IN_param_value == NULL)
       
   717               IN_param_value = function_call_param_iterator.next_nf();
       
   718             if (IN_param_value != NULL) {
       
   719               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   720               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   721             }
       
   722             
       
   723             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   724             {
       
   725         
       
   726                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   727                 
       
   728                 if (IN_type_symbol == NULL)
       
   729                   IN_type_symbol = last_type_symbol;
       
   730                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   731                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   732                 function_type_prefix = return_type_symbol;
       
   733                 break;
       
   734                 
       
   735             }
       
   736             
       
   737             
       
   738             ERROR;
       
   739         }
       
   740         
       
   741     }/*function_real_to_bool*/
       
   742     break;
       
   743 
       
   744 /****
       
   745  *REAL_TO_TIME
       
   746  */
       
   747     case function_real_to_time :
       
   748     {
       
   749         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   750 
       
   751         {
       
   752             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   753             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   754             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   755             symbol_c *IN_type_symbol = NULL;
       
   756             
       
   757             /* Get the value from a foo(<param_value>) style call */
       
   758             if (IN_param_value == NULL)
       
   759               IN_param_value = function_call_param_iterator.next_nf();
       
   760             if (IN_param_value != NULL) {
       
   761               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   762               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   763             }
       
   764             
       
   765             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   766             {
       
   767         
       
   768                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   769                 
       
   770                 if (IN_type_symbol == NULL)
       
   771                   IN_type_symbol = last_type_symbol;
       
   772                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   773                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   774                 function_type_prefix = return_type_symbol;
       
   775                 break;
       
   776                 
       
   777             }
       
   778             
       
   779             
       
   780             ERROR;
       
   781         }
       
   782         
       
   783     }/*function_real_to_time*/
       
   784     break;
       
   785 
       
   786 /****
       
   787  *REAL_TO_INT
       
   788  */
       
   789     case function_real_to_int :
       
   790     {
       
   791         symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
       
   792 
       
   793         {
       
   794             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   796             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   797             symbol_c *IN_type_symbol = NULL;
       
   798             
       
   799             /* Get the value from a foo(<param_value>) style call */
       
   800             if (IN_param_value == NULL)
       
   801               IN_param_value = function_call_param_iterator.next_nf();
       
   802             if (IN_param_value != NULL) {
       
   803               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   804               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   805             }
       
   806             
       
   807             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   808             {
       
   809         
       
   810                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
   811                 
       
   812                 if (IN_type_symbol == NULL)
       
   813                   IN_type_symbol = last_type_symbol;
       
   814                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   815                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   816                 function_type_prefix = return_type_symbol;
       
   817                 break;
       
   818                 
       
   819             }
       
   820             
       
   821             
       
   822             ERROR;
       
   823         }
       
   824         
       
   825     }/*function_real_to_int*/
       
   826     break;
       
   827 
       
   828 /****
       
   829  *SINT_TO_REAL
       
   830  */
       
   831     case function_sint_to_real :
       
   832     {
       
   833         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
   834 
       
   835         {
       
   836             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   837             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   838             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   839             symbol_c *IN_type_symbol = NULL;
       
   840             
       
   841             /* Get the value from a foo(<param_value>) style call */
       
   842             if (IN_param_value == NULL)
       
   843               IN_param_value = function_call_param_iterator.next_nf();
       
   844             if (IN_param_value != NULL) {
       
   845               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   846               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   847             }
       
   848             
       
   849             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   850             {
       
   851         
       
   852                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   853                 
       
   854                 if (IN_type_symbol == NULL)
       
   855                   IN_type_symbol = last_type_symbol;
       
   856                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   857                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   858                 function_type_prefix = return_type_symbol;
       
   859                 function_type_suffix = IN_type_symbol;
       
   860                 break;
       
   861                 
       
   862             }
       
   863             
       
   864             
       
   865             ERROR;
       
   866         }
       
   867         
       
   868     }/*function_sint_to_real*/
       
   869     break;
       
   870 
       
   871 /****
       
   872  *SINT_TO_LINT
       
   873  */
       
   874     case function_sint_to_lint :
       
   875     {
       
   876         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
   877 
       
   878         {
       
   879             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   881             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   882             symbol_c *IN_type_symbol = NULL;
       
   883             
       
   884             /* Get the value from a foo(<param_value>) style call */
       
   885             if (IN_param_value == NULL)
       
   886               IN_param_value = function_call_param_iterator.next_nf();
       
   887             if (IN_param_value != NULL) {
       
   888               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   889               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   890             }
       
   891             
       
   892             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   893             {
       
   894         
       
   895                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   896                 
       
   897                 if (IN_type_symbol == NULL)
       
   898                   IN_type_symbol = last_type_symbol;
       
   899                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   900                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   901                 function_type_prefix = return_type_symbol;
       
   902                 function_type_suffix = IN_type_symbol;
       
   903                 break;
       
   904                 
       
   905             }
       
   906             
       
   907             
       
   908             ERROR;
       
   909         }
       
   910         
       
   911     }/*function_sint_to_lint*/
       
   912     break;
       
   913 
       
   914 /****
       
   915  *SINT_TO_DINT
       
   916  */
       
   917     case function_sint_to_dint :
       
   918     {
       
   919         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
   920 
       
   921         {
       
   922             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   923             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   924             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   925             symbol_c *IN_type_symbol = NULL;
       
   926             
       
   927             /* Get the value from a foo(<param_value>) style call */
       
   928             if (IN_param_value == NULL)
       
   929               IN_param_value = function_call_param_iterator.next_nf();
       
   930             if (IN_param_value != NULL) {
       
   931               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   932               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   933             }
       
   934             
       
   935             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   936             {
       
   937         
       
   938                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   939                 
       
   940                 if (IN_type_symbol == NULL)
       
   941                   IN_type_symbol = last_type_symbol;
       
   942                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   943                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   944                 function_type_prefix = return_type_symbol;
       
   945                 function_type_suffix = IN_type_symbol;
       
   946                 break;
       
   947                 
       
   948             }
       
   949             
       
   950             
       
   951             ERROR;
       
   952         }
       
   953         
       
   954     }/*function_sint_to_dint*/
       
   955     break;
       
   956 
       
   957 /****
       
   958  *SINT_TO_DATE
       
   959  */
       
   960     case function_sint_to_date :
       
   961     {
       
   962         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
   963 
       
   964         {
       
   965             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   966             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   967             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   968             symbol_c *IN_type_symbol = NULL;
       
   969             
       
   970             /* Get the value from a foo(<param_value>) style call */
       
   971             if (IN_param_value == NULL)
       
   972               IN_param_value = function_call_param_iterator.next_nf();
       
   973             if (IN_param_value != NULL) {
       
   974               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   975               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   976             }
       
   977             
       
   978             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   979             {
       
   980         
       
   981                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
   982                 
       
   983                 if (IN_type_symbol == NULL)
       
   984                   IN_type_symbol = last_type_symbol;
       
   985                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   986                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   987                 function_type_prefix = return_type_symbol;
       
   988                 break;
       
   989                 
       
   990             }
       
   991             
       
   992             
       
   993             ERROR;
       
   994         }
       
   995         
       
   996     }/*function_sint_to_date*/
       
   997     break;
       
   998 
       
   999 /****
       
  1000  *SINT_TO_DWORD
       
  1001  */
       
  1002     case function_sint_to_dword :
       
  1003     {
       
  1004         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1005 
       
  1006         {
       
  1007             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1009             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1010             symbol_c *IN_type_symbol = NULL;
       
  1011             
       
  1012             /* Get the value from a foo(<param_value>) style call */
       
  1013             if (IN_param_value == NULL)
       
  1014               IN_param_value = function_call_param_iterator.next_nf();
       
  1015             if (IN_param_value != NULL) {
       
  1016               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1017               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1018             }
       
  1019             
       
  1020             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1021             {
       
  1022         
       
  1023                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1024                 
       
  1025                 if (IN_type_symbol == NULL)
       
  1026                   IN_type_symbol = last_type_symbol;
       
  1027                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1029                 function_type_prefix = return_type_symbol;
       
  1030                 function_type_suffix = IN_type_symbol;
       
  1031                 break;
       
  1032                 
       
  1033             }
       
  1034             
       
  1035             
       
  1036             ERROR;
       
  1037         }
       
  1038         
       
  1039     }/*function_sint_to_dword*/
       
  1040     break;
       
  1041 
       
  1042 /****
       
  1043  *SINT_TO_DT
       
  1044  */
       
  1045     case function_sint_to_dt :
       
  1046     {
       
  1047         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1048 
       
  1049         {
       
  1050             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1052             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1053             symbol_c *IN_type_symbol = NULL;
       
  1054             
       
  1055             /* Get the value from a foo(<param_value>) style call */
       
  1056             if (IN_param_value == NULL)
       
  1057               IN_param_value = function_call_param_iterator.next_nf();
       
  1058             if (IN_param_value != NULL) {
       
  1059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1061             }
       
  1062             
       
  1063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1064             {
       
  1065         
       
  1066                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1067                 
       
  1068                 if (IN_type_symbol == NULL)
       
  1069                   IN_type_symbol = last_type_symbol;
       
  1070                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1071                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1072                 function_type_prefix = return_type_symbol;
       
  1073                 break;
       
  1074                 
       
  1075             }
       
  1076             
       
  1077             
       
  1078             ERROR;
       
  1079         }
       
  1080         
       
  1081     }/*function_sint_to_dt*/
       
  1082     break;
       
  1083 
       
  1084 /****
       
  1085  *SINT_TO_TOD
       
  1086  */
       
  1087     case function_sint_to_tod :
       
  1088     {
       
  1089         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1090 
       
  1091         {
       
  1092             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1094             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1095             symbol_c *IN_type_symbol = NULL;
       
  1096             
       
  1097             /* Get the value from a foo(<param_value>) style call */
       
  1098             if (IN_param_value == NULL)
       
  1099               IN_param_value = function_call_param_iterator.next_nf();
       
  1100             if (IN_param_value != NULL) {
       
  1101               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1102               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1103             }
       
  1104             
       
  1105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1106             {
       
  1107         
       
  1108                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1109                 
       
  1110                 if (IN_type_symbol == NULL)
       
  1111                   IN_type_symbol = last_type_symbol;
       
  1112                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1113                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1114                 function_type_prefix = return_type_symbol;
       
  1115                 break;
       
  1116                 
       
  1117             }
       
  1118             
       
  1119             
       
  1120             ERROR;
       
  1121         }
       
  1122         
       
  1123     }/*function_sint_to_tod*/
       
  1124     break;
       
  1125 
       
  1126 /****
       
  1127  *SINT_TO_UDINT
       
  1128  */
       
  1129     case function_sint_to_udint :
       
  1130     {
       
  1131         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1132 
       
  1133         {
       
  1134             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1135             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1136             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1137             symbol_c *IN_type_symbol = NULL;
       
  1138             
       
  1139             /* Get the value from a foo(<param_value>) style call */
       
  1140             if (IN_param_value == NULL)
       
  1141               IN_param_value = function_call_param_iterator.next_nf();
       
  1142             if (IN_param_value != NULL) {
       
  1143               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1144               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1145             }
       
  1146             
       
  1147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1148             {
       
  1149         
       
  1150                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1151                 
       
  1152                 if (IN_type_symbol == NULL)
       
  1153                   IN_type_symbol = last_type_symbol;
       
  1154                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1155                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1156                 function_type_prefix = return_type_symbol;
       
  1157                 function_type_suffix = IN_type_symbol;
       
  1158                 break;
       
  1159                 
       
  1160             }
       
  1161             
       
  1162             
       
  1163             ERROR;
       
  1164         }
       
  1165         
       
  1166     }/*function_sint_to_udint*/
       
  1167     break;
       
  1168 
       
  1169 /****
       
  1170  *SINT_TO_WORD
       
  1171  */
       
  1172     case function_sint_to_word :
       
  1173     {
       
  1174         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1175 
       
  1176         {
       
  1177             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1178             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1179             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1180             symbol_c *IN_type_symbol = NULL;
       
  1181             
       
  1182             /* Get the value from a foo(<param_value>) style call */
       
  1183             if (IN_param_value == NULL)
       
  1184               IN_param_value = function_call_param_iterator.next_nf();
       
  1185             if (IN_param_value != NULL) {
       
  1186               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1187               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1188             }
       
  1189             
       
  1190             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1191             {
       
  1192         
       
  1193                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1194                 
       
  1195                 if (IN_type_symbol == NULL)
       
  1196                   IN_type_symbol = last_type_symbol;
       
  1197                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1198                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1199                 function_type_prefix = return_type_symbol;
       
  1200                 function_type_suffix = IN_type_symbol;
       
  1201                 break;
       
  1202                 
       
  1203             }
       
  1204             
       
  1205             
       
  1206             ERROR;
       
  1207         }
       
  1208         
       
  1209     }/*function_sint_to_word*/
       
  1210     break;
       
  1211 
       
  1212 /****
       
  1213  *SINT_TO_STRING
       
  1214  */
       
  1215     case function_sint_to_string :
       
  1216     {
       
  1217         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1218 
       
  1219         {
       
  1220             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1221             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1222             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1223             symbol_c *IN_type_symbol = NULL;
       
  1224             
       
  1225             /* Get the value from a foo(<param_value>) style call */
       
  1226             if (IN_param_value == NULL)
       
  1227               IN_param_value = function_call_param_iterator.next_nf();
       
  1228             if (IN_param_value != NULL) {
       
  1229               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1230               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1231             }
       
  1232             
       
  1233             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1234             {
       
  1235         
       
  1236                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  1237                 
       
  1238                 if (IN_type_symbol == NULL)
       
  1239                   IN_type_symbol = last_type_symbol;
       
  1240                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1241                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1242                 function_type_prefix = return_type_symbol;
       
  1243                 break;
       
  1244                 
       
  1245             }
       
  1246             
       
  1247             
       
  1248             ERROR;
       
  1249         }
       
  1250         
       
  1251     }/*function_sint_to_string*/
       
  1252     break;
       
  1253 
       
  1254 /****
       
  1255  *SINT_TO_LWORD
       
  1256  */
       
  1257     case function_sint_to_lword :
       
  1258     {
       
  1259         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1260 
       
  1261         {
       
  1262             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1263             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1264             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1265             symbol_c *IN_type_symbol = NULL;
       
  1266             
       
  1267             /* Get the value from a foo(<param_value>) style call */
       
  1268             if (IN_param_value == NULL)
       
  1269               IN_param_value = function_call_param_iterator.next_nf();
       
  1270             if (IN_param_value != NULL) {
       
  1271               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1272               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1273             }
       
  1274             
       
  1275             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1276             {
       
  1277         
       
  1278                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1279                 
       
  1280                 if (IN_type_symbol == NULL)
       
  1281                   IN_type_symbol = last_type_symbol;
       
  1282                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1283                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1284                 function_type_prefix = return_type_symbol;
       
  1285                 function_type_suffix = IN_type_symbol;
       
  1286                 break;
       
  1287                 
       
  1288             }
       
  1289             
       
  1290             
       
  1291             ERROR;
       
  1292         }
       
  1293         
       
  1294     }/*function_sint_to_lword*/
       
  1295     break;
       
  1296 
       
  1297 /****
       
  1298  *SINT_TO_UINT
       
  1299  */
       
  1300     case function_sint_to_uint :
       
  1301     {
       
  1302         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1303 
       
  1304         {
       
  1305             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1306             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1307             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1308             symbol_c *IN_type_symbol = NULL;
       
  1309             
       
  1310             /* Get the value from a foo(<param_value>) style call */
       
  1311             if (IN_param_value == NULL)
       
  1312               IN_param_value = function_call_param_iterator.next_nf();
       
  1313             if (IN_param_value != NULL) {
       
  1314               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1315               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1316             }
       
  1317             
       
  1318             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1319             {
       
  1320         
       
  1321                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1322                 
       
  1323                 if (IN_type_symbol == NULL)
       
  1324                   IN_type_symbol = last_type_symbol;
       
  1325                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1326                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1327                 function_type_prefix = return_type_symbol;
       
  1328                 function_type_suffix = IN_type_symbol;
       
  1329                 break;
       
  1330                 
       
  1331             }
       
  1332             
       
  1333             
       
  1334             ERROR;
       
  1335         }
       
  1336         
       
  1337     }/*function_sint_to_uint*/
       
  1338     break;
       
  1339 
       
  1340 /****
       
  1341  *SINT_TO_LREAL
       
  1342  */
       
  1343     case function_sint_to_lreal :
       
  1344     {
       
  1345         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1346 
       
  1347         {
       
  1348             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1349             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1350             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1351             symbol_c *IN_type_symbol = NULL;
       
  1352             
       
  1353             /* Get the value from a foo(<param_value>) style call */
       
  1354             if (IN_param_value == NULL)
       
  1355               IN_param_value = function_call_param_iterator.next_nf();
       
  1356             if (IN_param_value != NULL) {
       
  1357               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1358               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1359             }
       
  1360             
       
  1361             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1362             {
       
  1363         
       
  1364                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1365                 
       
  1366                 if (IN_type_symbol == NULL)
       
  1367                   IN_type_symbol = last_type_symbol;
       
  1368                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1369                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1370                 function_type_prefix = return_type_symbol;
       
  1371                 function_type_suffix = IN_type_symbol;
       
  1372                 break;
       
  1373                 
       
  1374             }
       
  1375             
       
  1376             
       
  1377             ERROR;
       
  1378         }
       
  1379         
       
  1380     }/*function_sint_to_lreal*/
       
  1381     break;
       
  1382 
       
  1383 /****
       
  1384  *SINT_TO_BYTE
       
  1385  */
       
  1386     case function_sint_to_byte :
       
  1387     {
       
  1388         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1389 
       
  1390         {
       
  1391             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1393             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1394             symbol_c *IN_type_symbol = NULL;
       
  1395             
       
  1396             /* Get the value from a foo(<param_value>) style call */
       
  1397             if (IN_param_value == NULL)
       
  1398               IN_param_value = function_call_param_iterator.next_nf();
       
  1399             if (IN_param_value != NULL) {
       
  1400               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1401               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1402             }
       
  1403             
       
  1404             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1405             {
       
  1406         
       
  1407                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1408                 
       
  1409                 if (IN_type_symbol == NULL)
       
  1410                   IN_type_symbol = last_type_symbol;
       
  1411                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1413                 function_type_prefix = return_type_symbol;
       
  1414                 function_type_suffix = IN_type_symbol;
       
  1415                 break;
       
  1416                 
       
  1417             }
       
  1418             
       
  1419             
       
  1420             ERROR;
       
  1421         }
       
  1422         
       
  1423     }/*function_sint_to_byte*/
       
  1424     break;
       
  1425 
       
  1426 /****
       
  1427  *SINT_TO_USINT
       
  1428  */
       
  1429     case function_sint_to_usint :
       
  1430     {
       
  1431         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1432 
       
  1433         {
       
  1434             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1436             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1437             symbol_c *IN_type_symbol = NULL;
       
  1438             
       
  1439             /* Get the value from a foo(<param_value>) style call */
       
  1440             if (IN_param_value == NULL)
       
  1441               IN_param_value = function_call_param_iterator.next_nf();
       
  1442             if (IN_param_value != NULL) {
       
  1443               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1444               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1445             }
       
  1446             
       
  1447             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1448             {
       
  1449         
       
  1450                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1451                 
       
  1452                 if (IN_type_symbol == NULL)
       
  1453                   IN_type_symbol = last_type_symbol;
       
  1454                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1455                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1456                 function_type_prefix = return_type_symbol;
       
  1457                 function_type_suffix = IN_type_symbol;
       
  1458                 break;
       
  1459                 
       
  1460             }
       
  1461             
       
  1462             
       
  1463             ERROR;
       
  1464         }
       
  1465         
       
  1466     }/*function_sint_to_usint*/
       
  1467     break;
       
  1468 
       
  1469 /****
       
  1470  *SINT_TO_ULINT
       
  1471  */
       
  1472     case function_sint_to_ulint :
       
  1473     {
       
  1474         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1475 
       
  1476         {
       
  1477             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1479             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1480             symbol_c *IN_type_symbol = NULL;
       
  1481             
       
  1482             /* Get the value from a foo(<param_value>) style call */
       
  1483             if (IN_param_value == NULL)
       
  1484               IN_param_value = function_call_param_iterator.next_nf();
       
  1485             if (IN_param_value != NULL) {
       
  1486               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1487               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1488             }
       
  1489             
       
  1490             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1491             {
       
  1492         
       
  1493                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1494                 
       
  1495                 if (IN_type_symbol == NULL)
       
  1496                   IN_type_symbol = last_type_symbol;
       
  1497                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1498                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1499                 function_type_prefix = return_type_symbol;
       
  1500                 function_type_suffix = IN_type_symbol;
       
  1501                 break;
       
  1502                 
       
  1503             }
       
  1504             
       
  1505             
       
  1506             ERROR;
       
  1507         }
       
  1508         
       
  1509     }/*function_sint_to_ulint*/
       
  1510     break;
       
  1511 
       
  1512 /****
       
  1513  *SINT_TO_BOOL
       
  1514  */
       
  1515     case function_sint_to_bool :
       
  1516     {
       
  1517         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1518 
       
  1519         {
       
  1520             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1522             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1523             symbol_c *IN_type_symbol = NULL;
       
  1524             
       
  1525             /* Get the value from a foo(<param_value>) style call */
       
  1526             if (IN_param_value == NULL)
       
  1527               IN_param_value = function_call_param_iterator.next_nf();
       
  1528             if (IN_param_value != NULL) {
       
  1529               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1530               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1531             }
       
  1532             
       
  1533             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1534             {
       
  1535         
       
  1536                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1537                 
       
  1538                 if (IN_type_symbol == NULL)
       
  1539                   IN_type_symbol = last_type_symbol;
       
  1540                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1541                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1542                 function_type_prefix = return_type_symbol;
       
  1543                 function_type_suffix = IN_type_symbol;
       
  1544                 break;
       
  1545                 
       
  1546             }
       
  1547             
       
  1548             
       
  1549             ERROR;
       
  1550         }
       
  1551         
       
  1552     }/*function_sint_to_bool*/
       
  1553     break;
       
  1554 
       
  1555 /****
       
  1556  *SINT_TO_TIME
       
  1557  */
       
  1558     case function_sint_to_time :
       
  1559     {
       
  1560         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1561 
       
  1562         {
       
  1563             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1564             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1565             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1566             symbol_c *IN_type_symbol = NULL;
       
  1567             
       
  1568             /* Get the value from a foo(<param_value>) style call */
       
  1569             if (IN_param_value == NULL)
       
  1570               IN_param_value = function_call_param_iterator.next_nf();
       
  1571             if (IN_param_value != NULL) {
       
  1572               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1573               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1574             }
       
  1575             
       
  1576             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1577             {
       
  1578         
       
  1579                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1580                 
       
  1581                 if (IN_type_symbol == NULL)
       
  1582                   IN_type_symbol = last_type_symbol;
       
  1583                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1584                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1585                 function_type_prefix = return_type_symbol;
       
  1586                 break;
       
  1587                 
       
  1588             }
       
  1589             
       
  1590             
       
  1591             ERROR;
       
  1592         }
       
  1593         
       
  1594     }/*function_sint_to_time*/
       
  1595     break;
       
  1596 
       
  1597 /****
       
  1598  *SINT_TO_INT
       
  1599  */
       
  1600     case function_sint_to_int :
       
  1601     {
       
  1602         symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
       
  1603 
       
  1604         {
       
  1605             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1607             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1608             symbol_c *IN_type_symbol = NULL;
       
  1609             
       
  1610             /* Get the value from a foo(<param_value>) style call */
       
  1611             if (IN_param_value == NULL)
       
  1612               IN_param_value = function_call_param_iterator.next_nf();
       
  1613             if (IN_param_value != NULL) {
       
  1614               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1615               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1616             }
       
  1617             
       
  1618             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1619             {
       
  1620         
       
  1621                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1622                 
       
  1623                 if (IN_type_symbol == NULL)
       
  1624                   IN_type_symbol = last_type_symbol;
       
  1625                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1626                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1627                 function_type_prefix = return_type_symbol;
       
  1628                 function_type_suffix = IN_type_symbol;
       
  1629                 break;
       
  1630                 
       
  1631             }
       
  1632             
       
  1633             
       
  1634             ERROR;
       
  1635         }
       
  1636         
       
  1637     }/*function_sint_to_int*/
       
  1638     break;
       
  1639 
       
  1640 /****
       
  1641  *LINT_TO_REAL
       
  1642  */
       
  1643     case function_lint_to_real :
       
  1644     {
       
  1645         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1646 
       
  1647         {
       
  1648             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1649             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1650             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1651             symbol_c *IN_type_symbol = NULL;
       
  1652             
       
  1653             /* Get the value from a foo(<param_value>) style call */
       
  1654             if (IN_param_value == NULL)
       
  1655               IN_param_value = function_call_param_iterator.next_nf();
       
  1656             if (IN_param_value != NULL) {
       
  1657               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1658               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1659             }
       
  1660             
       
  1661             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1662             {
       
  1663         
       
  1664                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1665                 
       
  1666                 if (IN_type_symbol == NULL)
       
  1667                   IN_type_symbol = last_type_symbol;
       
  1668                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1669                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1670                 function_type_prefix = return_type_symbol;
       
  1671                 function_type_suffix = IN_type_symbol;
       
  1672                 break;
       
  1673                 
       
  1674             }
       
  1675             
       
  1676             
       
  1677             ERROR;
       
  1678         }
       
  1679         
       
  1680     }/*function_lint_to_real*/
       
  1681     break;
       
  1682 
       
  1683 /****
       
  1684  *LINT_TO_SINT
       
  1685  */
       
  1686     case function_lint_to_sint :
       
  1687     {
       
  1688         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1689 
       
  1690         {
       
  1691             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1692             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1693             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1694             symbol_c *IN_type_symbol = NULL;
       
  1695             
       
  1696             /* Get the value from a foo(<param_value>) style call */
       
  1697             if (IN_param_value == NULL)
       
  1698               IN_param_value = function_call_param_iterator.next_nf();
       
  1699             if (IN_param_value != NULL) {
       
  1700               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1701               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1702             }
       
  1703             
       
  1704             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1705             {
       
  1706         
       
  1707                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1708                 
       
  1709                 if (IN_type_symbol == NULL)
       
  1710                   IN_type_symbol = last_type_symbol;
       
  1711                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1712                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1713                 function_type_prefix = return_type_symbol;
       
  1714                 function_type_suffix = IN_type_symbol;
       
  1715                 break;
       
  1716                 
       
  1717             }
       
  1718             
       
  1719             
       
  1720             ERROR;
       
  1721         }
       
  1722         
       
  1723     }/*function_lint_to_sint*/
       
  1724     break;
       
  1725 
       
  1726 /****
       
  1727  *LINT_TO_DINT
       
  1728  */
       
  1729     case function_lint_to_dint :
       
  1730     {
       
  1731         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1732 
       
  1733         {
       
  1734             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1736             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1737             symbol_c *IN_type_symbol = NULL;
       
  1738             
       
  1739             /* Get the value from a foo(<param_value>) style call */
       
  1740             if (IN_param_value == NULL)
       
  1741               IN_param_value = function_call_param_iterator.next_nf();
       
  1742             if (IN_param_value != NULL) {
       
  1743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1744               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1745             }
       
  1746             
       
  1747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1748             {
       
  1749         
       
  1750                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1751                 
       
  1752                 if (IN_type_symbol == NULL)
       
  1753                   IN_type_symbol = last_type_symbol;
       
  1754                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1755                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1756                 function_type_prefix = return_type_symbol;
       
  1757                 function_type_suffix = IN_type_symbol;
       
  1758                 break;
       
  1759                 
       
  1760             }
       
  1761             
       
  1762             
       
  1763             ERROR;
       
  1764         }
       
  1765         
       
  1766     }/*function_lint_to_dint*/
       
  1767     break;
       
  1768 
       
  1769 /****
       
  1770  *LINT_TO_DATE
       
  1771  */
       
  1772     case function_lint_to_date :
       
  1773     {
       
  1774         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1775 
       
  1776         {
       
  1777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1780             symbol_c *IN_type_symbol = NULL;
       
  1781             
       
  1782             /* Get the value from a foo(<param_value>) style call */
       
  1783             if (IN_param_value == NULL)
       
  1784               IN_param_value = function_call_param_iterator.next_nf();
       
  1785             if (IN_param_value != NULL) {
       
  1786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1787               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1788             }
       
  1789             
       
  1790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1791             {
       
  1792         
       
  1793                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1794                 
       
  1795                 if (IN_type_symbol == NULL)
       
  1796                   IN_type_symbol = last_type_symbol;
       
  1797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1798                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1799                 function_type_prefix = return_type_symbol;
       
  1800                 break;
       
  1801                 
       
  1802             }
       
  1803             
       
  1804             
       
  1805             ERROR;
       
  1806         }
       
  1807         
       
  1808     }/*function_lint_to_date*/
       
  1809     break;
       
  1810 
       
  1811 /****
       
  1812  *LINT_TO_DWORD
       
  1813  */
       
  1814     case function_lint_to_dword :
       
  1815     {
       
  1816         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1817 
       
  1818         {
       
  1819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1822             symbol_c *IN_type_symbol = NULL;
       
  1823             
       
  1824             /* Get the value from a foo(<param_value>) style call */
       
  1825             if (IN_param_value == NULL)
       
  1826               IN_param_value = function_call_param_iterator.next_nf();
       
  1827             if (IN_param_value != NULL) {
       
  1828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1830             }
       
  1831             
       
  1832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1833             {
       
  1834         
       
  1835                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1836                 
       
  1837                 if (IN_type_symbol == NULL)
       
  1838                   IN_type_symbol = last_type_symbol;
       
  1839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1840                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1841                 function_type_prefix = return_type_symbol;
       
  1842                 function_type_suffix = IN_type_symbol;
       
  1843                 break;
       
  1844                 
       
  1845             }
       
  1846             
       
  1847             
       
  1848             ERROR;
       
  1849         }
       
  1850         
       
  1851     }/*function_lint_to_dword*/
       
  1852     break;
       
  1853 
       
  1854 /****
       
  1855  *LINT_TO_DT
       
  1856  */
       
  1857     case function_lint_to_dt :
       
  1858     {
       
  1859         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1860 
       
  1861         {
       
  1862             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1864             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1865             symbol_c *IN_type_symbol = NULL;
       
  1866             
       
  1867             /* Get the value from a foo(<param_value>) style call */
       
  1868             if (IN_param_value == NULL)
       
  1869               IN_param_value = function_call_param_iterator.next_nf();
       
  1870             if (IN_param_value != NULL) {
       
  1871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1873             }
       
  1874             
       
  1875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1876             {
       
  1877         
       
  1878                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1879                 
       
  1880                 if (IN_type_symbol == NULL)
       
  1881                   IN_type_symbol = last_type_symbol;
       
  1882                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1883                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1884                 function_type_prefix = return_type_symbol;
       
  1885                 break;
       
  1886                 
       
  1887             }
       
  1888             
       
  1889             
       
  1890             ERROR;
       
  1891         }
       
  1892         
       
  1893     }/*function_lint_to_dt*/
       
  1894     break;
       
  1895 
       
  1896 /****
       
  1897  *LINT_TO_TOD
       
  1898  */
       
  1899     case function_lint_to_tod :
       
  1900     {
       
  1901         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1902 
       
  1903         {
       
  1904             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1905             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1906             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1907             symbol_c *IN_type_symbol = NULL;
       
  1908             
       
  1909             /* Get the value from a foo(<param_value>) style call */
       
  1910             if (IN_param_value == NULL)
       
  1911               IN_param_value = function_call_param_iterator.next_nf();
       
  1912             if (IN_param_value != NULL) {
       
  1913               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1914               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1915             }
       
  1916             
       
  1917             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1918             {
       
  1919         
       
  1920                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1921                 
       
  1922                 if (IN_type_symbol == NULL)
       
  1923                   IN_type_symbol = last_type_symbol;
       
  1924                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1925                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1926                 function_type_prefix = return_type_symbol;
       
  1927                 break;
       
  1928                 
       
  1929             }
       
  1930             
       
  1931             
       
  1932             ERROR;
       
  1933         }
       
  1934         
       
  1935     }/*function_lint_to_tod*/
       
  1936     break;
       
  1937 
       
  1938 /****
       
  1939  *LINT_TO_UDINT
       
  1940  */
       
  1941     case function_lint_to_udint :
       
  1942     {
       
  1943         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1944 
       
  1945         {
       
  1946             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1947             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1948             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1949             symbol_c *IN_type_symbol = NULL;
       
  1950             
       
  1951             /* Get the value from a foo(<param_value>) style call */
       
  1952             if (IN_param_value == NULL)
       
  1953               IN_param_value = function_call_param_iterator.next_nf();
       
  1954             if (IN_param_value != NULL) {
       
  1955               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1956               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1957             }
       
  1958             
       
  1959             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1960             {
       
  1961         
       
  1962                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1963                 
       
  1964                 if (IN_type_symbol == NULL)
       
  1965                   IN_type_symbol = last_type_symbol;
       
  1966                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1967                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1968                 function_type_prefix = return_type_symbol;
       
  1969                 function_type_suffix = IN_type_symbol;
       
  1970                 break;
       
  1971                 
       
  1972             }
       
  1973             
       
  1974             
       
  1975             ERROR;
       
  1976         }
       
  1977         
       
  1978     }/*function_lint_to_udint*/
       
  1979     break;
       
  1980 
       
  1981 /****
       
  1982  *LINT_TO_WORD
       
  1983  */
       
  1984     case function_lint_to_word :
       
  1985     {
       
  1986         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  1987 
       
  1988         {
       
  1989             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1990             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1991             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1992             symbol_c *IN_type_symbol = NULL;
       
  1993             
       
  1994             /* Get the value from a foo(<param_value>) style call */
       
  1995             if (IN_param_value == NULL)
       
  1996               IN_param_value = function_call_param_iterator.next_nf();
       
  1997             if (IN_param_value != NULL) {
       
  1998               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1999               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2000             }
       
  2001             
       
  2002             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2003             {
       
  2004         
       
  2005                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2006                 
       
  2007                 if (IN_type_symbol == NULL)
       
  2008                   IN_type_symbol = last_type_symbol;
       
  2009                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2010                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2011                 function_type_prefix = return_type_symbol;
       
  2012                 function_type_suffix = IN_type_symbol;
       
  2013                 break;
       
  2014                 
       
  2015             }
       
  2016             
       
  2017             
       
  2018             ERROR;
       
  2019         }
       
  2020         
       
  2021     }/*function_lint_to_word*/
       
  2022     break;
       
  2023 
       
  2024 /****
       
  2025  *LINT_TO_STRING
       
  2026  */
       
  2027     case function_lint_to_string :
       
  2028     {
       
  2029         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2030 
       
  2031         {
       
  2032             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2033             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2034             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2035             symbol_c *IN_type_symbol = NULL;
       
  2036             
       
  2037             /* Get the value from a foo(<param_value>) style call */
       
  2038             if (IN_param_value == NULL)
       
  2039               IN_param_value = function_call_param_iterator.next_nf();
       
  2040             if (IN_param_value != NULL) {
       
  2041               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2042               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2043             }
       
  2044             
       
  2045             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2046             {
       
  2047         
       
  2048                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2049                 
       
  2050                 if (IN_type_symbol == NULL)
       
  2051                   IN_type_symbol = last_type_symbol;
       
  2052                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2053                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2054                 function_type_prefix = return_type_symbol;
       
  2055                 break;
       
  2056                 
       
  2057             }
       
  2058             
       
  2059             
       
  2060             ERROR;
       
  2061         }
       
  2062         
       
  2063     }/*function_lint_to_string*/
       
  2064     break;
       
  2065 
       
  2066 /****
       
  2067  *LINT_TO_LWORD
       
  2068  */
       
  2069     case function_lint_to_lword :
       
  2070     {
       
  2071         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2072 
       
  2073         {
       
  2074             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2076             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2077             symbol_c *IN_type_symbol = NULL;
       
  2078             
       
  2079             /* Get the value from a foo(<param_value>) style call */
       
  2080             if (IN_param_value == NULL)
       
  2081               IN_param_value = function_call_param_iterator.next_nf();
       
  2082             if (IN_param_value != NULL) {
       
  2083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2085             }
       
  2086             
       
  2087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2088             {
       
  2089         
       
  2090                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2091                 
       
  2092                 if (IN_type_symbol == NULL)
       
  2093                   IN_type_symbol = last_type_symbol;
       
  2094                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2095                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2096                 function_type_prefix = return_type_symbol;
       
  2097                 function_type_suffix = IN_type_symbol;
       
  2098                 break;
       
  2099                 
       
  2100             }
       
  2101             
       
  2102             
       
  2103             ERROR;
       
  2104         }
       
  2105         
       
  2106     }/*function_lint_to_lword*/
       
  2107     break;
       
  2108 
       
  2109 /****
       
  2110  *LINT_TO_UINT
       
  2111  */
       
  2112     case function_lint_to_uint :
       
  2113     {
       
  2114         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2115 
       
  2116         {
       
  2117             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2118             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2119             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2120             symbol_c *IN_type_symbol = NULL;
       
  2121             
       
  2122             /* Get the value from a foo(<param_value>) style call */
       
  2123             if (IN_param_value == NULL)
       
  2124               IN_param_value = function_call_param_iterator.next_nf();
       
  2125             if (IN_param_value != NULL) {
       
  2126               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2127               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2128             }
       
  2129             
       
  2130             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2131             {
       
  2132         
       
  2133                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2134                 
       
  2135                 if (IN_type_symbol == NULL)
       
  2136                   IN_type_symbol = last_type_symbol;
       
  2137                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2138                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2139                 function_type_prefix = return_type_symbol;
       
  2140                 function_type_suffix = IN_type_symbol;
       
  2141                 break;
       
  2142                 
       
  2143             }
       
  2144             
       
  2145             
       
  2146             ERROR;
       
  2147         }
       
  2148         
       
  2149     }/*function_lint_to_uint*/
       
  2150     break;
       
  2151 
       
  2152 /****
       
  2153  *LINT_TO_LREAL
       
  2154  */
       
  2155     case function_lint_to_lreal :
       
  2156     {
       
  2157         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2158 
       
  2159         {
       
  2160             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2162             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2163             symbol_c *IN_type_symbol = NULL;
       
  2164             
       
  2165             /* Get the value from a foo(<param_value>) style call */
       
  2166             if (IN_param_value == NULL)
       
  2167               IN_param_value = function_call_param_iterator.next_nf();
       
  2168             if (IN_param_value != NULL) {
       
  2169               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2170               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2171             }
       
  2172             
       
  2173             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2174             {
       
  2175         
       
  2176                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2177                 
       
  2178                 if (IN_type_symbol == NULL)
       
  2179                   IN_type_symbol = last_type_symbol;
       
  2180                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2181                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2182                 function_type_prefix = return_type_symbol;
       
  2183                 function_type_suffix = IN_type_symbol;
       
  2184                 break;
       
  2185                 
       
  2186             }
       
  2187             
       
  2188             
       
  2189             ERROR;
       
  2190         }
       
  2191         
       
  2192     }/*function_lint_to_lreal*/
       
  2193     break;
       
  2194 
       
  2195 /****
       
  2196  *LINT_TO_BYTE
       
  2197  */
       
  2198     case function_lint_to_byte :
       
  2199     {
       
  2200         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2201 
       
  2202         {
       
  2203             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2205             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2206             symbol_c *IN_type_symbol = NULL;
       
  2207             
       
  2208             /* Get the value from a foo(<param_value>) style call */
       
  2209             if (IN_param_value == NULL)
       
  2210               IN_param_value = function_call_param_iterator.next_nf();
       
  2211             if (IN_param_value != NULL) {
       
  2212               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2213               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2214             }
       
  2215             
       
  2216             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2217             {
       
  2218         
       
  2219                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2220                 
       
  2221                 if (IN_type_symbol == NULL)
       
  2222                   IN_type_symbol = last_type_symbol;
       
  2223                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2224                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2225                 function_type_prefix = return_type_symbol;
       
  2226                 function_type_suffix = IN_type_symbol;
       
  2227                 break;
       
  2228                 
       
  2229             }
       
  2230             
       
  2231             
       
  2232             ERROR;
       
  2233         }
       
  2234         
       
  2235     }/*function_lint_to_byte*/
       
  2236     break;
       
  2237 
       
  2238 /****
       
  2239  *LINT_TO_USINT
       
  2240  */
       
  2241     case function_lint_to_usint :
       
  2242     {
       
  2243         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2244 
       
  2245         {
       
  2246             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2248             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2249             symbol_c *IN_type_symbol = NULL;
       
  2250             
       
  2251             /* Get the value from a foo(<param_value>) style call */
       
  2252             if (IN_param_value == NULL)
       
  2253               IN_param_value = function_call_param_iterator.next_nf();
       
  2254             if (IN_param_value != NULL) {
       
  2255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2257             }
       
  2258             
       
  2259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2260             {
       
  2261         
       
  2262                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2263                 
       
  2264                 if (IN_type_symbol == NULL)
       
  2265                   IN_type_symbol = last_type_symbol;
       
  2266                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2267                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2268                 function_type_prefix = return_type_symbol;
       
  2269                 function_type_suffix = IN_type_symbol;
       
  2270                 break;
       
  2271                 
       
  2272             }
       
  2273             
       
  2274             
       
  2275             ERROR;
       
  2276         }
       
  2277         
       
  2278     }/*function_lint_to_usint*/
       
  2279     break;
       
  2280 
       
  2281 /****
       
  2282  *LINT_TO_ULINT
       
  2283  */
       
  2284     case function_lint_to_ulint :
       
  2285     {
       
  2286         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2287 
       
  2288         {
       
  2289             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2291             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2292             symbol_c *IN_type_symbol = NULL;
       
  2293             
       
  2294             /* Get the value from a foo(<param_value>) style call */
       
  2295             if (IN_param_value == NULL)
       
  2296               IN_param_value = function_call_param_iterator.next_nf();
       
  2297             if (IN_param_value != NULL) {
       
  2298               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2299               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2300             }
       
  2301             
       
  2302             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2303             {
       
  2304         
       
  2305                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2306                 
       
  2307                 if (IN_type_symbol == NULL)
       
  2308                   IN_type_symbol = last_type_symbol;
       
  2309                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2310                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2311                 function_type_prefix = return_type_symbol;
       
  2312                 function_type_suffix = IN_type_symbol;
       
  2313                 break;
       
  2314                 
       
  2315             }
       
  2316             
       
  2317             
       
  2318             ERROR;
       
  2319         }
       
  2320         
       
  2321     }/*function_lint_to_ulint*/
       
  2322     break;
       
  2323 
       
  2324 /****
       
  2325  *LINT_TO_BOOL
       
  2326  */
       
  2327     case function_lint_to_bool :
       
  2328     {
       
  2329         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2330 
       
  2331         {
       
  2332             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2333             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2334             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2335             symbol_c *IN_type_symbol = NULL;
       
  2336             
       
  2337             /* Get the value from a foo(<param_value>) style call */
       
  2338             if (IN_param_value == NULL)
       
  2339               IN_param_value = function_call_param_iterator.next_nf();
       
  2340             if (IN_param_value != NULL) {
       
  2341               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2342               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2343             }
       
  2344             
       
  2345             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2346             {
       
  2347         
       
  2348                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2349                 
       
  2350                 if (IN_type_symbol == NULL)
       
  2351                   IN_type_symbol = last_type_symbol;
       
  2352                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2353                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2354                 function_type_prefix = return_type_symbol;
       
  2355                 function_type_suffix = IN_type_symbol;
       
  2356                 break;
       
  2357                 
       
  2358             }
       
  2359             
       
  2360             
       
  2361             ERROR;
       
  2362         }
       
  2363         
       
  2364     }/*function_lint_to_bool*/
       
  2365     break;
       
  2366 
       
  2367 /****
       
  2368  *LINT_TO_TIME
       
  2369  */
       
  2370     case function_lint_to_time :
       
  2371     {
       
  2372         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2373 
       
  2374         {
       
  2375             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2377             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2378             symbol_c *IN_type_symbol = NULL;
       
  2379             
       
  2380             /* Get the value from a foo(<param_value>) style call */
       
  2381             if (IN_param_value == NULL)
       
  2382               IN_param_value = function_call_param_iterator.next_nf();
       
  2383             if (IN_param_value != NULL) {
       
  2384               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2385               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2386             }
       
  2387             
       
  2388             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2389             {
       
  2390         
       
  2391                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2392                 
       
  2393                 if (IN_type_symbol == NULL)
       
  2394                   IN_type_symbol = last_type_symbol;
       
  2395                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2396                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2397                 function_type_prefix = return_type_symbol;
       
  2398                 break;
       
  2399                 
       
  2400             }
       
  2401             
       
  2402             
       
  2403             ERROR;
       
  2404         }
       
  2405         
       
  2406     }/*function_lint_to_time*/
       
  2407     break;
       
  2408 
       
  2409 /****
       
  2410  *LINT_TO_INT
       
  2411  */
       
  2412     case function_lint_to_int :
       
  2413     {
       
  2414         symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
       
  2415 
       
  2416         {
       
  2417             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2419             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2420             symbol_c *IN_type_symbol = NULL;
       
  2421             
       
  2422             /* Get the value from a foo(<param_value>) style call */
       
  2423             if (IN_param_value == NULL)
       
  2424               IN_param_value = function_call_param_iterator.next_nf();
       
  2425             if (IN_param_value != NULL) {
       
  2426               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2427               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2428             }
       
  2429             
       
  2430             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2431             {
       
  2432         
       
  2433                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2434                 
       
  2435                 if (IN_type_symbol == NULL)
       
  2436                   IN_type_symbol = last_type_symbol;
       
  2437                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2438                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2439                 function_type_prefix = return_type_symbol;
       
  2440                 function_type_suffix = IN_type_symbol;
       
  2441                 break;
       
  2442                 
       
  2443             }
       
  2444             
       
  2445             
       
  2446             ERROR;
       
  2447         }
       
  2448         
       
  2449     }/*function_lint_to_int*/
       
  2450     break;
       
  2451 
       
  2452 /****
       
  2453  *DINT_TO_REAL
       
  2454  */
       
  2455     case function_dint_to_real :
       
  2456     {
       
  2457         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2458 
       
  2459         {
       
  2460             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2462             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2463             symbol_c *IN_type_symbol = NULL;
       
  2464             
       
  2465             /* Get the value from a foo(<param_value>) style call */
       
  2466             if (IN_param_value == NULL)
       
  2467               IN_param_value = function_call_param_iterator.next_nf();
       
  2468             if (IN_param_value != NULL) {
       
  2469               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2470               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2471             }
       
  2472             
       
  2473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2474             {
       
  2475         
       
  2476                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2477                 
       
  2478                 if (IN_type_symbol == NULL)
       
  2479                   IN_type_symbol = last_type_symbol;
       
  2480                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2481                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2482                 function_type_prefix = return_type_symbol;
       
  2483                 function_type_suffix = IN_type_symbol;
       
  2484                 break;
       
  2485                 
       
  2486             }
       
  2487             
       
  2488             
       
  2489             ERROR;
       
  2490         }
       
  2491         
       
  2492     }/*function_dint_to_real*/
       
  2493     break;
       
  2494 
       
  2495 /****
       
  2496  *DINT_TO_SINT
       
  2497  */
       
  2498     case function_dint_to_sint :
       
  2499     {
       
  2500         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2501 
       
  2502         {
       
  2503             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2505             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2506             symbol_c *IN_type_symbol = NULL;
       
  2507             
       
  2508             /* Get the value from a foo(<param_value>) style call */
       
  2509             if (IN_param_value == NULL)
       
  2510               IN_param_value = function_call_param_iterator.next_nf();
       
  2511             if (IN_param_value != NULL) {
       
  2512               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2513               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2514             }
       
  2515             
       
  2516             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2517             {
       
  2518         
       
  2519                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2520                 
       
  2521                 if (IN_type_symbol == NULL)
       
  2522                   IN_type_symbol = last_type_symbol;
       
  2523                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2524                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2525                 function_type_prefix = return_type_symbol;
       
  2526                 function_type_suffix = IN_type_symbol;
       
  2527                 break;
       
  2528                 
       
  2529             }
       
  2530             
       
  2531             
       
  2532             ERROR;
       
  2533         }
       
  2534         
       
  2535     }/*function_dint_to_sint*/
       
  2536     break;
       
  2537 
       
  2538 /****
       
  2539  *DINT_TO_LINT
       
  2540  */
       
  2541     case function_dint_to_lint :
       
  2542     {
       
  2543         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2544 
       
  2545         {
       
  2546             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2548             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2549             symbol_c *IN_type_symbol = NULL;
       
  2550             
       
  2551             /* Get the value from a foo(<param_value>) style call */
       
  2552             if (IN_param_value == NULL)
       
  2553               IN_param_value = function_call_param_iterator.next_nf();
       
  2554             if (IN_param_value != NULL) {
       
  2555               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2556               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2557             }
       
  2558             
       
  2559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2560             {
       
  2561         
       
  2562                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2563                 
       
  2564                 if (IN_type_symbol == NULL)
       
  2565                   IN_type_symbol = last_type_symbol;
       
  2566                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2568                 function_type_prefix = return_type_symbol;
       
  2569                 function_type_suffix = IN_type_symbol;
       
  2570                 break;
       
  2571                 
       
  2572             }
       
  2573             
       
  2574             
       
  2575             ERROR;
       
  2576         }
       
  2577         
       
  2578     }/*function_dint_to_lint*/
       
  2579     break;
       
  2580 
       
  2581 /****
       
  2582  *DINT_TO_DATE
       
  2583  */
       
  2584     case function_dint_to_date :
       
  2585     {
       
  2586         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2587 
       
  2588         {
       
  2589             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2590             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2591             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2592             symbol_c *IN_type_symbol = NULL;
       
  2593             
       
  2594             /* Get the value from a foo(<param_value>) style call */
       
  2595             if (IN_param_value == NULL)
       
  2596               IN_param_value = function_call_param_iterator.next_nf();
       
  2597             if (IN_param_value != NULL) {
       
  2598               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2599               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2600             }
       
  2601             
       
  2602             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2603             {
       
  2604         
       
  2605                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2606                 
       
  2607                 if (IN_type_symbol == NULL)
       
  2608                   IN_type_symbol = last_type_symbol;
       
  2609                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2610                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2611                 function_type_prefix = return_type_symbol;
       
  2612                 break;
       
  2613                 
       
  2614             }
       
  2615             
       
  2616             
       
  2617             ERROR;
       
  2618         }
       
  2619         
       
  2620     }/*function_dint_to_date*/
       
  2621     break;
       
  2622 
       
  2623 /****
       
  2624  *DINT_TO_DWORD
       
  2625  */
       
  2626     case function_dint_to_dword :
       
  2627     {
       
  2628         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2629 
       
  2630         {
       
  2631             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2633             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2634             symbol_c *IN_type_symbol = NULL;
       
  2635             
       
  2636             /* Get the value from a foo(<param_value>) style call */
       
  2637             if (IN_param_value == NULL)
       
  2638               IN_param_value = function_call_param_iterator.next_nf();
       
  2639             if (IN_param_value != NULL) {
       
  2640               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2641               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2642             }
       
  2643             
       
  2644             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2645             {
       
  2646         
       
  2647                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2648                 
       
  2649                 if (IN_type_symbol == NULL)
       
  2650                   IN_type_symbol = last_type_symbol;
       
  2651                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2653                 function_type_prefix = return_type_symbol;
       
  2654                 function_type_suffix = IN_type_symbol;
       
  2655                 break;
       
  2656                 
       
  2657             }
       
  2658             
       
  2659             
       
  2660             ERROR;
       
  2661         }
       
  2662         
       
  2663     }/*function_dint_to_dword*/
       
  2664     break;
       
  2665 
       
  2666 /****
       
  2667  *DINT_TO_DT
       
  2668  */
       
  2669     case function_dint_to_dt :
       
  2670     {
       
  2671         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2672 
       
  2673         {
       
  2674             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2676             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2677             symbol_c *IN_type_symbol = NULL;
       
  2678             
       
  2679             /* Get the value from a foo(<param_value>) style call */
       
  2680             if (IN_param_value == NULL)
       
  2681               IN_param_value = function_call_param_iterator.next_nf();
       
  2682             if (IN_param_value != NULL) {
       
  2683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2685             }
       
  2686             
       
  2687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2688             {
       
  2689         
       
  2690                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2691                 
       
  2692                 if (IN_type_symbol == NULL)
       
  2693                   IN_type_symbol = last_type_symbol;
       
  2694                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2695                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2696                 function_type_prefix = return_type_symbol;
       
  2697                 break;
       
  2698                 
       
  2699             }
       
  2700             
       
  2701             
       
  2702             ERROR;
       
  2703         }
       
  2704         
       
  2705     }/*function_dint_to_dt*/
       
  2706     break;
       
  2707 
       
  2708 /****
       
  2709  *DINT_TO_TOD
       
  2710  */
       
  2711     case function_dint_to_tod :
       
  2712     {
       
  2713         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2714 
       
  2715         {
       
  2716             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2717             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2718             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2719             symbol_c *IN_type_symbol = NULL;
       
  2720             
       
  2721             /* Get the value from a foo(<param_value>) style call */
       
  2722             if (IN_param_value == NULL)
       
  2723               IN_param_value = function_call_param_iterator.next_nf();
       
  2724             if (IN_param_value != NULL) {
       
  2725               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2726               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2727             }
       
  2728             
       
  2729             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2730             {
       
  2731         
       
  2732                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2733                 
       
  2734                 if (IN_type_symbol == NULL)
       
  2735                   IN_type_symbol = last_type_symbol;
       
  2736                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2737                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2738                 function_type_prefix = return_type_symbol;
       
  2739                 break;
       
  2740                 
       
  2741             }
       
  2742             
       
  2743             
       
  2744             ERROR;
       
  2745         }
       
  2746         
       
  2747     }/*function_dint_to_tod*/
       
  2748     break;
       
  2749 
       
  2750 /****
       
  2751  *DINT_TO_UDINT
       
  2752  */
       
  2753     case function_dint_to_udint :
       
  2754     {
       
  2755         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2756 
       
  2757         {
       
  2758             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2759             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2760             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2761             symbol_c *IN_type_symbol = NULL;
       
  2762             
       
  2763             /* Get the value from a foo(<param_value>) style call */
       
  2764             if (IN_param_value == NULL)
       
  2765               IN_param_value = function_call_param_iterator.next_nf();
       
  2766             if (IN_param_value != NULL) {
       
  2767               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2768               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2769             }
       
  2770             
       
  2771             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2772             {
       
  2773         
       
  2774                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2775                 
       
  2776                 if (IN_type_symbol == NULL)
       
  2777                   IN_type_symbol = last_type_symbol;
       
  2778                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2779                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2780                 function_type_prefix = return_type_symbol;
       
  2781                 function_type_suffix = IN_type_symbol;
       
  2782                 break;
       
  2783                 
       
  2784             }
       
  2785             
       
  2786             
       
  2787             ERROR;
       
  2788         }
       
  2789         
       
  2790     }/*function_dint_to_udint*/
       
  2791     break;
       
  2792 
       
  2793 /****
       
  2794  *DINT_TO_WORD
       
  2795  */
       
  2796     case function_dint_to_word :
       
  2797     {
       
  2798         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2799 
       
  2800         {
       
  2801             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2802             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2803             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2804             symbol_c *IN_type_symbol = NULL;
       
  2805             
       
  2806             /* Get the value from a foo(<param_value>) style call */
       
  2807             if (IN_param_value == NULL)
       
  2808               IN_param_value = function_call_param_iterator.next_nf();
       
  2809             if (IN_param_value != NULL) {
       
  2810               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2811               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2812             }
       
  2813             
       
  2814             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2815             {
       
  2816         
       
  2817                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2818                 
       
  2819                 if (IN_type_symbol == NULL)
       
  2820                   IN_type_symbol = last_type_symbol;
       
  2821                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2822                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2823                 function_type_prefix = return_type_symbol;
       
  2824                 function_type_suffix = IN_type_symbol;
       
  2825                 break;
       
  2826                 
       
  2827             }
       
  2828             
       
  2829             
       
  2830             ERROR;
       
  2831         }
       
  2832         
       
  2833     }/*function_dint_to_word*/
       
  2834     break;
       
  2835 
       
  2836 /****
       
  2837  *DINT_TO_STRING
       
  2838  */
       
  2839     case function_dint_to_string :
       
  2840     {
       
  2841         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2842 
       
  2843         {
       
  2844             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2845             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2846             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2847             symbol_c *IN_type_symbol = NULL;
       
  2848             
       
  2849             /* Get the value from a foo(<param_value>) style call */
       
  2850             if (IN_param_value == NULL)
       
  2851               IN_param_value = function_call_param_iterator.next_nf();
       
  2852             if (IN_param_value != NULL) {
       
  2853               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2854               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2855             }
       
  2856             
       
  2857             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2858             {
       
  2859         
       
  2860                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2861                 
       
  2862                 if (IN_type_symbol == NULL)
       
  2863                   IN_type_symbol = last_type_symbol;
       
  2864                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2865                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2866                 function_type_prefix = return_type_symbol;
       
  2867                 break;
       
  2868                 
       
  2869             }
       
  2870             
       
  2871             
       
  2872             ERROR;
       
  2873         }
       
  2874         
       
  2875     }/*function_dint_to_string*/
       
  2876     break;
       
  2877 
       
  2878 /****
       
  2879  *DINT_TO_LWORD
       
  2880  */
       
  2881     case function_dint_to_lword :
       
  2882     {
       
  2883         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2884 
       
  2885         {
       
  2886             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2887             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2888             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2889             symbol_c *IN_type_symbol = NULL;
       
  2890             
       
  2891             /* Get the value from a foo(<param_value>) style call */
       
  2892             if (IN_param_value == NULL)
       
  2893               IN_param_value = function_call_param_iterator.next_nf();
       
  2894             if (IN_param_value != NULL) {
       
  2895               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2896               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2897             }
       
  2898             
       
  2899             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2900             {
       
  2901         
       
  2902                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2903                 
       
  2904                 if (IN_type_symbol == NULL)
       
  2905                   IN_type_symbol = last_type_symbol;
       
  2906                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2907                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2908                 function_type_prefix = return_type_symbol;
       
  2909                 function_type_suffix = IN_type_symbol;
       
  2910                 break;
       
  2911                 
       
  2912             }
       
  2913             
       
  2914             
       
  2915             ERROR;
       
  2916         }
       
  2917         
       
  2918     }/*function_dint_to_lword*/
       
  2919     break;
       
  2920 
       
  2921 /****
       
  2922  *DINT_TO_UINT
       
  2923  */
       
  2924     case function_dint_to_uint :
       
  2925     {
       
  2926         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2927 
       
  2928         {
       
  2929             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2930             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2931             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2932             symbol_c *IN_type_symbol = NULL;
       
  2933             
       
  2934             /* Get the value from a foo(<param_value>) style call */
       
  2935             if (IN_param_value == NULL)
       
  2936               IN_param_value = function_call_param_iterator.next_nf();
       
  2937             if (IN_param_value != NULL) {
       
  2938               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2939               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2940             }
       
  2941             
       
  2942             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2943             {
       
  2944         
       
  2945                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2946                 
       
  2947                 if (IN_type_symbol == NULL)
       
  2948                   IN_type_symbol = last_type_symbol;
       
  2949                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2950                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2951                 function_type_prefix = return_type_symbol;
       
  2952                 function_type_suffix = IN_type_symbol;
       
  2953                 break;
       
  2954                 
       
  2955             }
       
  2956             
       
  2957             
       
  2958             ERROR;
       
  2959         }
       
  2960         
       
  2961     }/*function_dint_to_uint*/
       
  2962     break;
       
  2963 
       
  2964 /****
       
  2965  *DINT_TO_LREAL
       
  2966  */
       
  2967     case function_dint_to_lreal :
       
  2968     {
       
  2969         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  2970 
       
  2971         {
       
  2972             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2974             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2975             symbol_c *IN_type_symbol = NULL;
       
  2976             
       
  2977             /* Get the value from a foo(<param_value>) style call */
       
  2978             if (IN_param_value == NULL)
       
  2979               IN_param_value = function_call_param_iterator.next_nf();
       
  2980             if (IN_param_value != NULL) {
       
  2981               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2982               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2983             }
       
  2984             
       
  2985             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2986             {
       
  2987         
       
  2988                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2989                 
       
  2990                 if (IN_type_symbol == NULL)
       
  2991                   IN_type_symbol = last_type_symbol;
       
  2992                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2993                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2994                 function_type_prefix = return_type_symbol;
       
  2995                 function_type_suffix = IN_type_symbol;
       
  2996                 break;
       
  2997                 
       
  2998             }
       
  2999             
       
  3000             
       
  3001             ERROR;
       
  3002         }
       
  3003         
       
  3004     }/*function_dint_to_lreal*/
       
  3005     break;
       
  3006 
       
  3007 /****
       
  3008  *DINT_TO_BYTE
       
  3009  */
       
  3010     case function_dint_to_byte :
       
  3011     {
       
  3012         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3013 
       
  3014         {
       
  3015             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3017             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3018             symbol_c *IN_type_symbol = NULL;
       
  3019             
       
  3020             /* Get the value from a foo(<param_value>) style call */
       
  3021             if (IN_param_value == NULL)
       
  3022               IN_param_value = function_call_param_iterator.next_nf();
       
  3023             if (IN_param_value != NULL) {
       
  3024               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3025               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3026             }
       
  3027             
       
  3028             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3029             {
       
  3030         
       
  3031                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3032                 
       
  3033                 if (IN_type_symbol == NULL)
       
  3034                   IN_type_symbol = last_type_symbol;
       
  3035                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3036                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3037                 function_type_prefix = return_type_symbol;
       
  3038                 function_type_suffix = IN_type_symbol;
       
  3039                 break;
       
  3040                 
       
  3041             }
       
  3042             
       
  3043             
       
  3044             ERROR;
       
  3045         }
       
  3046         
       
  3047     }/*function_dint_to_byte*/
       
  3048     break;
       
  3049 
       
  3050 /****
       
  3051  *DINT_TO_USINT
       
  3052  */
       
  3053     case function_dint_to_usint :
       
  3054     {
       
  3055         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3056 
       
  3057         {
       
  3058             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3059             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3060             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3061             symbol_c *IN_type_symbol = NULL;
       
  3062             
       
  3063             /* Get the value from a foo(<param_value>) style call */
       
  3064             if (IN_param_value == NULL)
       
  3065               IN_param_value = function_call_param_iterator.next_nf();
       
  3066             if (IN_param_value != NULL) {
       
  3067               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3068               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3069             }
       
  3070             
       
  3071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3072             {
       
  3073         
       
  3074                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3075                 
       
  3076                 if (IN_type_symbol == NULL)
       
  3077                   IN_type_symbol = last_type_symbol;
       
  3078                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3079                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3080                 function_type_prefix = return_type_symbol;
       
  3081                 function_type_suffix = IN_type_symbol;
       
  3082                 break;
       
  3083                 
       
  3084             }
       
  3085             
       
  3086             
       
  3087             ERROR;
       
  3088         }
       
  3089         
       
  3090     }/*function_dint_to_usint*/
       
  3091     break;
       
  3092 
       
  3093 /****
       
  3094  *DINT_TO_ULINT
       
  3095  */
       
  3096     case function_dint_to_ulint :
       
  3097     {
       
  3098         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3099 
       
  3100         {
       
  3101             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3102             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3103             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3104             symbol_c *IN_type_symbol = NULL;
       
  3105             
       
  3106             /* Get the value from a foo(<param_value>) style call */
       
  3107             if (IN_param_value == NULL)
       
  3108               IN_param_value = function_call_param_iterator.next_nf();
       
  3109             if (IN_param_value != NULL) {
       
  3110               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3111               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3112             }
       
  3113             
       
  3114             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3115             {
       
  3116         
       
  3117                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3118                 
       
  3119                 if (IN_type_symbol == NULL)
       
  3120                   IN_type_symbol = last_type_symbol;
       
  3121                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3122                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3123                 function_type_prefix = return_type_symbol;
       
  3124                 function_type_suffix = IN_type_symbol;
       
  3125                 break;
       
  3126                 
       
  3127             }
       
  3128             
       
  3129             
       
  3130             ERROR;
       
  3131         }
       
  3132         
       
  3133     }/*function_dint_to_ulint*/
       
  3134     break;
       
  3135 
       
  3136 /****
       
  3137  *DINT_TO_BOOL
       
  3138  */
       
  3139     case function_dint_to_bool :
       
  3140     {
       
  3141         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3142 
       
  3143         {
       
  3144             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3145             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3146             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3147             symbol_c *IN_type_symbol = NULL;
       
  3148             
       
  3149             /* Get the value from a foo(<param_value>) style call */
       
  3150             if (IN_param_value == NULL)
       
  3151               IN_param_value = function_call_param_iterator.next_nf();
       
  3152             if (IN_param_value != NULL) {
       
  3153               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3154               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3155             }
       
  3156             
       
  3157             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3158             {
       
  3159         
       
  3160                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3161                 
       
  3162                 if (IN_type_symbol == NULL)
       
  3163                   IN_type_symbol = last_type_symbol;
       
  3164                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3165                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3166                 function_type_prefix = return_type_symbol;
       
  3167                 function_type_suffix = IN_type_symbol;
       
  3168                 break;
       
  3169                 
       
  3170             }
       
  3171             
       
  3172             
       
  3173             ERROR;
       
  3174         }
       
  3175         
       
  3176     }/*function_dint_to_bool*/
       
  3177     break;
       
  3178 
       
  3179 /****
       
  3180  *DINT_TO_TIME
       
  3181  */
       
  3182     case function_dint_to_time :
       
  3183     {
       
  3184         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3185 
       
  3186         {
       
  3187             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3188             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3189             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3190             symbol_c *IN_type_symbol = NULL;
       
  3191             
       
  3192             /* Get the value from a foo(<param_value>) style call */
       
  3193             if (IN_param_value == NULL)
       
  3194               IN_param_value = function_call_param_iterator.next_nf();
       
  3195             if (IN_param_value != NULL) {
       
  3196               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3197               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3198             }
       
  3199             
       
  3200             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3201             {
       
  3202         
       
  3203                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  3204                 
       
  3205                 if (IN_type_symbol == NULL)
       
  3206                   IN_type_symbol = last_type_symbol;
       
  3207                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3208                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3209                 function_type_prefix = return_type_symbol;
       
  3210                 break;
       
  3211                 
       
  3212             }
       
  3213             
       
  3214             
       
  3215             ERROR;
       
  3216         }
       
  3217         
       
  3218     }/*function_dint_to_time*/
       
  3219     break;
       
  3220 
       
  3221 /****
       
  3222  *DINT_TO_INT
       
  3223  */
       
  3224     case function_dint_to_int :
       
  3225     {
       
  3226         symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
       
  3227 
       
  3228         {
       
  3229             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3231             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3232             symbol_c *IN_type_symbol = NULL;
       
  3233             
       
  3234             /* Get the value from a foo(<param_value>) style call */
       
  3235             if (IN_param_value == NULL)
       
  3236               IN_param_value = function_call_param_iterator.next_nf();
       
  3237             if (IN_param_value != NULL) {
       
  3238               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3239               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3240             }
       
  3241             
       
  3242             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3243             {
       
  3244         
       
  3245                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3246                 
       
  3247                 if (IN_type_symbol == NULL)
       
  3248                   IN_type_symbol = last_type_symbol;
       
  3249                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3250                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3251                 function_type_prefix = return_type_symbol;
       
  3252                 function_type_suffix = IN_type_symbol;
       
  3253                 break;
       
  3254                 
       
  3255             }
       
  3256             
       
  3257             
       
  3258             ERROR;
       
  3259         }
       
  3260         
       
  3261     }/*function_dint_to_int*/
       
  3262     break;
       
  3263 
       
  3264 /****
       
  3265  *DATE_TO_REAL
       
  3266  */
       
  3267     case function_date_to_real :
       
  3268     {
       
  3269         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3270 
       
  3271         {
       
  3272             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3274             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3275             symbol_c *IN_type_symbol = NULL;
       
  3276             
       
  3277             /* Get the value from a foo(<param_value>) style call */
       
  3278             if (IN_param_value == NULL)
       
  3279               IN_param_value = function_call_param_iterator.next_nf();
       
  3280             if (IN_param_value != NULL) {
       
  3281               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3282               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3283             }
       
  3284             
       
  3285             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3286             {
       
  3287         
       
  3288                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3289                 
       
  3290                 if (IN_type_symbol == NULL)
       
  3291                   IN_type_symbol = last_type_symbol;
       
  3292                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3293                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3294                 function_type_prefix = return_type_symbol;
       
  3295                 break;
       
  3296                 
       
  3297             }
       
  3298             
       
  3299             
       
  3300             ERROR;
       
  3301         }
       
  3302         
       
  3303     }/*function_date_to_real*/
       
  3304     break;
       
  3305 
       
  3306 /****
       
  3307  *DATE_TO_SINT
       
  3308  */
       
  3309     case function_date_to_sint :
       
  3310     {
       
  3311         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3312 
       
  3313         {
       
  3314             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3315             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3316             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3317             symbol_c *IN_type_symbol = NULL;
       
  3318             
       
  3319             /* Get the value from a foo(<param_value>) style call */
       
  3320             if (IN_param_value == NULL)
       
  3321               IN_param_value = function_call_param_iterator.next_nf();
       
  3322             if (IN_param_value != NULL) {
       
  3323               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3324               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3325             }
       
  3326             
       
  3327             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3328             {
       
  3329         
       
  3330                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3331                 
       
  3332                 if (IN_type_symbol == NULL)
       
  3333                   IN_type_symbol = last_type_symbol;
       
  3334                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3335                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3336                 function_type_prefix = return_type_symbol;
       
  3337                 break;
       
  3338                 
       
  3339             }
       
  3340             
       
  3341             
       
  3342             ERROR;
       
  3343         }
       
  3344         
       
  3345     }/*function_date_to_sint*/
       
  3346     break;
       
  3347 
       
  3348 /****
       
  3349  *DATE_TO_LINT
       
  3350  */
       
  3351     case function_date_to_lint :
       
  3352     {
       
  3353         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3354 
       
  3355         {
       
  3356             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3357             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3358             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3359             symbol_c *IN_type_symbol = NULL;
       
  3360             
       
  3361             /* Get the value from a foo(<param_value>) style call */
       
  3362             if (IN_param_value == NULL)
       
  3363               IN_param_value = function_call_param_iterator.next_nf();
       
  3364             if (IN_param_value != NULL) {
       
  3365               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3366               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3367             }
       
  3368             
       
  3369             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3370             {
       
  3371         
       
  3372                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3373                 
       
  3374                 if (IN_type_symbol == NULL)
       
  3375                   IN_type_symbol = last_type_symbol;
       
  3376                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3377                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3378                 function_type_prefix = return_type_symbol;
       
  3379                 break;
       
  3380                 
       
  3381             }
       
  3382             
       
  3383             
       
  3384             ERROR;
       
  3385         }
       
  3386         
       
  3387     }/*function_date_to_lint*/
       
  3388     break;
       
  3389 
       
  3390 /****
       
  3391  *DATE_TO_DINT
       
  3392  */
       
  3393     case function_date_to_dint :
       
  3394     {
       
  3395         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3396 
       
  3397         {
       
  3398             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3399             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3400             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3401             symbol_c *IN_type_symbol = NULL;
       
  3402             
       
  3403             /* Get the value from a foo(<param_value>) style call */
       
  3404             if (IN_param_value == NULL)
       
  3405               IN_param_value = function_call_param_iterator.next_nf();
       
  3406             if (IN_param_value != NULL) {
       
  3407               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3408               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3409             }
       
  3410             
       
  3411             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3412             {
       
  3413         
       
  3414                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3415                 
       
  3416                 if (IN_type_symbol == NULL)
       
  3417                   IN_type_symbol = last_type_symbol;
       
  3418                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3419                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3420                 function_type_prefix = return_type_symbol;
       
  3421                 break;
       
  3422                 
       
  3423             }
       
  3424             
       
  3425             
       
  3426             ERROR;
       
  3427         }
       
  3428         
       
  3429     }/*function_date_to_dint*/
       
  3430     break;
       
  3431 
       
  3432 /****
       
  3433  *DATE_TO_DWORD
       
  3434  */
       
  3435     case function_date_to_dword :
       
  3436     {
       
  3437         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3438 
       
  3439         {
       
  3440             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3442             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3443             symbol_c *IN_type_symbol = NULL;
       
  3444             
       
  3445             /* Get the value from a foo(<param_value>) style call */
       
  3446             if (IN_param_value == NULL)
       
  3447               IN_param_value = function_call_param_iterator.next_nf();
       
  3448             if (IN_param_value != NULL) {
       
  3449               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3450               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3451             }
       
  3452             
       
  3453             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3454             {
       
  3455         
       
  3456                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3457                 
       
  3458                 if (IN_type_symbol == NULL)
       
  3459                   IN_type_symbol = last_type_symbol;
       
  3460                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3461                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3462                 function_type_prefix = return_type_symbol;
       
  3463                 break;
       
  3464                 
       
  3465             }
       
  3466             
       
  3467             
       
  3468             ERROR;
       
  3469         }
       
  3470         
       
  3471     }/*function_date_to_dword*/
       
  3472     break;
       
  3473 
       
  3474 /****
       
  3475  *DATE_TO_UDINT
       
  3476  */
       
  3477     case function_date_to_udint :
       
  3478     {
       
  3479         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3480 
       
  3481         {
       
  3482             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3484             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3485             symbol_c *IN_type_symbol = NULL;
       
  3486             
       
  3487             /* Get the value from a foo(<param_value>) style call */
       
  3488             if (IN_param_value == NULL)
       
  3489               IN_param_value = function_call_param_iterator.next_nf();
       
  3490             if (IN_param_value != NULL) {
       
  3491               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3492               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3493             }
       
  3494             
       
  3495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3496             {
       
  3497         
       
  3498                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3499                 
       
  3500                 if (IN_type_symbol == NULL)
       
  3501                   IN_type_symbol = last_type_symbol;
       
  3502                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3503                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3504                 function_type_prefix = return_type_symbol;
       
  3505                 break;
       
  3506                 
       
  3507             }
       
  3508             
       
  3509             
       
  3510             ERROR;
       
  3511         }
       
  3512         
       
  3513     }/*function_date_to_udint*/
       
  3514     break;
       
  3515 
       
  3516 /****
       
  3517  *DATE_TO_WORD
       
  3518  */
       
  3519     case function_date_to_word :
       
  3520     {
       
  3521         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3522 
       
  3523         {
       
  3524             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3525             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3526             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3527             symbol_c *IN_type_symbol = NULL;
       
  3528             
       
  3529             /* Get the value from a foo(<param_value>) style call */
       
  3530             if (IN_param_value == NULL)
       
  3531               IN_param_value = function_call_param_iterator.next_nf();
       
  3532             if (IN_param_value != NULL) {
       
  3533               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3534               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3535             }
       
  3536             
       
  3537             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3538             {
       
  3539         
       
  3540                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3541                 
       
  3542                 if (IN_type_symbol == NULL)
       
  3543                   IN_type_symbol = last_type_symbol;
       
  3544                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3545                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3546                 function_type_prefix = return_type_symbol;
       
  3547                 break;
       
  3548                 
       
  3549             }
       
  3550             
       
  3551             
       
  3552             ERROR;
       
  3553         }
       
  3554         
       
  3555     }/*function_date_to_word*/
       
  3556     break;
       
  3557 
       
  3558 /****
       
  3559  *DATE_TO_STRING
       
  3560  */
       
  3561     case function_date_to_string :
       
  3562     {
       
  3563         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3564 
       
  3565         {
       
  3566             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3567             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3568             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3569             symbol_c *IN_type_symbol = NULL;
       
  3570             
       
  3571             /* Get the value from a foo(<param_value>) style call */
       
  3572             if (IN_param_value == NULL)
       
  3573               IN_param_value = function_call_param_iterator.next_nf();
       
  3574             if (IN_param_value != NULL) {
       
  3575               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3576               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3577             }
       
  3578             
       
  3579             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3580             {
       
  3581         
       
  3582                 function_name = (symbol_c*)(new pragma_c("__date_to_string"));
       
  3583                 
       
  3584                 if (IN_type_symbol == NULL)
       
  3585                   IN_type_symbol = last_type_symbol;
       
  3586                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3587                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3588                 function_type_prefix = return_type_symbol;
       
  3589                 break;
       
  3590                 
       
  3591             }
       
  3592             
       
  3593             
       
  3594             ERROR;
       
  3595         }
       
  3596         
       
  3597     }/*function_date_to_string*/
       
  3598     break;
       
  3599 
       
  3600 /****
       
  3601  *DATE_TO_LWORD
       
  3602  */
       
  3603     case function_date_to_lword :
       
  3604     {
       
  3605         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3606 
       
  3607         {
       
  3608             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3609             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3610             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3611             symbol_c *IN_type_symbol = NULL;
       
  3612             
       
  3613             /* Get the value from a foo(<param_value>) style call */
       
  3614             if (IN_param_value == NULL)
       
  3615               IN_param_value = function_call_param_iterator.next_nf();
       
  3616             if (IN_param_value != NULL) {
       
  3617               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3618               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3619             }
       
  3620             
       
  3621             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3622             {
       
  3623         
       
  3624                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3625                 
       
  3626                 if (IN_type_symbol == NULL)
       
  3627                   IN_type_symbol = last_type_symbol;
       
  3628                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3629                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3630                 function_type_prefix = return_type_symbol;
       
  3631                 break;
       
  3632                 
       
  3633             }
       
  3634             
       
  3635             
       
  3636             ERROR;
       
  3637         }
       
  3638         
       
  3639     }/*function_date_to_lword*/
       
  3640     break;
       
  3641 
       
  3642 /****
       
  3643  *DATE_TO_UINT
       
  3644  */
       
  3645     case function_date_to_uint :
       
  3646     {
       
  3647         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3648 
       
  3649         {
       
  3650             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3651             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3652             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3653             symbol_c *IN_type_symbol = NULL;
       
  3654             
       
  3655             /* Get the value from a foo(<param_value>) style call */
       
  3656             if (IN_param_value == NULL)
       
  3657               IN_param_value = function_call_param_iterator.next_nf();
       
  3658             if (IN_param_value != NULL) {
       
  3659               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3660               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3661             }
       
  3662             
       
  3663             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3664             {
       
  3665         
       
  3666                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3667                 
       
  3668                 if (IN_type_symbol == NULL)
       
  3669                   IN_type_symbol = last_type_symbol;
       
  3670                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3671                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3672                 function_type_prefix = return_type_symbol;
       
  3673                 break;
       
  3674                 
       
  3675             }
       
  3676             
       
  3677             
       
  3678             ERROR;
       
  3679         }
       
  3680         
       
  3681     }/*function_date_to_uint*/
       
  3682     break;
       
  3683 
       
  3684 /****
       
  3685  *DATE_TO_LREAL
       
  3686  */
       
  3687     case function_date_to_lreal :
       
  3688     {
       
  3689         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3690 
       
  3691         {
       
  3692             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3693             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3694             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3695             symbol_c *IN_type_symbol = NULL;
       
  3696             
       
  3697             /* Get the value from a foo(<param_value>) style call */
       
  3698             if (IN_param_value == NULL)
       
  3699               IN_param_value = function_call_param_iterator.next_nf();
       
  3700             if (IN_param_value != NULL) {
       
  3701               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3702               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3703             }
       
  3704             
       
  3705             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3706             {
       
  3707         
       
  3708                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3709                 
       
  3710                 if (IN_type_symbol == NULL)
       
  3711                   IN_type_symbol = last_type_symbol;
       
  3712                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3713                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3714                 function_type_prefix = return_type_symbol;
       
  3715                 break;
       
  3716                 
       
  3717             }
       
  3718             
       
  3719             
       
  3720             ERROR;
       
  3721         }
       
  3722         
       
  3723     }/*function_date_to_lreal*/
       
  3724     break;
       
  3725 
       
  3726 /****
       
  3727  *DATE_TO_BYTE
       
  3728  */
       
  3729     case function_date_to_byte :
       
  3730     {
       
  3731         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3732 
       
  3733         {
       
  3734             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3736             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3737             symbol_c *IN_type_symbol = NULL;
       
  3738             
       
  3739             /* Get the value from a foo(<param_value>) style call */
       
  3740             if (IN_param_value == NULL)
       
  3741               IN_param_value = function_call_param_iterator.next_nf();
       
  3742             if (IN_param_value != NULL) {
       
  3743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3744               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3745             }
       
  3746             
       
  3747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3748             {
       
  3749         
       
  3750                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3751                 
       
  3752                 if (IN_type_symbol == NULL)
       
  3753                   IN_type_symbol = last_type_symbol;
       
  3754                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3755                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3756                 function_type_prefix = return_type_symbol;
       
  3757                 break;
       
  3758                 
       
  3759             }
       
  3760             
       
  3761             
       
  3762             ERROR;
       
  3763         }
       
  3764         
       
  3765     }/*function_date_to_byte*/
       
  3766     break;
       
  3767 
       
  3768 /****
       
  3769  *DATE_TO_USINT
       
  3770  */
       
  3771     case function_date_to_usint :
       
  3772     {
       
  3773         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3774 
       
  3775         {
       
  3776             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3777             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3778             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3779             symbol_c *IN_type_symbol = NULL;
       
  3780             
       
  3781             /* Get the value from a foo(<param_value>) style call */
       
  3782             if (IN_param_value == NULL)
       
  3783               IN_param_value = function_call_param_iterator.next_nf();
       
  3784             if (IN_param_value != NULL) {
       
  3785               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3786               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3787             }
       
  3788             
       
  3789             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3790             {
       
  3791         
       
  3792                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3793                 
       
  3794                 if (IN_type_symbol == NULL)
       
  3795                   IN_type_symbol = last_type_symbol;
       
  3796                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3797                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3798                 function_type_prefix = return_type_symbol;
       
  3799                 break;
       
  3800                 
       
  3801             }
       
  3802             
       
  3803             
       
  3804             ERROR;
       
  3805         }
       
  3806         
       
  3807     }/*function_date_to_usint*/
       
  3808     break;
       
  3809 
       
  3810 /****
       
  3811  *DATE_TO_ULINT
       
  3812  */
       
  3813     case function_date_to_ulint :
       
  3814     {
       
  3815         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3816 
       
  3817         {
       
  3818             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3819             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3820             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3821             symbol_c *IN_type_symbol = NULL;
       
  3822             
       
  3823             /* Get the value from a foo(<param_value>) style call */
       
  3824             if (IN_param_value == NULL)
       
  3825               IN_param_value = function_call_param_iterator.next_nf();
       
  3826             if (IN_param_value != NULL) {
       
  3827               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3828               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3829             }
       
  3830             
       
  3831             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3832             {
       
  3833         
       
  3834                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3835                 
       
  3836                 if (IN_type_symbol == NULL)
       
  3837                   IN_type_symbol = last_type_symbol;
       
  3838                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3839                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3840                 function_type_prefix = return_type_symbol;
       
  3841                 break;
       
  3842                 
       
  3843             }
       
  3844             
       
  3845             
       
  3846             ERROR;
       
  3847         }
       
  3848         
       
  3849     }/*function_date_to_ulint*/
       
  3850     break;
       
  3851 
       
  3852 /****
       
  3853  *DATE_TO_INT
       
  3854  */
       
  3855     case function_date_to_int :
       
  3856     {
       
  3857         symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
       
  3858 
       
  3859         {
       
  3860             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3861             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3862             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3863             symbol_c *IN_type_symbol = NULL;
       
  3864             
       
  3865             /* Get the value from a foo(<param_value>) style call */
       
  3866             if (IN_param_value == NULL)
       
  3867               IN_param_value = function_call_param_iterator.next_nf();
       
  3868             if (IN_param_value != NULL) {
       
  3869               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3870               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3871             }
       
  3872             
       
  3873             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3874             {
       
  3875         
       
  3876                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3877                 
       
  3878                 if (IN_type_symbol == NULL)
       
  3879                   IN_type_symbol = last_type_symbol;
       
  3880                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3881                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3882                 function_type_prefix = return_type_symbol;
       
  3883                 break;
       
  3884                 
       
  3885             }
       
  3886             
       
  3887             
       
  3888             ERROR;
       
  3889         }
       
  3890         
       
  3891     }/*function_date_to_int*/
       
  3892     break;
       
  3893 
       
  3894 /****
       
  3895  *DWORD_TO_REAL
       
  3896  */
       
  3897     case function_dword_to_real :
       
  3898     {
       
  3899         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  3900 
       
  3901         {
       
  3902             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3904             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3905             symbol_c *IN_type_symbol = NULL;
       
  3906             
       
  3907             /* Get the value from a foo(<param_value>) style call */
       
  3908             if (IN_param_value == NULL)
       
  3909               IN_param_value = function_call_param_iterator.next_nf();
       
  3910             if (IN_param_value != NULL) {
       
  3911               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3912               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3913             }
       
  3914             
       
  3915             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3916             {
       
  3917         
       
  3918                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3919                 
       
  3920                 if (IN_type_symbol == NULL)
       
  3921                   IN_type_symbol = last_type_symbol;
       
  3922                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3923                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3924                 function_type_prefix = return_type_symbol;
       
  3925                 function_type_suffix = IN_type_symbol;
       
  3926                 break;
       
  3927                 
       
  3928             }
       
  3929             
       
  3930             
       
  3931             ERROR;
       
  3932         }
       
  3933         
       
  3934     }/*function_dword_to_real*/
       
  3935     break;
       
  3936 
       
  3937 /****
       
  3938  *DWORD_TO_SINT
       
  3939  */
       
  3940     case function_dword_to_sint :
       
  3941     {
       
  3942         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  3943 
       
  3944         {
       
  3945             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3946             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3947             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3948             symbol_c *IN_type_symbol = NULL;
       
  3949             
       
  3950             /* Get the value from a foo(<param_value>) style call */
       
  3951             if (IN_param_value == NULL)
       
  3952               IN_param_value = function_call_param_iterator.next_nf();
       
  3953             if (IN_param_value != NULL) {
       
  3954               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3955               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3956             }
       
  3957             
       
  3958             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3959             {
       
  3960         
       
  3961                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3962                 
       
  3963                 if (IN_type_symbol == NULL)
       
  3964                   IN_type_symbol = last_type_symbol;
       
  3965                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3966                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3967                 function_type_prefix = return_type_symbol;
       
  3968                 function_type_suffix = IN_type_symbol;
       
  3969                 break;
       
  3970                 
       
  3971             }
       
  3972             
       
  3973             
       
  3974             ERROR;
       
  3975         }
       
  3976         
       
  3977     }/*function_dword_to_sint*/
       
  3978     break;
       
  3979 
       
  3980 /****
       
  3981  *DWORD_TO_LINT
       
  3982  */
       
  3983     case function_dword_to_lint :
       
  3984     {
       
  3985         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  3986 
       
  3987         {
       
  3988             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3990             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3991             symbol_c *IN_type_symbol = NULL;
       
  3992             
       
  3993             /* Get the value from a foo(<param_value>) style call */
       
  3994             if (IN_param_value == NULL)
       
  3995               IN_param_value = function_call_param_iterator.next_nf();
       
  3996             if (IN_param_value != NULL) {
       
  3997               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3998               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3999             }
       
  4000             
       
  4001             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4002             {
       
  4003         
       
  4004                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4005                 
       
  4006                 if (IN_type_symbol == NULL)
       
  4007                   IN_type_symbol = last_type_symbol;
       
  4008                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4009                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4010                 function_type_prefix = return_type_symbol;
       
  4011                 function_type_suffix = IN_type_symbol;
       
  4012                 break;
       
  4013                 
       
  4014             }
       
  4015             
       
  4016             
       
  4017             ERROR;
       
  4018         }
       
  4019         
       
  4020     }/*function_dword_to_lint*/
       
  4021     break;
       
  4022 
       
  4023 /****
       
  4024  *DWORD_TO_DINT
       
  4025  */
       
  4026     case function_dword_to_dint :
       
  4027     {
       
  4028         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4029 
       
  4030         {
       
  4031             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4033             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4034             symbol_c *IN_type_symbol = NULL;
       
  4035             
       
  4036             /* Get the value from a foo(<param_value>) style call */
       
  4037             if (IN_param_value == NULL)
       
  4038               IN_param_value = function_call_param_iterator.next_nf();
       
  4039             if (IN_param_value != NULL) {
       
  4040               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4041               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4042             }
       
  4043             
       
  4044             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4045             {
       
  4046         
       
  4047                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4048                 
       
  4049                 if (IN_type_symbol == NULL)
       
  4050                   IN_type_symbol = last_type_symbol;
       
  4051                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4052                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4053                 function_type_prefix = return_type_symbol;
       
  4054                 function_type_suffix = IN_type_symbol;
       
  4055                 break;
       
  4056                 
       
  4057             }
       
  4058             
       
  4059             
       
  4060             ERROR;
       
  4061         }
       
  4062         
       
  4063     }/*function_dword_to_dint*/
       
  4064     break;
       
  4065 
       
  4066 /****
       
  4067  *DWORD_TO_DATE
       
  4068  */
       
  4069     case function_dword_to_date :
       
  4070     {
       
  4071         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4072 
       
  4073         {
       
  4074             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4076             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4077             symbol_c *IN_type_symbol = NULL;
       
  4078             
       
  4079             /* Get the value from a foo(<param_value>) style call */
       
  4080             if (IN_param_value == NULL)
       
  4081               IN_param_value = function_call_param_iterator.next_nf();
       
  4082             if (IN_param_value != NULL) {
       
  4083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4085             }
       
  4086             
       
  4087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4088             {
       
  4089         
       
  4090                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4091                 
       
  4092                 if (IN_type_symbol == NULL)
       
  4093                   IN_type_symbol = last_type_symbol;
       
  4094                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4095                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4096                 function_type_prefix = return_type_symbol;
       
  4097                 break;
       
  4098                 
       
  4099             }
       
  4100             
       
  4101             
       
  4102             ERROR;
       
  4103         }
       
  4104         
       
  4105     }/*function_dword_to_date*/
       
  4106     break;
       
  4107 
       
  4108 /****
       
  4109  *DWORD_TO_DT
       
  4110  */
       
  4111     case function_dword_to_dt :
       
  4112     {
       
  4113         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4114 
       
  4115         {
       
  4116             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4117             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4118             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4119             symbol_c *IN_type_symbol = NULL;
       
  4120             
       
  4121             /* Get the value from a foo(<param_value>) style call */
       
  4122             if (IN_param_value == NULL)
       
  4123               IN_param_value = function_call_param_iterator.next_nf();
       
  4124             if (IN_param_value != NULL) {
       
  4125               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4126               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4127             }
       
  4128             
       
  4129             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4130             {
       
  4131         
       
  4132                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4133                 
       
  4134                 if (IN_type_symbol == NULL)
       
  4135                   IN_type_symbol = last_type_symbol;
       
  4136                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4137                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4138                 function_type_prefix = return_type_symbol;
       
  4139                 break;
       
  4140                 
       
  4141             }
       
  4142             
       
  4143             
       
  4144             ERROR;
       
  4145         }
       
  4146         
       
  4147     }/*function_dword_to_dt*/
       
  4148     break;
       
  4149 
       
  4150 /****
       
  4151  *DWORD_TO_TOD
       
  4152  */
       
  4153     case function_dword_to_tod :
       
  4154     {
       
  4155         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4156 
       
  4157         {
       
  4158             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4159             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4160             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4161             symbol_c *IN_type_symbol = NULL;
       
  4162             
       
  4163             /* Get the value from a foo(<param_value>) style call */
       
  4164             if (IN_param_value == NULL)
       
  4165               IN_param_value = function_call_param_iterator.next_nf();
       
  4166             if (IN_param_value != NULL) {
       
  4167               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4168               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4169             }
       
  4170             
       
  4171             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4172             {
       
  4173         
       
  4174                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4175                 
       
  4176                 if (IN_type_symbol == NULL)
       
  4177                   IN_type_symbol = last_type_symbol;
       
  4178                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4179                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4180                 function_type_prefix = return_type_symbol;
       
  4181                 break;
       
  4182                 
       
  4183             }
       
  4184             
       
  4185             
       
  4186             ERROR;
       
  4187         }
       
  4188         
       
  4189     }/*function_dword_to_tod*/
       
  4190     break;
       
  4191 
       
  4192 /****
       
  4193  *DWORD_TO_UDINT
       
  4194  */
       
  4195     case function_dword_to_udint :
       
  4196     {
       
  4197         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4198 
       
  4199         {
       
  4200             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4202             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4203             symbol_c *IN_type_symbol = NULL;
       
  4204             
       
  4205             /* Get the value from a foo(<param_value>) style call */
       
  4206             if (IN_param_value == NULL)
       
  4207               IN_param_value = function_call_param_iterator.next_nf();
       
  4208             if (IN_param_value != NULL) {
       
  4209               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4210               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4211             }
       
  4212             
       
  4213             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4214             {
       
  4215         
       
  4216                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4217                 
       
  4218                 if (IN_type_symbol == NULL)
       
  4219                   IN_type_symbol = last_type_symbol;
       
  4220                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4221                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4222                 function_type_prefix = return_type_symbol;
       
  4223                 function_type_suffix = IN_type_symbol;
       
  4224                 break;
       
  4225                 
       
  4226             }
       
  4227             
       
  4228             
       
  4229             ERROR;
       
  4230         }
       
  4231         
       
  4232     }/*function_dword_to_udint*/
       
  4233     break;
       
  4234 
       
  4235 /****
       
  4236  *DWORD_TO_WORD
       
  4237  */
       
  4238     case function_dword_to_word :
       
  4239     {
       
  4240         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4241 
       
  4242         {
       
  4243             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4244             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4245             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4246             symbol_c *IN_type_symbol = NULL;
       
  4247             
       
  4248             /* Get the value from a foo(<param_value>) style call */
       
  4249             if (IN_param_value == NULL)
       
  4250               IN_param_value = function_call_param_iterator.next_nf();
       
  4251             if (IN_param_value != NULL) {
       
  4252               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4253               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4254             }
       
  4255             
       
  4256             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4257             {
       
  4258         
       
  4259                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4260                 
       
  4261                 if (IN_type_symbol == NULL)
       
  4262                   IN_type_symbol = last_type_symbol;
       
  4263                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4264                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4265                 function_type_prefix = return_type_symbol;
       
  4266                 function_type_suffix = IN_type_symbol;
       
  4267                 break;
       
  4268                 
       
  4269             }
       
  4270             
       
  4271             
       
  4272             ERROR;
       
  4273         }
       
  4274         
       
  4275     }/*function_dword_to_word*/
       
  4276     break;
       
  4277 
       
  4278 /****
       
  4279  *DWORD_TO_STRING
       
  4280  */
       
  4281     case function_dword_to_string :
       
  4282     {
       
  4283         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4284 
       
  4285         {
       
  4286             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4287             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4288             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4289             symbol_c *IN_type_symbol = NULL;
       
  4290             
       
  4291             /* Get the value from a foo(<param_value>) style call */
       
  4292             if (IN_param_value == NULL)
       
  4293               IN_param_value = function_call_param_iterator.next_nf();
       
  4294             if (IN_param_value != NULL) {
       
  4295               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4296               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4297             }
       
  4298             
       
  4299             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4300             {
       
  4301         
       
  4302                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  4303                 
       
  4304                 if (IN_type_symbol == NULL)
       
  4305                   IN_type_symbol = last_type_symbol;
       
  4306                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4308                 function_type_prefix = return_type_symbol;
       
  4309                 break;
       
  4310                 
       
  4311             }
       
  4312             
       
  4313             
       
  4314             ERROR;
       
  4315         }
       
  4316         
       
  4317     }/*function_dword_to_string*/
       
  4318     break;
       
  4319 
       
  4320 /****
       
  4321  *DWORD_TO_LWORD
       
  4322  */
       
  4323     case function_dword_to_lword :
       
  4324     {
       
  4325         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4326 
       
  4327         {
       
  4328             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4329             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4330             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4331             symbol_c *IN_type_symbol = NULL;
       
  4332             
       
  4333             /* Get the value from a foo(<param_value>) style call */
       
  4334             if (IN_param_value == NULL)
       
  4335               IN_param_value = function_call_param_iterator.next_nf();
       
  4336             if (IN_param_value != NULL) {
       
  4337               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4338               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4339             }
       
  4340             
       
  4341             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4342             {
       
  4343         
       
  4344                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4345                 
       
  4346                 if (IN_type_symbol == NULL)
       
  4347                   IN_type_symbol = last_type_symbol;
       
  4348                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4349                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4350                 function_type_prefix = return_type_symbol;
       
  4351                 function_type_suffix = IN_type_symbol;
       
  4352                 break;
       
  4353                 
       
  4354             }
       
  4355             
       
  4356             
       
  4357             ERROR;
       
  4358         }
       
  4359         
       
  4360     }/*function_dword_to_lword*/
       
  4361     break;
       
  4362 
       
  4363 /****
       
  4364  *DWORD_TO_UINT
       
  4365  */
       
  4366     case function_dword_to_uint :
       
  4367     {
       
  4368         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4369 
       
  4370         {
       
  4371             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4373             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4374             symbol_c *IN_type_symbol = NULL;
       
  4375             
       
  4376             /* Get the value from a foo(<param_value>) style call */
       
  4377             if (IN_param_value == NULL)
       
  4378               IN_param_value = function_call_param_iterator.next_nf();
       
  4379             if (IN_param_value != NULL) {
       
  4380               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4381               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4382             }
       
  4383             
       
  4384             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4385             {
       
  4386         
       
  4387                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4388                 
       
  4389                 if (IN_type_symbol == NULL)
       
  4390                   IN_type_symbol = last_type_symbol;
       
  4391                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4392                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4393                 function_type_prefix = return_type_symbol;
       
  4394                 function_type_suffix = IN_type_symbol;
       
  4395                 break;
       
  4396                 
       
  4397             }
       
  4398             
       
  4399             
       
  4400             ERROR;
       
  4401         }
       
  4402         
       
  4403     }/*function_dword_to_uint*/
       
  4404     break;
       
  4405 
       
  4406 /****
       
  4407  *DWORD_TO_LREAL
       
  4408  */
       
  4409     case function_dword_to_lreal :
       
  4410     {
       
  4411         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4412 
       
  4413         {
       
  4414             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4416             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4417             symbol_c *IN_type_symbol = NULL;
       
  4418             
       
  4419             /* Get the value from a foo(<param_value>) style call */
       
  4420             if (IN_param_value == NULL)
       
  4421               IN_param_value = function_call_param_iterator.next_nf();
       
  4422             if (IN_param_value != NULL) {
       
  4423               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4424               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4425             }
       
  4426             
       
  4427             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4428             {
       
  4429         
       
  4430                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4431                 
       
  4432                 if (IN_type_symbol == NULL)
       
  4433                   IN_type_symbol = last_type_symbol;
       
  4434                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4435                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4436                 function_type_prefix = return_type_symbol;
       
  4437                 function_type_suffix = IN_type_symbol;
       
  4438                 break;
       
  4439                 
       
  4440             }
       
  4441             
       
  4442             
       
  4443             ERROR;
       
  4444         }
       
  4445         
       
  4446     }/*function_dword_to_lreal*/
       
  4447     break;
       
  4448 
       
  4449 /****
       
  4450  *DWORD_TO_BYTE
       
  4451  */
       
  4452     case function_dword_to_byte :
       
  4453     {
       
  4454         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4455 
       
  4456         {
       
  4457             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4458             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4459             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4460             symbol_c *IN_type_symbol = NULL;
       
  4461             
       
  4462             /* Get the value from a foo(<param_value>) style call */
       
  4463             if (IN_param_value == NULL)
       
  4464               IN_param_value = function_call_param_iterator.next_nf();
       
  4465             if (IN_param_value != NULL) {
       
  4466               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4467               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4468             }
       
  4469             
       
  4470             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4471             {
       
  4472         
       
  4473                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4474                 
       
  4475                 if (IN_type_symbol == NULL)
       
  4476                   IN_type_symbol = last_type_symbol;
       
  4477                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4478                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4479                 function_type_prefix = return_type_symbol;
       
  4480                 function_type_suffix = IN_type_symbol;
       
  4481                 break;
       
  4482                 
       
  4483             }
       
  4484             
       
  4485             
       
  4486             ERROR;
       
  4487         }
       
  4488         
       
  4489     }/*function_dword_to_byte*/
       
  4490     break;
       
  4491 
       
  4492 /****
       
  4493  *DWORD_TO_USINT
       
  4494  */
       
  4495     case function_dword_to_usint :
       
  4496     {
       
  4497         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4498 
       
  4499         {
       
  4500             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4501             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4502             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4503             symbol_c *IN_type_symbol = NULL;
       
  4504             
       
  4505             /* Get the value from a foo(<param_value>) style call */
       
  4506             if (IN_param_value == NULL)
       
  4507               IN_param_value = function_call_param_iterator.next_nf();
       
  4508             if (IN_param_value != NULL) {
       
  4509               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4510               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4511             }
       
  4512             
       
  4513             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4514             {
       
  4515         
       
  4516                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4517                 
       
  4518                 if (IN_type_symbol == NULL)
       
  4519                   IN_type_symbol = last_type_symbol;
       
  4520                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4521                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4522                 function_type_prefix = return_type_symbol;
       
  4523                 function_type_suffix = IN_type_symbol;
       
  4524                 break;
       
  4525                 
       
  4526             }
       
  4527             
       
  4528             
       
  4529             ERROR;
       
  4530         }
       
  4531         
       
  4532     }/*function_dword_to_usint*/
       
  4533     break;
       
  4534 
       
  4535 /****
       
  4536  *DWORD_TO_ULINT
       
  4537  */
       
  4538     case function_dword_to_ulint :
       
  4539     {
       
  4540         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4541 
       
  4542         {
       
  4543             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4545             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4546             symbol_c *IN_type_symbol = NULL;
       
  4547             
       
  4548             /* Get the value from a foo(<param_value>) style call */
       
  4549             if (IN_param_value == NULL)
       
  4550               IN_param_value = function_call_param_iterator.next_nf();
       
  4551             if (IN_param_value != NULL) {
       
  4552               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4553               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4554             }
       
  4555             
       
  4556             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4557             {
       
  4558         
       
  4559                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4560                 
       
  4561                 if (IN_type_symbol == NULL)
       
  4562                   IN_type_symbol = last_type_symbol;
       
  4563                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4564                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4565                 function_type_prefix = return_type_symbol;
       
  4566                 function_type_suffix = IN_type_symbol;
       
  4567                 break;
       
  4568                 
       
  4569             }
       
  4570             
       
  4571             
       
  4572             ERROR;
       
  4573         }
       
  4574         
       
  4575     }/*function_dword_to_ulint*/
       
  4576     break;
       
  4577 
       
  4578 /****
       
  4579  *DWORD_TO_BOOL
       
  4580  */
       
  4581     case function_dword_to_bool :
       
  4582     {
       
  4583         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4584 
       
  4585         {
       
  4586             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4588             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4589             symbol_c *IN_type_symbol = NULL;
       
  4590             
       
  4591             /* Get the value from a foo(<param_value>) style call */
       
  4592             if (IN_param_value == NULL)
       
  4593               IN_param_value = function_call_param_iterator.next_nf();
       
  4594             if (IN_param_value != NULL) {
       
  4595               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4596               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4597             }
       
  4598             
       
  4599             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4600             {
       
  4601         
       
  4602                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4603                 
       
  4604                 if (IN_type_symbol == NULL)
       
  4605                   IN_type_symbol = last_type_symbol;
       
  4606                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4607                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4608                 function_type_prefix = return_type_symbol;
       
  4609                 function_type_suffix = IN_type_symbol;
       
  4610                 break;
       
  4611                 
       
  4612             }
       
  4613             
       
  4614             
       
  4615             ERROR;
       
  4616         }
       
  4617         
       
  4618     }/*function_dword_to_bool*/
       
  4619     break;
       
  4620 
       
  4621 /****
       
  4622  *DWORD_TO_TIME
       
  4623  */
       
  4624     case function_dword_to_time :
       
  4625     {
       
  4626         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4627 
       
  4628         {
       
  4629             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4630             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4631             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4632             symbol_c *IN_type_symbol = NULL;
       
  4633             
       
  4634             /* Get the value from a foo(<param_value>) style call */
       
  4635             if (IN_param_value == NULL)
       
  4636               IN_param_value = function_call_param_iterator.next_nf();
       
  4637             if (IN_param_value != NULL) {
       
  4638               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4639               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4640             }
       
  4641             
       
  4642             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4643             {
       
  4644         
       
  4645                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4646                 
       
  4647                 if (IN_type_symbol == NULL)
       
  4648                   IN_type_symbol = last_type_symbol;
       
  4649                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4650                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4651                 function_type_prefix = return_type_symbol;
       
  4652                 break;
       
  4653                 
       
  4654             }
       
  4655             
       
  4656             
       
  4657             ERROR;
       
  4658         }
       
  4659         
       
  4660     }/*function_dword_to_time*/
       
  4661     break;
       
  4662 
       
  4663 /****
       
  4664  *DWORD_TO_INT
       
  4665  */
       
  4666     case function_dword_to_int :
       
  4667     {
       
  4668         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
       
  4669 
       
  4670         {
       
  4671             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4673             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4674             symbol_c *IN_type_symbol = NULL;
       
  4675             
       
  4676             /* Get the value from a foo(<param_value>) style call */
       
  4677             if (IN_param_value == NULL)
       
  4678               IN_param_value = function_call_param_iterator.next_nf();
       
  4679             if (IN_param_value != NULL) {
       
  4680               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4681               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4682             }
       
  4683             
       
  4684             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4685             {
       
  4686         
       
  4687                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4688                 
       
  4689                 if (IN_type_symbol == NULL)
       
  4690                   IN_type_symbol = last_type_symbol;
       
  4691                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4692                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4693                 function_type_prefix = return_type_symbol;
       
  4694                 function_type_suffix = IN_type_symbol;
       
  4695                 break;
       
  4696                 
       
  4697             }
       
  4698             
       
  4699             
       
  4700             ERROR;
       
  4701         }
       
  4702         
       
  4703     }/*function_dword_to_int*/
       
  4704     break;
       
  4705 
       
  4706 /****
       
  4707  *DT_TO_REAL
       
  4708  */
       
  4709     case function_dt_to_real :
       
  4710     {
       
  4711         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4712 
       
  4713         {
       
  4714             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4716             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4717             symbol_c *IN_type_symbol = NULL;
       
  4718             
       
  4719             /* Get the value from a foo(<param_value>) style call */
       
  4720             if (IN_param_value == NULL)
       
  4721               IN_param_value = function_call_param_iterator.next_nf();
       
  4722             if (IN_param_value != NULL) {
       
  4723               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4724               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4725             }
       
  4726             
       
  4727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4728             {
       
  4729         
       
  4730                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  4731                 
       
  4732                 if (IN_type_symbol == NULL)
       
  4733                   IN_type_symbol = last_type_symbol;
       
  4734                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4735                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4736                 function_type_prefix = return_type_symbol;
       
  4737                 break;
       
  4738                 
       
  4739             }
       
  4740             
       
  4741             
       
  4742             ERROR;
       
  4743         }
       
  4744         
       
  4745     }/*function_dt_to_real*/
       
  4746     break;
       
  4747 
       
  4748 /****
       
  4749  *DT_TO_SINT
       
  4750  */
       
  4751     case function_dt_to_sint :
       
  4752     {
       
  4753         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4754 
       
  4755         {
       
  4756             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4758             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4759             symbol_c *IN_type_symbol = NULL;
       
  4760             
       
  4761             /* Get the value from a foo(<param_value>) style call */
       
  4762             if (IN_param_value == NULL)
       
  4763               IN_param_value = function_call_param_iterator.next_nf();
       
  4764             if (IN_param_value != NULL) {
       
  4765               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4766               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4767             }
       
  4768             
       
  4769             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4770             {
       
  4771         
       
  4772                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4773                 
       
  4774                 if (IN_type_symbol == NULL)
       
  4775                   IN_type_symbol = last_type_symbol;
       
  4776                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4777                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4778                 function_type_prefix = return_type_symbol;
       
  4779                 break;
       
  4780                 
       
  4781             }
       
  4782             
       
  4783             
       
  4784             ERROR;
       
  4785         }
       
  4786         
       
  4787     }/*function_dt_to_sint*/
       
  4788     break;
       
  4789 
       
  4790 /****
       
  4791  *DT_TO_LINT
       
  4792  */
       
  4793     case function_dt_to_lint :
       
  4794     {
       
  4795         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4796 
       
  4797         {
       
  4798             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4799             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4800             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4801             symbol_c *IN_type_symbol = NULL;
       
  4802             
       
  4803             /* Get the value from a foo(<param_value>) style call */
       
  4804             if (IN_param_value == NULL)
       
  4805               IN_param_value = function_call_param_iterator.next_nf();
       
  4806             if (IN_param_value != NULL) {
       
  4807               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4808               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4809             }
       
  4810             
       
  4811             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4812             {
       
  4813         
       
  4814                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4815                 
       
  4816                 if (IN_type_symbol == NULL)
       
  4817                   IN_type_symbol = last_type_symbol;
       
  4818                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4819                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4820                 function_type_prefix = return_type_symbol;
       
  4821                 break;
       
  4822                 
       
  4823             }
       
  4824             
       
  4825             
       
  4826             ERROR;
       
  4827         }
       
  4828         
       
  4829     }/*function_dt_to_lint*/
       
  4830     break;
       
  4831 
       
  4832 /****
       
  4833  *DT_TO_DINT
       
  4834  */
       
  4835     case function_dt_to_dint :
       
  4836     {
       
  4837         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4838 
       
  4839         {
       
  4840             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4841             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4842             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4843             symbol_c *IN_type_symbol = NULL;
       
  4844             
       
  4845             /* Get the value from a foo(<param_value>) style call */
       
  4846             if (IN_param_value == NULL)
       
  4847               IN_param_value = function_call_param_iterator.next_nf();
       
  4848             if (IN_param_value != NULL) {
       
  4849               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4850               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4851             }
       
  4852             
       
  4853             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4854             {
       
  4855         
       
  4856                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4857                 
       
  4858                 if (IN_type_symbol == NULL)
       
  4859                   IN_type_symbol = last_type_symbol;
       
  4860                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4861                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4862                 function_type_prefix = return_type_symbol;
       
  4863                 break;
       
  4864                 
       
  4865             }
       
  4866             
       
  4867             
       
  4868             ERROR;
       
  4869         }
       
  4870         
       
  4871     }/*function_dt_to_dint*/
       
  4872     break;
       
  4873 
       
  4874 /****
       
  4875  *DT_TO_DWORD
       
  4876  */
       
  4877     case function_dt_to_dword :
       
  4878     {
       
  4879         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4880 
       
  4881         {
       
  4882             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4884             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4885             symbol_c *IN_type_symbol = NULL;
       
  4886             
       
  4887             /* Get the value from a foo(<param_value>) style call */
       
  4888             if (IN_param_value == NULL)
       
  4889               IN_param_value = function_call_param_iterator.next_nf();
       
  4890             if (IN_param_value != NULL) {
       
  4891               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4892               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4893             }
       
  4894             
       
  4895             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4896             {
       
  4897         
       
  4898                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4899                 
       
  4900                 if (IN_type_symbol == NULL)
       
  4901                   IN_type_symbol = last_type_symbol;
       
  4902                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4903                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4904                 function_type_prefix = return_type_symbol;
       
  4905                 break;
       
  4906                 
       
  4907             }
       
  4908             
       
  4909             
       
  4910             ERROR;
       
  4911         }
       
  4912         
       
  4913     }/*function_dt_to_dword*/
       
  4914     break;
       
  4915 
       
  4916 /****
       
  4917  *DT_TO_UDINT
       
  4918  */
       
  4919     case function_dt_to_udint :
       
  4920     {
       
  4921         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4922 
       
  4923         {
       
  4924             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4925             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4926             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4927             symbol_c *IN_type_symbol = NULL;
       
  4928             
       
  4929             /* Get the value from a foo(<param_value>) style call */
       
  4930             if (IN_param_value == NULL)
       
  4931               IN_param_value = function_call_param_iterator.next_nf();
       
  4932             if (IN_param_value != NULL) {
       
  4933               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4934               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4935             }
       
  4936             
       
  4937             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4938             {
       
  4939         
       
  4940                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4941                 
       
  4942                 if (IN_type_symbol == NULL)
       
  4943                   IN_type_symbol = last_type_symbol;
       
  4944                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4945                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4946                 function_type_prefix = return_type_symbol;
       
  4947                 break;
       
  4948                 
       
  4949             }
       
  4950             
       
  4951             
       
  4952             ERROR;
       
  4953         }
       
  4954         
       
  4955     }/*function_dt_to_udint*/
       
  4956     break;
       
  4957 
       
  4958 /****
       
  4959  *DT_TO_WORD
       
  4960  */
       
  4961     case function_dt_to_word :
       
  4962     {
       
  4963         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  4964 
       
  4965         {
       
  4966             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4967             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4968             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4969             symbol_c *IN_type_symbol = NULL;
       
  4970             
       
  4971             /* Get the value from a foo(<param_value>) style call */
       
  4972             if (IN_param_value == NULL)
       
  4973               IN_param_value = function_call_param_iterator.next_nf();
       
  4974             if (IN_param_value != NULL) {
       
  4975               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4976               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4977             }
       
  4978             
       
  4979             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4980             {
       
  4981         
       
  4982                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4983                 
       
  4984                 if (IN_type_symbol == NULL)
       
  4985                   IN_type_symbol = last_type_symbol;
       
  4986                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4987                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4988                 function_type_prefix = return_type_symbol;
       
  4989                 break;
       
  4990                 
       
  4991             }
       
  4992             
       
  4993             
       
  4994             ERROR;
       
  4995         }
       
  4996         
       
  4997     }/*function_dt_to_word*/
       
  4998     break;
       
  4999 
       
  5000 /****
       
  5001  *DT_TO_STRING
       
  5002  */
       
  5003     case function_dt_to_string :
       
  5004     {
       
  5005         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5006 
       
  5007         {
       
  5008             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5009             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5010             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5011             symbol_c *IN_type_symbol = NULL;
       
  5012             
       
  5013             /* Get the value from a foo(<param_value>) style call */
       
  5014             if (IN_param_value == NULL)
       
  5015               IN_param_value = function_call_param_iterator.next_nf();
       
  5016             if (IN_param_value != NULL) {
       
  5017               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5018               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5019             }
       
  5020             
       
  5021             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5022             {
       
  5023         
       
  5024                 function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
       
  5025                 
       
  5026                 if (IN_type_symbol == NULL)
       
  5027                   IN_type_symbol = last_type_symbol;
       
  5028                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5029                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5030                 function_type_prefix = return_type_symbol;
       
  5031                 break;
       
  5032                 
       
  5033             }
       
  5034             
       
  5035             
       
  5036             ERROR;
       
  5037         }
       
  5038         
       
  5039     }/*function_dt_to_string*/
       
  5040     break;
       
  5041 
       
  5042 /****
       
  5043  *DT_TO_LWORD
       
  5044  */
       
  5045     case function_dt_to_lword :
       
  5046     {
       
  5047         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5048 
       
  5049         {
       
  5050             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5052             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5053             symbol_c *IN_type_symbol = NULL;
       
  5054             
       
  5055             /* Get the value from a foo(<param_value>) style call */
       
  5056             if (IN_param_value == NULL)
       
  5057               IN_param_value = function_call_param_iterator.next_nf();
       
  5058             if (IN_param_value != NULL) {
       
  5059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5061             }
       
  5062             
       
  5063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5064             {
       
  5065         
       
  5066                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5067                 
       
  5068                 if (IN_type_symbol == NULL)
       
  5069                   IN_type_symbol = last_type_symbol;
       
  5070                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5071                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5072                 function_type_prefix = return_type_symbol;
       
  5073                 break;
       
  5074                 
       
  5075             }
       
  5076             
       
  5077             
       
  5078             ERROR;
       
  5079         }
       
  5080         
       
  5081     }/*function_dt_to_lword*/
       
  5082     break;
       
  5083 
       
  5084 /****
       
  5085  *DT_TO_UINT
       
  5086  */
       
  5087     case function_dt_to_uint :
       
  5088     {
       
  5089         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5090 
       
  5091         {
       
  5092             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5094             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5095             symbol_c *IN_type_symbol = NULL;
       
  5096             
       
  5097             /* Get the value from a foo(<param_value>) style call */
       
  5098             if (IN_param_value == NULL)
       
  5099               IN_param_value = function_call_param_iterator.next_nf();
       
  5100             if (IN_param_value != NULL) {
       
  5101               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5102               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5103             }
       
  5104             
       
  5105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5106             {
       
  5107         
       
  5108                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5109                 
       
  5110                 if (IN_type_symbol == NULL)
       
  5111                   IN_type_symbol = last_type_symbol;
       
  5112                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5113                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5114                 function_type_prefix = return_type_symbol;
       
  5115                 break;
       
  5116                 
       
  5117             }
       
  5118             
       
  5119             
       
  5120             ERROR;
       
  5121         }
       
  5122         
       
  5123     }/*function_dt_to_uint*/
       
  5124     break;
       
  5125 
       
  5126 /****
       
  5127  *DT_TO_LREAL
       
  5128  */
       
  5129     case function_dt_to_lreal :
       
  5130     {
       
  5131         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5132 
       
  5133         {
       
  5134             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5135             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5136             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5137             symbol_c *IN_type_symbol = NULL;
       
  5138             
       
  5139             /* Get the value from a foo(<param_value>) style call */
       
  5140             if (IN_param_value == NULL)
       
  5141               IN_param_value = function_call_param_iterator.next_nf();
       
  5142             if (IN_param_value != NULL) {
       
  5143               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5144               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5145             }
       
  5146             
       
  5147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5148             {
       
  5149         
       
  5150                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5151                 
       
  5152                 if (IN_type_symbol == NULL)
       
  5153                   IN_type_symbol = last_type_symbol;
       
  5154                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5155                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5156                 function_type_prefix = return_type_symbol;
       
  5157                 break;
       
  5158                 
       
  5159             }
       
  5160             
       
  5161             
       
  5162             ERROR;
       
  5163         }
       
  5164         
       
  5165     }/*function_dt_to_lreal*/
       
  5166     break;
       
  5167 
       
  5168 /****
       
  5169  *DT_TO_BYTE
       
  5170  */
       
  5171     case function_dt_to_byte :
       
  5172     {
       
  5173         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5174 
       
  5175         {
       
  5176             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5177             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5178             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5179             symbol_c *IN_type_symbol = NULL;
       
  5180             
       
  5181             /* Get the value from a foo(<param_value>) style call */
       
  5182             if (IN_param_value == NULL)
       
  5183               IN_param_value = function_call_param_iterator.next_nf();
       
  5184             if (IN_param_value != NULL) {
       
  5185               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5186               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5187             }
       
  5188             
       
  5189             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5190             {
       
  5191         
       
  5192                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5193                 
       
  5194                 if (IN_type_symbol == NULL)
       
  5195                   IN_type_symbol = last_type_symbol;
       
  5196                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5197                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5198                 function_type_prefix = return_type_symbol;
       
  5199                 break;
       
  5200                 
       
  5201             }
       
  5202             
       
  5203             
       
  5204             ERROR;
       
  5205         }
       
  5206         
       
  5207     }/*function_dt_to_byte*/
       
  5208     break;
       
  5209 
       
  5210 /****
       
  5211  *DT_TO_USINT
       
  5212  */
       
  5213     case function_dt_to_usint :
       
  5214     {
       
  5215         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5216 
       
  5217         {
       
  5218             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5219             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5220             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5221             symbol_c *IN_type_symbol = NULL;
       
  5222             
       
  5223             /* Get the value from a foo(<param_value>) style call */
       
  5224             if (IN_param_value == NULL)
       
  5225               IN_param_value = function_call_param_iterator.next_nf();
       
  5226             if (IN_param_value != NULL) {
       
  5227               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5228               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5229             }
       
  5230             
       
  5231             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5232             {
       
  5233         
       
  5234                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5235                 
       
  5236                 if (IN_type_symbol == NULL)
       
  5237                   IN_type_symbol = last_type_symbol;
       
  5238                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5240                 function_type_prefix = return_type_symbol;
       
  5241                 break;
       
  5242                 
       
  5243             }
       
  5244             
       
  5245             
       
  5246             ERROR;
       
  5247         }
       
  5248         
       
  5249     }/*function_dt_to_usint*/
       
  5250     break;
       
  5251 
       
  5252 /****
       
  5253  *DT_TO_ULINT
       
  5254  */
       
  5255     case function_dt_to_ulint :
       
  5256     {
       
  5257         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5258 
       
  5259         {
       
  5260             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5261             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5262             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5263             symbol_c *IN_type_symbol = NULL;
       
  5264             
       
  5265             /* Get the value from a foo(<param_value>) style call */
       
  5266             if (IN_param_value == NULL)
       
  5267               IN_param_value = function_call_param_iterator.next_nf();
       
  5268             if (IN_param_value != NULL) {
       
  5269               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5270               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5271             }
       
  5272             
       
  5273             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5274             {
       
  5275         
       
  5276                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5277                 
       
  5278                 if (IN_type_symbol == NULL)
       
  5279                   IN_type_symbol = last_type_symbol;
       
  5280                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5281                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5282                 function_type_prefix = return_type_symbol;
       
  5283                 break;
       
  5284                 
       
  5285             }
       
  5286             
       
  5287             
       
  5288             ERROR;
       
  5289         }
       
  5290         
       
  5291     }/*function_dt_to_ulint*/
       
  5292     break;
       
  5293 
       
  5294 /****
       
  5295  *DT_TO_INT
       
  5296  */
       
  5297     case function_dt_to_int :
       
  5298     {
       
  5299         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
       
  5300 
       
  5301         {
       
  5302             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5304             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5305             symbol_c *IN_type_symbol = NULL;
       
  5306             
       
  5307             /* Get the value from a foo(<param_value>) style call */
       
  5308             if (IN_param_value == NULL)
       
  5309               IN_param_value = function_call_param_iterator.next_nf();
       
  5310             if (IN_param_value != NULL) {
       
  5311               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5312               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5313             }
       
  5314             
       
  5315             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5316             {
       
  5317         
       
  5318                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5319                 
       
  5320                 if (IN_type_symbol == NULL)
       
  5321                   IN_type_symbol = last_type_symbol;
       
  5322                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5323                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5324                 function_type_prefix = return_type_symbol;
       
  5325                 break;
       
  5326                 
       
  5327             }
       
  5328             
       
  5329             
       
  5330             ERROR;
       
  5331         }
       
  5332         
       
  5333     }/*function_dt_to_int*/
       
  5334     break;
       
  5335 
       
  5336 /****
       
  5337  *TOD_TO_REAL
       
  5338  */
       
  5339     case function_tod_to_real :
       
  5340     {
       
  5341         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5342 
       
  5343         {
       
  5344             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5345             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5346             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5347             symbol_c *IN_type_symbol = NULL;
       
  5348             
       
  5349             /* Get the value from a foo(<param_value>) style call */
       
  5350             if (IN_param_value == NULL)
       
  5351               IN_param_value = function_call_param_iterator.next_nf();
       
  5352             if (IN_param_value != NULL) {
       
  5353               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5354               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5355             }
       
  5356             
       
  5357             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5358             {
       
  5359         
       
  5360                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5361                 
       
  5362                 if (IN_type_symbol == NULL)
       
  5363                   IN_type_symbol = last_type_symbol;
       
  5364                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5365                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5366                 function_type_prefix = return_type_symbol;
       
  5367                 break;
       
  5368                 
       
  5369             }
       
  5370             
       
  5371             
       
  5372             ERROR;
       
  5373         }
       
  5374         
       
  5375     }/*function_tod_to_real*/
       
  5376     break;
       
  5377 
       
  5378 /****
       
  5379  *TOD_TO_SINT
       
  5380  */
       
  5381     case function_tod_to_sint :
       
  5382     {
       
  5383         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5384 
       
  5385         {
       
  5386             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5388             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5389             symbol_c *IN_type_symbol = NULL;
       
  5390             
       
  5391             /* Get the value from a foo(<param_value>) style call */
       
  5392             if (IN_param_value == NULL)
       
  5393               IN_param_value = function_call_param_iterator.next_nf();
       
  5394             if (IN_param_value != NULL) {
       
  5395               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5396               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5397             }
       
  5398             
       
  5399             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5400             {
       
  5401         
       
  5402                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5403                 
       
  5404                 if (IN_type_symbol == NULL)
       
  5405                   IN_type_symbol = last_type_symbol;
       
  5406                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5407                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5408                 function_type_prefix = return_type_symbol;
       
  5409                 break;
       
  5410                 
       
  5411             }
       
  5412             
       
  5413             
       
  5414             ERROR;
       
  5415         }
       
  5416         
       
  5417     }/*function_tod_to_sint*/
       
  5418     break;
       
  5419 
       
  5420 /****
       
  5421  *TOD_TO_LINT
       
  5422  */
       
  5423     case function_tod_to_lint :
       
  5424     {
       
  5425         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5426 
       
  5427         {
       
  5428             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5429             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5430             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5431             symbol_c *IN_type_symbol = NULL;
       
  5432             
       
  5433             /* Get the value from a foo(<param_value>) style call */
       
  5434             if (IN_param_value == NULL)
       
  5435               IN_param_value = function_call_param_iterator.next_nf();
       
  5436             if (IN_param_value != NULL) {
       
  5437               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5438               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5439             }
       
  5440             
       
  5441             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5442             {
       
  5443         
       
  5444                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5445                 
       
  5446                 if (IN_type_symbol == NULL)
       
  5447                   IN_type_symbol = last_type_symbol;
       
  5448                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5449                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5450                 function_type_prefix = return_type_symbol;
       
  5451                 break;
       
  5452                 
       
  5453             }
       
  5454             
       
  5455             
       
  5456             ERROR;
       
  5457         }
       
  5458         
       
  5459     }/*function_tod_to_lint*/
       
  5460     break;
       
  5461 
       
  5462 /****
       
  5463  *TOD_TO_DINT
       
  5464  */
       
  5465     case function_tod_to_dint :
       
  5466     {
       
  5467         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5468 
       
  5469         {
       
  5470             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5472             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5473             symbol_c *IN_type_symbol = NULL;
       
  5474             
       
  5475             /* Get the value from a foo(<param_value>) style call */
       
  5476             if (IN_param_value == NULL)
       
  5477               IN_param_value = function_call_param_iterator.next_nf();
       
  5478             if (IN_param_value != NULL) {
       
  5479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5481             }
       
  5482             
       
  5483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5484             {
       
  5485         
       
  5486                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5487                 
       
  5488                 if (IN_type_symbol == NULL)
       
  5489                   IN_type_symbol = last_type_symbol;
       
  5490                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5491                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5492                 function_type_prefix = return_type_symbol;
       
  5493                 break;
       
  5494                 
       
  5495             }
       
  5496             
       
  5497             
       
  5498             ERROR;
       
  5499         }
       
  5500         
       
  5501     }/*function_tod_to_dint*/
       
  5502     break;
       
  5503 
       
  5504 /****
       
  5505  *TOD_TO_DWORD
       
  5506  */
       
  5507     case function_tod_to_dword :
       
  5508     {
       
  5509         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5510 
       
  5511         {
       
  5512             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5513             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5514             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5515             symbol_c *IN_type_symbol = NULL;
       
  5516             
       
  5517             /* Get the value from a foo(<param_value>) style call */
       
  5518             if (IN_param_value == NULL)
       
  5519               IN_param_value = function_call_param_iterator.next_nf();
       
  5520             if (IN_param_value != NULL) {
       
  5521               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5522               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5523             }
       
  5524             
       
  5525             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5526             {
       
  5527         
       
  5528                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5529                 
       
  5530                 if (IN_type_symbol == NULL)
       
  5531                   IN_type_symbol = last_type_symbol;
       
  5532                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5533                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5534                 function_type_prefix = return_type_symbol;
       
  5535                 break;
       
  5536                 
       
  5537             }
       
  5538             
       
  5539             
       
  5540             ERROR;
       
  5541         }
       
  5542         
       
  5543     }/*function_tod_to_dword*/
       
  5544     break;
       
  5545 
       
  5546 /****
       
  5547  *TOD_TO_UDINT
       
  5548  */
       
  5549     case function_tod_to_udint :
       
  5550     {
       
  5551         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5552 
       
  5553         {
       
  5554             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5556             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5557             symbol_c *IN_type_symbol = NULL;
       
  5558             
       
  5559             /* Get the value from a foo(<param_value>) style call */
       
  5560             if (IN_param_value == NULL)
       
  5561               IN_param_value = function_call_param_iterator.next_nf();
       
  5562             if (IN_param_value != NULL) {
       
  5563               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5564               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5565             }
       
  5566             
       
  5567             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5568             {
       
  5569         
       
  5570                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5571                 
       
  5572                 if (IN_type_symbol == NULL)
       
  5573                   IN_type_symbol = last_type_symbol;
       
  5574                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5575                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5576                 function_type_prefix = return_type_symbol;
       
  5577                 break;
       
  5578                 
       
  5579             }
       
  5580             
       
  5581             
       
  5582             ERROR;
       
  5583         }
       
  5584         
       
  5585     }/*function_tod_to_udint*/
       
  5586     break;
       
  5587 
       
  5588 /****
       
  5589  *TOD_TO_WORD
       
  5590  */
       
  5591     case function_tod_to_word :
       
  5592     {
       
  5593         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5594 
       
  5595         {
       
  5596             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5597             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5598             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5599             symbol_c *IN_type_symbol = NULL;
       
  5600             
       
  5601             /* Get the value from a foo(<param_value>) style call */
       
  5602             if (IN_param_value == NULL)
       
  5603               IN_param_value = function_call_param_iterator.next_nf();
       
  5604             if (IN_param_value != NULL) {
       
  5605               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5606               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5607             }
       
  5608             
       
  5609             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5610             {
       
  5611         
       
  5612                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5613                 
       
  5614                 if (IN_type_symbol == NULL)
       
  5615                   IN_type_symbol = last_type_symbol;
       
  5616                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5617                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5618                 function_type_prefix = return_type_symbol;
       
  5619                 break;
       
  5620                 
       
  5621             }
       
  5622             
       
  5623             
       
  5624             ERROR;
       
  5625         }
       
  5626         
       
  5627     }/*function_tod_to_word*/
       
  5628     break;
       
  5629 
       
  5630 /****
       
  5631  *TOD_TO_STRING
       
  5632  */
       
  5633     case function_tod_to_string :
       
  5634     {
       
  5635         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5636 
       
  5637         {
       
  5638             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5639             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5640             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5641             symbol_c *IN_type_symbol = NULL;
       
  5642             
       
  5643             /* Get the value from a foo(<param_value>) style call */
       
  5644             if (IN_param_value == NULL)
       
  5645               IN_param_value = function_call_param_iterator.next_nf();
       
  5646             if (IN_param_value != NULL) {
       
  5647               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5648               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5649             }
       
  5650             
       
  5651             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5652             {
       
  5653         
       
  5654                 function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
       
  5655                 
       
  5656                 if (IN_type_symbol == NULL)
       
  5657                   IN_type_symbol = last_type_symbol;
       
  5658                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5659                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5660                 function_type_prefix = return_type_symbol;
       
  5661                 break;
       
  5662                 
       
  5663             }
       
  5664             
       
  5665             
       
  5666             ERROR;
       
  5667         }
       
  5668         
       
  5669     }/*function_tod_to_string*/
       
  5670     break;
       
  5671 
       
  5672 /****
       
  5673  *TOD_TO_LWORD
       
  5674  */
       
  5675     case function_tod_to_lword :
       
  5676     {
       
  5677         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5678 
       
  5679         {
       
  5680             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5681             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5682             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5683             symbol_c *IN_type_symbol = NULL;
       
  5684             
       
  5685             /* Get the value from a foo(<param_value>) style call */
       
  5686             if (IN_param_value == NULL)
       
  5687               IN_param_value = function_call_param_iterator.next_nf();
       
  5688             if (IN_param_value != NULL) {
       
  5689               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5690               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5691             }
       
  5692             
       
  5693             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5694             {
       
  5695         
       
  5696                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5697                 
       
  5698                 if (IN_type_symbol == NULL)
       
  5699                   IN_type_symbol = last_type_symbol;
       
  5700                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5701                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5702                 function_type_prefix = return_type_symbol;
       
  5703                 break;
       
  5704                 
       
  5705             }
       
  5706             
       
  5707             
       
  5708             ERROR;
       
  5709         }
       
  5710         
       
  5711     }/*function_tod_to_lword*/
       
  5712     break;
       
  5713 
       
  5714 /****
       
  5715  *TOD_TO_UINT
       
  5716  */
       
  5717     case function_tod_to_uint :
       
  5718     {
       
  5719         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5720 
       
  5721         {
       
  5722             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5723             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5724             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5725             symbol_c *IN_type_symbol = NULL;
       
  5726             
       
  5727             /* Get the value from a foo(<param_value>) style call */
       
  5728             if (IN_param_value == NULL)
       
  5729               IN_param_value = function_call_param_iterator.next_nf();
       
  5730             if (IN_param_value != NULL) {
       
  5731               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5732               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5733             }
       
  5734             
       
  5735             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5736             {
       
  5737         
       
  5738                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5739                 
       
  5740                 if (IN_type_symbol == NULL)
       
  5741                   IN_type_symbol = last_type_symbol;
       
  5742                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5743                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5744                 function_type_prefix = return_type_symbol;
       
  5745                 break;
       
  5746                 
       
  5747             }
       
  5748             
       
  5749             
       
  5750             ERROR;
       
  5751         }
       
  5752         
       
  5753     }/*function_tod_to_uint*/
       
  5754     break;
       
  5755 
       
  5756 /****
       
  5757  *TOD_TO_LREAL
       
  5758  */
       
  5759     case function_tod_to_lreal :
       
  5760     {
       
  5761         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5762 
       
  5763         {
       
  5764             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5765             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5766             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5767             symbol_c *IN_type_symbol = NULL;
       
  5768             
       
  5769             /* Get the value from a foo(<param_value>) style call */
       
  5770             if (IN_param_value == NULL)
       
  5771               IN_param_value = function_call_param_iterator.next_nf();
       
  5772             if (IN_param_value != NULL) {
       
  5773               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5774               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5775             }
       
  5776             
       
  5777             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5778             {
       
  5779         
       
  5780                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5781                 
       
  5782                 if (IN_type_symbol == NULL)
       
  5783                   IN_type_symbol = last_type_symbol;
       
  5784                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5785                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5786                 function_type_prefix = return_type_symbol;
       
  5787                 break;
       
  5788                 
       
  5789             }
       
  5790             
       
  5791             
       
  5792             ERROR;
       
  5793         }
       
  5794         
       
  5795     }/*function_tod_to_lreal*/
       
  5796     break;
       
  5797 
       
  5798 /****
       
  5799  *TOD_TO_BYTE
       
  5800  */
       
  5801     case function_tod_to_byte :
       
  5802     {
       
  5803         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5804 
       
  5805         {
       
  5806             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5808             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5809             symbol_c *IN_type_symbol = NULL;
       
  5810             
       
  5811             /* Get the value from a foo(<param_value>) style call */
       
  5812             if (IN_param_value == NULL)
       
  5813               IN_param_value = function_call_param_iterator.next_nf();
       
  5814             if (IN_param_value != NULL) {
       
  5815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5817             }
       
  5818             
       
  5819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5820             {
       
  5821         
       
  5822                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5823                 
       
  5824                 if (IN_type_symbol == NULL)
       
  5825                   IN_type_symbol = last_type_symbol;
       
  5826                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5827                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5828                 function_type_prefix = return_type_symbol;
       
  5829                 break;
       
  5830                 
       
  5831             }
       
  5832             
       
  5833             
       
  5834             ERROR;
       
  5835         }
       
  5836         
       
  5837     }/*function_tod_to_byte*/
       
  5838     break;
       
  5839 
       
  5840 /****
       
  5841  *TOD_TO_USINT
       
  5842  */
       
  5843     case function_tod_to_usint :
       
  5844     {
       
  5845         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5846 
       
  5847         {
       
  5848             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5849             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5850             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5851             symbol_c *IN_type_symbol = NULL;
       
  5852             
       
  5853             /* Get the value from a foo(<param_value>) style call */
       
  5854             if (IN_param_value == NULL)
       
  5855               IN_param_value = function_call_param_iterator.next_nf();
       
  5856             if (IN_param_value != NULL) {
       
  5857               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5858               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5859             }
       
  5860             
       
  5861             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5862             {
       
  5863         
       
  5864                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5865                 
       
  5866                 if (IN_type_symbol == NULL)
       
  5867                   IN_type_symbol = last_type_symbol;
       
  5868                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5869                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5870                 function_type_prefix = return_type_symbol;
       
  5871                 break;
       
  5872                 
       
  5873             }
       
  5874             
       
  5875             
       
  5876             ERROR;
       
  5877         }
       
  5878         
       
  5879     }/*function_tod_to_usint*/
       
  5880     break;
       
  5881 
       
  5882 /****
       
  5883  *TOD_TO_ULINT
       
  5884  */
       
  5885     case function_tod_to_ulint :
       
  5886     {
       
  5887         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5888 
       
  5889         {
       
  5890             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5891             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5892             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5893             symbol_c *IN_type_symbol = NULL;
       
  5894             
       
  5895             /* Get the value from a foo(<param_value>) style call */
       
  5896             if (IN_param_value == NULL)
       
  5897               IN_param_value = function_call_param_iterator.next_nf();
       
  5898             if (IN_param_value != NULL) {
       
  5899               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5900               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5901             }
       
  5902             
       
  5903             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5904             {
       
  5905         
       
  5906                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5907                 
       
  5908                 if (IN_type_symbol == NULL)
       
  5909                   IN_type_symbol = last_type_symbol;
       
  5910                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5911                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5912                 function_type_prefix = return_type_symbol;
       
  5913                 break;
       
  5914                 
       
  5915             }
       
  5916             
       
  5917             
       
  5918             ERROR;
       
  5919         }
       
  5920         
       
  5921     }/*function_tod_to_ulint*/
       
  5922     break;
       
  5923 
       
  5924 /****
       
  5925  *TOD_TO_INT
       
  5926  */
       
  5927     case function_tod_to_int :
       
  5928     {
       
  5929         symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name;
       
  5930 
       
  5931         {
       
  5932             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5934             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5935             symbol_c *IN_type_symbol = NULL;
       
  5936             
       
  5937             /* Get the value from a foo(<param_value>) style call */
       
  5938             if (IN_param_value == NULL)
       
  5939               IN_param_value = function_call_param_iterator.next_nf();
       
  5940             if (IN_param_value != NULL) {
       
  5941               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5942               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5943             }
       
  5944             
       
  5945             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5946             {
       
  5947         
       
  5948                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5949                 
       
  5950                 if (IN_type_symbol == NULL)
       
  5951                   IN_type_symbol = last_type_symbol;
       
  5952                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5953                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5954                 function_type_prefix = return_type_symbol;
       
  5955                 break;
       
  5956                 
       
  5957             }
       
  5958             
       
  5959             
       
  5960             ERROR;
       
  5961         }
       
  5962         
       
  5963     }/*function_tod_to_int*/
       
  5964     break;
       
  5965 
       
  5966 /****
       
  5967  *UDINT_TO_REAL
       
  5968  */
       
  5969     case function_udint_to_real :
       
  5970     {
       
  5971         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  5972 
       
  5973         {
       
  5974             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5975             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5976             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5977             symbol_c *IN_type_symbol = NULL;
       
  5978             
       
  5979             /* Get the value from a foo(<param_value>) style call */
       
  5980             if (IN_param_value == NULL)
       
  5981               IN_param_value = function_call_param_iterator.next_nf();
       
  5982             if (IN_param_value != NULL) {
       
  5983               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5984               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5985             }
       
  5986             
       
  5987             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5988             {
       
  5989         
       
  5990                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  5991                 
       
  5992                 if (IN_type_symbol == NULL)
       
  5993                   IN_type_symbol = last_type_symbol;
       
  5994                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5995                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5996                 function_type_prefix = return_type_symbol;
       
  5997                 function_type_suffix = IN_type_symbol;
       
  5998                 break;
       
  5999                 
       
  6000             }
       
  6001             
       
  6002             
       
  6003             ERROR;
       
  6004         }
       
  6005         
       
  6006     }/*function_udint_to_real*/
       
  6007     break;
       
  6008 
       
  6009 /****
       
  6010  *UDINT_TO_SINT
       
  6011  */
       
  6012     case function_udint_to_sint :
       
  6013     {
       
  6014         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6015 
       
  6016         {
       
  6017             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6018             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6019             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6020             symbol_c *IN_type_symbol = NULL;
       
  6021             
       
  6022             /* Get the value from a foo(<param_value>) style call */
       
  6023             if (IN_param_value == NULL)
       
  6024               IN_param_value = function_call_param_iterator.next_nf();
       
  6025             if (IN_param_value != NULL) {
       
  6026               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6027               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6028             }
       
  6029             
       
  6030             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6031             {
       
  6032         
       
  6033                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6034                 
       
  6035                 if (IN_type_symbol == NULL)
       
  6036                   IN_type_symbol = last_type_symbol;
       
  6037                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6038                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6039                 function_type_prefix = return_type_symbol;
       
  6040                 function_type_suffix = IN_type_symbol;
       
  6041                 break;
       
  6042                 
       
  6043             }
       
  6044             
       
  6045             
       
  6046             ERROR;
       
  6047         }
       
  6048         
       
  6049     }/*function_udint_to_sint*/
       
  6050     break;
       
  6051 
       
  6052 /****
       
  6053  *UDINT_TO_LINT
       
  6054  */
       
  6055     case function_udint_to_lint :
       
  6056     {
       
  6057         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6058 
       
  6059         {
       
  6060             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6062             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6063             symbol_c *IN_type_symbol = NULL;
       
  6064             
       
  6065             /* Get the value from a foo(<param_value>) style call */
       
  6066             if (IN_param_value == NULL)
       
  6067               IN_param_value = function_call_param_iterator.next_nf();
       
  6068             if (IN_param_value != NULL) {
       
  6069               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6070               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6071             }
       
  6072             
       
  6073             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6074             {
       
  6075         
       
  6076                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6077                 
       
  6078                 if (IN_type_symbol == NULL)
       
  6079                   IN_type_symbol = last_type_symbol;
       
  6080                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6081                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6082                 function_type_prefix = return_type_symbol;
       
  6083                 function_type_suffix = IN_type_symbol;
       
  6084                 break;
       
  6085                 
       
  6086             }
       
  6087             
       
  6088             
       
  6089             ERROR;
       
  6090         }
       
  6091         
       
  6092     }/*function_udint_to_lint*/
       
  6093     break;
       
  6094 
       
  6095 /****
       
  6096  *UDINT_TO_DINT
       
  6097  */
       
  6098     case function_udint_to_dint :
       
  6099     {
       
  6100         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6101 
       
  6102         {
       
  6103             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6105             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6106             symbol_c *IN_type_symbol = NULL;
       
  6107             
       
  6108             /* Get the value from a foo(<param_value>) style call */
       
  6109             if (IN_param_value == NULL)
       
  6110               IN_param_value = function_call_param_iterator.next_nf();
       
  6111             if (IN_param_value != NULL) {
       
  6112               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6113               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6114             }
       
  6115             
       
  6116             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6117             {
       
  6118         
       
  6119                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6120                 
       
  6121                 if (IN_type_symbol == NULL)
       
  6122                   IN_type_symbol = last_type_symbol;
       
  6123                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6125                 function_type_prefix = return_type_symbol;
       
  6126                 function_type_suffix = IN_type_symbol;
       
  6127                 break;
       
  6128                 
       
  6129             }
       
  6130             
       
  6131             
       
  6132             ERROR;
       
  6133         }
       
  6134         
       
  6135     }/*function_udint_to_dint*/
       
  6136     break;
       
  6137 
       
  6138 /****
       
  6139  *UDINT_TO_DATE
       
  6140  */
       
  6141     case function_udint_to_date :
       
  6142     {
       
  6143         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6144 
       
  6145         {
       
  6146             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6147             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6148             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6149             symbol_c *IN_type_symbol = NULL;
       
  6150             
       
  6151             /* Get the value from a foo(<param_value>) style call */
       
  6152             if (IN_param_value == NULL)
       
  6153               IN_param_value = function_call_param_iterator.next_nf();
       
  6154             if (IN_param_value != NULL) {
       
  6155               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6156               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6157             }
       
  6158             
       
  6159             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6160             {
       
  6161         
       
  6162                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6163                 
       
  6164                 if (IN_type_symbol == NULL)
       
  6165                   IN_type_symbol = last_type_symbol;
       
  6166                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6167                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6168                 function_type_prefix = return_type_symbol;
       
  6169                 break;
       
  6170                 
       
  6171             }
       
  6172             
       
  6173             
       
  6174             ERROR;
       
  6175         }
       
  6176         
       
  6177     }/*function_udint_to_date*/
       
  6178     break;
       
  6179 
       
  6180 /****
       
  6181  *UDINT_TO_DWORD
       
  6182  */
       
  6183     case function_udint_to_dword :
       
  6184     {
       
  6185         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6186 
       
  6187         {
       
  6188             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6189             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6190             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6191             symbol_c *IN_type_symbol = NULL;
       
  6192             
       
  6193             /* Get the value from a foo(<param_value>) style call */
       
  6194             if (IN_param_value == NULL)
       
  6195               IN_param_value = function_call_param_iterator.next_nf();
       
  6196             if (IN_param_value != NULL) {
       
  6197               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6198               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6199             }
       
  6200             
       
  6201             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6202             {
       
  6203         
       
  6204                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6205                 
       
  6206                 if (IN_type_symbol == NULL)
       
  6207                   IN_type_symbol = last_type_symbol;
       
  6208                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6209                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6210                 function_type_prefix = return_type_symbol;
       
  6211                 function_type_suffix = IN_type_symbol;
       
  6212                 break;
       
  6213                 
       
  6214             }
       
  6215             
       
  6216             
       
  6217             ERROR;
       
  6218         }
       
  6219         
       
  6220     }/*function_udint_to_dword*/
       
  6221     break;
       
  6222 
       
  6223 /****
       
  6224  *UDINT_TO_DT
       
  6225  */
       
  6226     case function_udint_to_dt :
       
  6227     {
       
  6228         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6229 
       
  6230         {
       
  6231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6234             symbol_c *IN_type_symbol = NULL;
       
  6235             
       
  6236             /* Get the value from a foo(<param_value>) style call */
       
  6237             if (IN_param_value == NULL)
       
  6238               IN_param_value = function_call_param_iterator.next_nf();
       
  6239             if (IN_param_value != NULL) {
       
  6240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6241               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6242             }
       
  6243             
       
  6244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6245             {
       
  6246         
       
  6247                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6248                 
       
  6249                 if (IN_type_symbol == NULL)
       
  6250                   IN_type_symbol = last_type_symbol;
       
  6251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6252                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6253                 function_type_prefix = return_type_symbol;
       
  6254                 break;
       
  6255                 
       
  6256             }
       
  6257             
       
  6258             
       
  6259             ERROR;
       
  6260         }
       
  6261         
       
  6262     }/*function_udint_to_dt*/
       
  6263     break;
       
  6264 
       
  6265 /****
       
  6266  *UDINT_TO_TOD
       
  6267  */
       
  6268     case function_udint_to_tod :
       
  6269     {
       
  6270         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6271 
       
  6272         {
       
  6273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6275             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6276             symbol_c *IN_type_symbol = NULL;
       
  6277             
       
  6278             /* Get the value from a foo(<param_value>) style call */
       
  6279             if (IN_param_value == NULL)
       
  6280               IN_param_value = function_call_param_iterator.next_nf();
       
  6281             if (IN_param_value != NULL) {
       
  6282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6283               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6284             }
       
  6285             
       
  6286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6287             {
       
  6288         
       
  6289                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6290                 
       
  6291                 if (IN_type_symbol == NULL)
       
  6292                   IN_type_symbol = last_type_symbol;
       
  6293                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6294                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6295                 function_type_prefix = return_type_symbol;
       
  6296                 break;
       
  6297                 
       
  6298             }
       
  6299             
       
  6300             
       
  6301             ERROR;
       
  6302         }
       
  6303         
       
  6304     }/*function_udint_to_tod*/
       
  6305     break;
       
  6306 
       
  6307 /****
       
  6308  *UDINT_TO_WORD
       
  6309  */
       
  6310     case function_udint_to_word :
       
  6311     {
       
  6312         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6313 
       
  6314         {
       
  6315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6318             symbol_c *IN_type_symbol = NULL;
       
  6319             
       
  6320             /* Get the value from a foo(<param_value>) style call */
       
  6321             if (IN_param_value == NULL)
       
  6322               IN_param_value = function_call_param_iterator.next_nf();
       
  6323             if (IN_param_value != NULL) {
       
  6324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6326             }
       
  6327             
       
  6328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6329             {
       
  6330         
       
  6331                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6332                 
       
  6333                 if (IN_type_symbol == NULL)
       
  6334                   IN_type_symbol = last_type_symbol;
       
  6335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6336                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6337                 function_type_prefix = return_type_symbol;
       
  6338                 function_type_suffix = IN_type_symbol;
       
  6339                 break;
       
  6340                 
       
  6341             }
       
  6342             
       
  6343             
       
  6344             ERROR;
       
  6345         }
       
  6346         
       
  6347     }/*function_udint_to_word*/
       
  6348     break;
       
  6349 
       
  6350 /****
       
  6351  *UDINT_TO_STRING
       
  6352  */
       
  6353     case function_udint_to_string :
       
  6354     {
       
  6355         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6356 
       
  6357         {
       
  6358             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6360             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6361             symbol_c *IN_type_symbol = NULL;
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next_nf();
       
  6366             if (IN_param_value != NULL) {
       
  6367               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6368               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6369             }
       
  6370             
       
  6371             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6372             {
       
  6373         
       
  6374                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  6375                 
       
  6376                 if (IN_type_symbol == NULL)
       
  6377                   IN_type_symbol = last_type_symbol;
       
  6378                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6379                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6380                 function_type_prefix = return_type_symbol;
       
  6381                 break;
       
  6382                 
       
  6383             }
       
  6384             
       
  6385             
       
  6386             ERROR;
       
  6387         }
       
  6388         
       
  6389     }/*function_udint_to_string*/
       
  6390     break;
       
  6391 
       
  6392 /****
       
  6393  *UDINT_TO_LWORD
       
  6394  */
       
  6395     case function_udint_to_lword :
       
  6396     {
       
  6397         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6398 
       
  6399         {
       
  6400             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6401             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6402             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6403             symbol_c *IN_type_symbol = NULL;
       
  6404             
       
  6405             /* Get the value from a foo(<param_value>) style call */
       
  6406             if (IN_param_value == NULL)
       
  6407               IN_param_value = function_call_param_iterator.next_nf();
       
  6408             if (IN_param_value != NULL) {
       
  6409               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6410               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6411             }
       
  6412             
       
  6413             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6414             {
       
  6415         
       
  6416                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6417                 
       
  6418                 if (IN_type_symbol == NULL)
       
  6419                   IN_type_symbol = last_type_symbol;
       
  6420                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6421                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6422                 function_type_prefix = return_type_symbol;
       
  6423                 function_type_suffix = IN_type_symbol;
       
  6424                 break;
       
  6425                 
       
  6426             }
       
  6427             
       
  6428             
       
  6429             ERROR;
       
  6430         }
       
  6431         
       
  6432     }/*function_udint_to_lword*/
       
  6433     break;
       
  6434 
       
  6435 /****
       
  6436  *UDINT_TO_UINT
       
  6437  */
       
  6438     case function_udint_to_uint :
       
  6439     {
       
  6440         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6441 
       
  6442         {
       
  6443             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6445             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6446             symbol_c *IN_type_symbol = NULL;
       
  6447             
       
  6448             /* Get the value from a foo(<param_value>) style call */
       
  6449             if (IN_param_value == NULL)
       
  6450               IN_param_value = function_call_param_iterator.next_nf();
       
  6451             if (IN_param_value != NULL) {
       
  6452               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6453               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6454             }
       
  6455             
       
  6456             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6457             {
       
  6458         
       
  6459                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6460                 
       
  6461                 if (IN_type_symbol == NULL)
       
  6462                   IN_type_symbol = last_type_symbol;
       
  6463                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6464                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6465                 function_type_prefix = return_type_symbol;
       
  6466                 function_type_suffix = IN_type_symbol;
       
  6467                 break;
       
  6468                 
       
  6469             }
       
  6470             
       
  6471             
       
  6472             ERROR;
       
  6473         }
       
  6474         
       
  6475     }/*function_udint_to_uint*/
       
  6476     break;
       
  6477 
       
  6478 /****
       
  6479  *UDINT_TO_LREAL
       
  6480  */
       
  6481     case function_udint_to_lreal :
       
  6482     {
       
  6483         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6484 
       
  6485         {
       
  6486             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6488             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6489             symbol_c *IN_type_symbol = NULL;
       
  6490             
       
  6491             /* Get the value from a foo(<param_value>) style call */
       
  6492             if (IN_param_value == NULL)
       
  6493               IN_param_value = function_call_param_iterator.next_nf();
       
  6494             if (IN_param_value != NULL) {
       
  6495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6497             }
       
  6498             
       
  6499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6500             {
       
  6501         
       
  6502                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6503                 
       
  6504                 if (IN_type_symbol == NULL)
       
  6505                   IN_type_symbol = last_type_symbol;
       
  6506                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6507                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6508                 function_type_prefix = return_type_symbol;
       
  6509                 function_type_suffix = IN_type_symbol;
       
  6510                 break;
       
  6511                 
       
  6512             }
       
  6513             
       
  6514             
       
  6515             ERROR;
       
  6516         }
       
  6517         
       
  6518     }/*function_udint_to_lreal*/
       
  6519     break;
       
  6520 
       
  6521 /****
       
  6522  *UDINT_TO_BYTE
       
  6523  */
       
  6524     case function_udint_to_byte :
       
  6525     {
       
  6526         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6527 
       
  6528         {
       
  6529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6532             symbol_c *IN_type_symbol = NULL;
       
  6533             
       
  6534             /* Get the value from a foo(<param_value>) style call */
       
  6535             if (IN_param_value == NULL)
       
  6536               IN_param_value = function_call_param_iterator.next_nf();
       
  6537             if (IN_param_value != NULL) {
       
  6538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6540             }
       
  6541             
       
  6542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6543             {
       
  6544         
       
  6545                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6546                 
       
  6547                 if (IN_type_symbol == NULL)
       
  6548                   IN_type_symbol = last_type_symbol;
       
  6549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6550                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6551                 function_type_prefix = return_type_symbol;
       
  6552                 function_type_suffix = IN_type_symbol;
       
  6553                 break;
       
  6554                 
       
  6555             }
       
  6556             
       
  6557             
       
  6558             ERROR;
       
  6559         }
       
  6560         
       
  6561     }/*function_udint_to_byte*/
       
  6562     break;
       
  6563 
       
  6564 /****
       
  6565  *UDINT_TO_USINT
       
  6566  */
       
  6567     case function_udint_to_usint :
       
  6568     {
       
  6569         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6570 
       
  6571         {
       
  6572             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6574             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6575             symbol_c *IN_type_symbol = NULL;
       
  6576             
       
  6577             /* Get the value from a foo(<param_value>) style call */
       
  6578             if (IN_param_value == NULL)
       
  6579               IN_param_value = function_call_param_iterator.next_nf();
       
  6580             if (IN_param_value != NULL) {
       
  6581               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6582               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6583             }
       
  6584             
       
  6585             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6586             {
       
  6587         
       
  6588                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6589                 
       
  6590                 if (IN_type_symbol == NULL)
       
  6591                   IN_type_symbol = last_type_symbol;
       
  6592                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6593                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6594                 function_type_prefix = return_type_symbol;
       
  6595                 function_type_suffix = IN_type_symbol;
       
  6596                 break;
       
  6597                 
       
  6598             }
       
  6599             
       
  6600             
       
  6601             ERROR;
       
  6602         }
       
  6603         
       
  6604     }/*function_udint_to_usint*/
       
  6605     break;
       
  6606 
       
  6607 /****
       
  6608  *UDINT_TO_ULINT
       
  6609  */
       
  6610     case function_udint_to_ulint :
       
  6611     {
       
  6612         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6613 
       
  6614         {
       
  6615             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6617             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6618             symbol_c *IN_type_symbol = NULL;
       
  6619             
       
  6620             /* Get the value from a foo(<param_value>) style call */
       
  6621             if (IN_param_value == NULL)
       
  6622               IN_param_value = function_call_param_iterator.next_nf();
       
  6623             if (IN_param_value != NULL) {
       
  6624               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6625               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6626             }
       
  6627             
       
  6628             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6629             {
       
  6630         
       
  6631                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6632                 
       
  6633                 if (IN_type_symbol == NULL)
       
  6634                   IN_type_symbol = last_type_symbol;
       
  6635                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6636                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6637                 function_type_prefix = return_type_symbol;
       
  6638                 function_type_suffix = IN_type_symbol;
       
  6639                 break;
       
  6640                 
       
  6641             }
       
  6642             
       
  6643             
       
  6644             ERROR;
       
  6645         }
       
  6646         
       
  6647     }/*function_udint_to_ulint*/
       
  6648     break;
       
  6649 
       
  6650 /****
       
  6651  *UDINT_TO_BOOL
       
  6652  */
       
  6653     case function_udint_to_bool :
       
  6654     {
       
  6655         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6656 
       
  6657         {
       
  6658             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6660             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6661             symbol_c *IN_type_symbol = NULL;
       
  6662             
       
  6663             /* Get the value from a foo(<param_value>) style call */
       
  6664             if (IN_param_value == NULL)
       
  6665               IN_param_value = function_call_param_iterator.next_nf();
       
  6666             if (IN_param_value != NULL) {
       
  6667               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6668               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6669             }
       
  6670             
       
  6671             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6672             {
       
  6673         
       
  6674                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6675                 
       
  6676                 if (IN_type_symbol == NULL)
       
  6677                   IN_type_symbol = last_type_symbol;
       
  6678                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6679                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6680                 function_type_prefix = return_type_symbol;
       
  6681                 function_type_suffix = IN_type_symbol;
       
  6682                 break;
       
  6683                 
       
  6684             }
       
  6685             
       
  6686             
       
  6687             ERROR;
       
  6688         }
       
  6689         
       
  6690     }/*function_udint_to_bool*/
       
  6691     break;
       
  6692 
       
  6693 /****
       
  6694  *UDINT_TO_TIME
       
  6695  */
       
  6696     case function_udint_to_time :
       
  6697     {
       
  6698         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6699 
       
  6700         {
       
  6701             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6702             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6703             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6704             symbol_c *IN_type_symbol = NULL;
       
  6705             
       
  6706             /* Get the value from a foo(<param_value>) style call */
       
  6707             if (IN_param_value == NULL)
       
  6708               IN_param_value = function_call_param_iterator.next_nf();
       
  6709             if (IN_param_value != NULL) {
       
  6710               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6711               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6712             }
       
  6713             
       
  6714             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6715             {
       
  6716         
       
  6717                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6718                 
       
  6719                 if (IN_type_symbol == NULL)
       
  6720                   IN_type_symbol = last_type_symbol;
       
  6721                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6722                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6723                 function_type_prefix = return_type_symbol;
       
  6724                 break;
       
  6725                 
       
  6726             }
       
  6727             
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_udint_to_time*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *UDINT_TO_INT
       
  6737  */
       
  6738     case function_udint_to_int :
       
  6739     {
       
  6740         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
       
  6741 
       
  6742         {
       
  6743             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6745             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6746             symbol_c *IN_type_symbol = NULL;
       
  6747             
       
  6748             /* Get the value from a foo(<param_value>) style call */
       
  6749             if (IN_param_value == NULL)
       
  6750               IN_param_value = function_call_param_iterator.next_nf();
       
  6751             if (IN_param_value != NULL) {
       
  6752               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6753               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6754             }
       
  6755             
       
  6756             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6757             {
       
  6758         
       
  6759                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6760                 
       
  6761                 if (IN_type_symbol == NULL)
       
  6762                   IN_type_symbol = last_type_symbol;
       
  6763                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6764                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6765                 function_type_prefix = return_type_symbol;
       
  6766                 function_type_suffix = IN_type_symbol;
       
  6767                 break;
       
  6768                 
       
  6769             }
       
  6770             
       
  6771             
       
  6772             ERROR;
       
  6773         }
       
  6774         
       
  6775     }/*function_udint_to_int*/
       
  6776     break;
       
  6777 
       
  6778 /****
       
  6779  *WORD_TO_REAL
       
  6780  */
       
  6781     case function_word_to_real :
       
  6782     {
       
  6783         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6784 
       
  6785         {
       
  6786             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6787             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6788             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6789             symbol_c *IN_type_symbol = NULL;
       
  6790             
       
  6791             /* Get the value from a foo(<param_value>) style call */
       
  6792             if (IN_param_value == NULL)
       
  6793               IN_param_value = function_call_param_iterator.next_nf();
       
  6794             if (IN_param_value != NULL) {
       
  6795               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6796               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6797             }
       
  6798             
       
  6799             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6800             {
       
  6801         
       
  6802                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6803                 
       
  6804                 if (IN_type_symbol == NULL)
       
  6805                   IN_type_symbol = last_type_symbol;
       
  6806                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6807                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6808                 function_type_prefix = return_type_symbol;
       
  6809                 function_type_suffix = IN_type_symbol;
       
  6810                 break;
       
  6811                 
       
  6812             }
       
  6813             
       
  6814             
       
  6815             ERROR;
       
  6816         }
       
  6817         
       
  6818     }/*function_word_to_real*/
       
  6819     break;
       
  6820 
       
  6821 /****
       
  6822  *WORD_TO_SINT
       
  6823  */
       
  6824     case function_word_to_sint :
       
  6825     {
       
  6826         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6827 
       
  6828         {
       
  6829             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6830             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6831             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6832             symbol_c *IN_type_symbol = NULL;
       
  6833             
       
  6834             /* Get the value from a foo(<param_value>) style call */
       
  6835             if (IN_param_value == NULL)
       
  6836               IN_param_value = function_call_param_iterator.next_nf();
       
  6837             if (IN_param_value != NULL) {
       
  6838               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6839               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6840             }
       
  6841             
       
  6842             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6843             {
       
  6844         
       
  6845                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6846                 
       
  6847                 if (IN_type_symbol == NULL)
       
  6848                   IN_type_symbol = last_type_symbol;
       
  6849                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6850                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6851                 function_type_prefix = return_type_symbol;
       
  6852                 function_type_suffix = IN_type_symbol;
       
  6853                 break;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             
       
  6858             ERROR;
       
  6859         }
       
  6860         
       
  6861     }/*function_word_to_sint*/
       
  6862     break;
       
  6863 
       
  6864 /****
       
  6865  *WORD_TO_LINT
       
  6866  */
       
  6867     case function_word_to_lint :
       
  6868     {
       
  6869         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6870 
       
  6871         {
       
  6872             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6873             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6874             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6875             symbol_c *IN_type_symbol = NULL;
       
  6876             
       
  6877             /* Get the value from a foo(<param_value>) style call */
       
  6878             if (IN_param_value == NULL)
       
  6879               IN_param_value = function_call_param_iterator.next_nf();
       
  6880             if (IN_param_value != NULL) {
       
  6881               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6882               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6883             }
       
  6884             
       
  6885             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6886             {
       
  6887         
       
  6888                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6889                 
       
  6890                 if (IN_type_symbol == NULL)
       
  6891                   IN_type_symbol = last_type_symbol;
       
  6892                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6893                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6894                 function_type_prefix = return_type_symbol;
       
  6895                 function_type_suffix = IN_type_symbol;
       
  6896                 break;
       
  6897                 
       
  6898             }
       
  6899             
       
  6900             
       
  6901             ERROR;
       
  6902         }
       
  6903         
       
  6904     }/*function_word_to_lint*/
       
  6905     break;
       
  6906 
       
  6907 /****
       
  6908  *WORD_TO_DINT
       
  6909  */
       
  6910     case function_word_to_dint :
       
  6911     {
       
  6912         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6913 
       
  6914         {
       
  6915             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6916             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6917             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6918             symbol_c *IN_type_symbol = NULL;
       
  6919             
       
  6920             /* Get the value from a foo(<param_value>) style call */
       
  6921             if (IN_param_value == NULL)
       
  6922               IN_param_value = function_call_param_iterator.next_nf();
       
  6923             if (IN_param_value != NULL) {
       
  6924               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6925               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6926             }
       
  6927             
       
  6928             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6929             {
       
  6930         
       
  6931                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6932                 
       
  6933                 if (IN_type_symbol == NULL)
       
  6934                   IN_type_symbol = last_type_symbol;
       
  6935                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6936                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6937                 function_type_prefix = return_type_symbol;
       
  6938                 function_type_suffix = IN_type_symbol;
       
  6939                 break;
       
  6940                 
       
  6941             }
       
  6942             
       
  6943             
       
  6944             ERROR;
       
  6945         }
       
  6946         
       
  6947     }/*function_word_to_dint*/
       
  6948     break;
       
  6949 
       
  6950 /****
       
  6951  *WORD_TO_DATE
       
  6952  */
       
  6953     case function_word_to_date :
       
  6954     {
       
  6955         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6956 
       
  6957         {
       
  6958             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6960             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6961             symbol_c *IN_type_symbol = NULL;
       
  6962             
       
  6963             /* Get the value from a foo(<param_value>) style call */
       
  6964             if (IN_param_value == NULL)
       
  6965               IN_param_value = function_call_param_iterator.next_nf();
       
  6966             if (IN_param_value != NULL) {
       
  6967               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6968               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6969             }
       
  6970             
       
  6971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6972             {
       
  6973         
       
  6974                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6975                 
       
  6976                 if (IN_type_symbol == NULL)
       
  6977                   IN_type_symbol = last_type_symbol;
       
  6978                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6979                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6980                 function_type_prefix = return_type_symbol;
       
  6981                 break;
       
  6982                 
       
  6983             }
       
  6984             
       
  6985             
       
  6986             ERROR;
       
  6987         }
       
  6988         
       
  6989     }/*function_word_to_date*/
       
  6990     break;
       
  6991 
       
  6992 /****
       
  6993  *WORD_TO_DWORD
       
  6994  */
       
  6995     case function_word_to_dword :
       
  6996     {
       
  6997         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  6998 
       
  6999         {
       
  7000             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7001             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7002             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7003             symbol_c *IN_type_symbol = NULL;
       
  7004             
       
  7005             /* Get the value from a foo(<param_value>) style call */
       
  7006             if (IN_param_value == NULL)
       
  7007               IN_param_value = function_call_param_iterator.next_nf();
       
  7008             if (IN_param_value != NULL) {
       
  7009               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7010               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7011             }
       
  7012             
       
  7013             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7014             {
       
  7015         
       
  7016                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7017                 
       
  7018                 if (IN_type_symbol == NULL)
       
  7019                   IN_type_symbol = last_type_symbol;
       
  7020                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7021                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7022                 function_type_prefix = return_type_symbol;
       
  7023                 function_type_suffix = IN_type_symbol;
       
  7024                 break;
       
  7025                 
       
  7026             }
       
  7027             
       
  7028             
       
  7029             ERROR;
       
  7030         }
       
  7031         
       
  7032     }/*function_word_to_dword*/
       
  7033     break;
       
  7034 
       
  7035 /****
       
  7036  *WORD_TO_DT
       
  7037  */
       
  7038     case function_word_to_dt :
       
  7039     {
       
  7040         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7041 
       
  7042         {
       
  7043             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7044             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7045             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7046             symbol_c *IN_type_symbol = NULL;
       
  7047             
       
  7048             /* Get the value from a foo(<param_value>) style call */
       
  7049             if (IN_param_value == NULL)
       
  7050               IN_param_value = function_call_param_iterator.next_nf();
       
  7051             if (IN_param_value != NULL) {
       
  7052               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7053               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7054             }
       
  7055             
       
  7056             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7057             {
       
  7058         
       
  7059                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7060                 
       
  7061                 if (IN_type_symbol == NULL)
       
  7062                   IN_type_symbol = last_type_symbol;
       
  7063                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7064                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7065                 function_type_prefix = return_type_symbol;
       
  7066                 break;
       
  7067                 
       
  7068             }
       
  7069             
       
  7070             
       
  7071             ERROR;
       
  7072         }
       
  7073         
       
  7074     }/*function_word_to_dt*/
       
  7075     break;
       
  7076 
       
  7077 /****
       
  7078  *WORD_TO_TOD
       
  7079  */
       
  7080     case function_word_to_tod :
       
  7081     {
       
  7082         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7083 
       
  7084         {
       
  7085             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7086             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7087             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7088             symbol_c *IN_type_symbol = NULL;
       
  7089             
       
  7090             /* Get the value from a foo(<param_value>) style call */
       
  7091             if (IN_param_value == NULL)
       
  7092               IN_param_value = function_call_param_iterator.next_nf();
       
  7093             if (IN_param_value != NULL) {
       
  7094               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7095               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7096             }
       
  7097             
       
  7098             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7099             {
       
  7100         
       
  7101                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7102                 
       
  7103                 if (IN_type_symbol == NULL)
       
  7104                   IN_type_symbol = last_type_symbol;
       
  7105                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7106                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7107                 function_type_prefix = return_type_symbol;
       
  7108                 break;
       
  7109                 
       
  7110             }
       
  7111             
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_word_to_tod*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *WORD_TO_UDINT
       
  7121  */
       
  7122     case function_word_to_udint :
       
  7123     {
       
  7124         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7125 
       
  7126         {
       
  7127             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7129             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7130             symbol_c *IN_type_symbol = NULL;
       
  7131             
       
  7132             /* Get the value from a foo(<param_value>) style call */
       
  7133             if (IN_param_value == NULL)
       
  7134               IN_param_value = function_call_param_iterator.next_nf();
       
  7135             if (IN_param_value != NULL) {
       
  7136               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7137               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7138             }
       
  7139             
       
  7140             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7141             {
       
  7142         
       
  7143                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7144                 
       
  7145                 if (IN_type_symbol == NULL)
       
  7146                   IN_type_symbol = last_type_symbol;
       
  7147                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7148                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7149                 function_type_prefix = return_type_symbol;
       
  7150                 function_type_suffix = IN_type_symbol;
       
  7151                 break;
       
  7152                 
       
  7153             }
       
  7154             
       
  7155             
       
  7156             ERROR;
       
  7157         }
       
  7158         
       
  7159     }/*function_word_to_udint*/
       
  7160     break;
       
  7161 
       
  7162 /****
       
  7163  *WORD_TO_STRING
       
  7164  */
       
  7165     case function_word_to_string :
       
  7166     {
       
  7167         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7168 
       
  7169         {
       
  7170             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7172             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7173             symbol_c *IN_type_symbol = NULL;
       
  7174             
       
  7175             /* Get the value from a foo(<param_value>) style call */
       
  7176             if (IN_param_value == NULL)
       
  7177               IN_param_value = function_call_param_iterator.next_nf();
       
  7178             if (IN_param_value != NULL) {
       
  7179               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7180               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7181             }
       
  7182             
       
  7183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7184             {
       
  7185         
       
  7186                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  7187                 
       
  7188                 if (IN_type_symbol == NULL)
       
  7189                   IN_type_symbol = last_type_symbol;
       
  7190                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7191                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7192                 function_type_prefix = return_type_symbol;
       
  7193                 break;
       
  7194                 
       
  7195             }
       
  7196             
       
  7197             
       
  7198             ERROR;
       
  7199         }
       
  7200         
       
  7201     }/*function_word_to_string*/
       
  7202     break;
       
  7203 
       
  7204 /****
       
  7205  *WORD_TO_LWORD
       
  7206  */
       
  7207     case function_word_to_lword :
       
  7208     {
       
  7209         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7210 
       
  7211         {
       
  7212             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7213             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7214             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7215             symbol_c *IN_type_symbol = NULL;
       
  7216             
       
  7217             /* Get the value from a foo(<param_value>) style call */
       
  7218             if (IN_param_value == NULL)
       
  7219               IN_param_value = function_call_param_iterator.next_nf();
       
  7220             if (IN_param_value != NULL) {
       
  7221               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7222               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7223             }
       
  7224             
       
  7225             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7226             {
       
  7227         
       
  7228                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7229                 
       
  7230                 if (IN_type_symbol == NULL)
       
  7231                   IN_type_symbol = last_type_symbol;
       
  7232                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7233                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7234                 function_type_prefix = return_type_symbol;
       
  7235                 function_type_suffix = IN_type_symbol;
       
  7236                 break;
       
  7237                 
       
  7238             }
       
  7239             
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_word_to_lword*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *WORD_TO_UINT
       
  7249  */
       
  7250     case function_word_to_uint :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7253 
       
  7254         {
       
  7255             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7258             symbol_c *IN_type_symbol = NULL;
       
  7259             
       
  7260             /* Get the value from a foo(<param_value>) style call */
       
  7261             if (IN_param_value == NULL)
       
  7262               IN_param_value = function_call_param_iterator.next_nf();
       
  7263             if (IN_param_value != NULL) {
       
  7264               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7265               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7266             }
       
  7267             
       
  7268             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7269             {
       
  7270         
       
  7271                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7272                 
       
  7273                 if (IN_type_symbol == NULL)
       
  7274                   IN_type_symbol = last_type_symbol;
       
  7275                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7276                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7277                 function_type_prefix = return_type_symbol;
       
  7278                 function_type_suffix = IN_type_symbol;
       
  7279                 break;
       
  7280                 
       
  7281             }
       
  7282             
       
  7283             
       
  7284             ERROR;
       
  7285         }
       
  7286         
       
  7287     }/*function_word_to_uint*/
       
  7288     break;
       
  7289 
       
  7290 /****
       
  7291  *WORD_TO_LREAL
       
  7292  */
       
  7293     case function_word_to_lreal :
       
  7294     {
       
  7295         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7296 
       
  7297         {
       
  7298             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7300             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7301             symbol_c *IN_type_symbol = NULL;
       
  7302             
       
  7303             /* Get the value from a foo(<param_value>) style call */
       
  7304             if (IN_param_value == NULL)
       
  7305               IN_param_value = function_call_param_iterator.next_nf();
       
  7306             if (IN_param_value != NULL) {
       
  7307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7309             }
       
  7310             
       
  7311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7312             {
       
  7313         
       
  7314                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7315                 
       
  7316                 if (IN_type_symbol == NULL)
       
  7317                   IN_type_symbol = last_type_symbol;
       
  7318                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7319                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7320                 function_type_prefix = return_type_symbol;
       
  7321                 function_type_suffix = IN_type_symbol;
       
  7322                 break;
       
  7323                 
       
  7324             }
       
  7325             
       
  7326             
       
  7327             ERROR;
       
  7328         }
       
  7329         
       
  7330     }/*function_word_to_lreal*/
       
  7331     break;
       
  7332 
       
  7333 /****
       
  7334  *WORD_TO_BYTE
       
  7335  */
       
  7336     case function_word_to_byte :
       
  7337     {
       
  7338         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7339 
       
  7340         {
       
  7341             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7343             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7344             symbol_c *IN_type_symbol = NULL;
       
  7345             
       
  7346             /* Get the value from a foo(<param_value>) style call */
       
  7347             if (IN_param_value == NULL)
       
  7348               IN_param_value = function_call_param_iterator.next_nf();
       
  7349             if (IN_param_value != NULL) {
       
  7350               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7351               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7352             }
       
  7353             
       
  7354             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7355             {
       
  7356         
       
  7357                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7358                 
       
  7359                 if (IN_type_symbol == NULL)
       
  7360                   IN_type_symbol = last_type_symbol;
       
  7361                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7362                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7363                 function_type_prefix = return_type_symbol;
       
  7364                 function_type_suffix = IN_type_symbol;
       
  7365                 break;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             
       
  7370             ERROR;
       
  7371         }
       
  7372         
       
  7373     }/*function_word_to_byte*/
       
  7374     break;
       
  7375 
       
  7376 /****
       
  7377  *WORD_TO_USINT
       
  7378  */
       
  7379     case function_word_to_usint :
       
  7380     {
       
  7381         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7382 
       
  7383         {
       
  7384             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7386             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7387             symbol_c *IN_type_symbol = NULL;
       
  7388             
       
  7389             /* Get the value from a foo(<param_value>) style call */
       
  7390             if (IN_param_value == NULL)
       
  7391               IN_param_value = function_call_param_iterator.next_nf();
       
  7392             if (IN_param_value != NULL) {
       
  7393               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7394               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7395             }
       
  7396             
       
  7397             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7398             {
       
  7399         
       
  7400                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7401                 
       
  7402                 if (IN_type_symbol == NULL)
       
  7403                   IN_type_symbol = last_type_symbol;
       
  7404                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7405                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7406                 function_type_prefix = return_type_symbol;
       
  7407                 function_type_suffix = IN_type_symbol;
       
  7408                 break;
       
  7409                 
       
  7410             }
       
  7411             
       
  7412             
       
  7413             ERROR;
       
  7414         }
       
  7415         
       
  7416     }/*function_word_to_usint*/
       
  7417     break;
       
  7418 
       
  7419 /****
       
  7420  *WORD_TO_ULINT
       
  7421  */
       
  7422     case function_word_to_ulint :
       
  7423     {
       
  7424         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7425 
       
  7426         {
       
  7427             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7429             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7430             symbol_c *IN_type_symbol = NULL;
       
  7431             
       
  7432             /* Get the value from a foo(<param_value>) style call */
       
  7433             if (IN_param_value == NULL)
       
  7434               IN_param_value = function_call_param_iterator.next_nf();
       
  7435             if (IN_param_value != NULL) {
       
  7436               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7437               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7438             }
       
  7439             
       
  7440             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7441             {
       
  7442         
       
  7443                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7444                 
       
  7445                 if (IN_type_symbol == NULL)
       
  7446                   IN_type_symbol = last_type_symbol;
       
  7447                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7448                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7449                 function_type_prefix = return_type_symbol;
       
  7450                 function_type_suffix = IN_type_symbol;
       
  7451                 break;
       
  7452                 
       
  7453             }
       
  7454             
       
  7455             
       
  7456             ERROR;
       
  7457         }
       
  7458         
       
  7459     }/*function_word_to_ulint*/
       
  7460     break;
       
  7461 
       
  7462 /****
       
  7463  *WORD_TO_BOOL
       
  7464  */
       
  7465     case function_word_to_bool :
       
  7466     {
       
  7467         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7468 
       
  7469         {
       
  7470             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7472             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7473             symbol_c *IN_type_symbol = NULL;
       
  7474             
       
  7475             /* Get the value from a foo(<param_value>) style call */
       
  7476             if (IN_param_value == NULL)
       
  7477               IN_param_value = function_call_param_iterator.next_nf();
       
  7478             if (IN_param_value != NULL) {
       
  7479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7481             }
       
  7482             
       
  7483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7484             {
       
  7485         
       
  7486                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7487                 
       
  7488                 if (IN_type_symbol == NULL)
       
  7489                   IN_type_symbol = last_type_symbol;
       
  7490                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7491                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7492                 function_type_prefix = return_type_symbol;
       
  7493                 function_type_suffix = IN_type_symbol;
       
  7494                 break;
       
  7495                 
       
  7496             }
       
  7497             
       
  7498             
       
  7499             ERROR;
       
  7500         }
       
  7501         
       
  7502     }/*function_word_to_bool*/
       
  7503     break;
       
  7504 
       
  7505 /****
       
  7506  *WORD_TO_TIME
       
  7507  */
       
  7508     case function_word_to_time :
       
  7509     {
       
  7510         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7511 
       
  7512         {
       
  7513             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7515             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7516             symbol_c *IN_type_symbol = NULL;
       
  7517             
       
  7518             /* Get the value from a foo(<param_value>) style call */
       
  7519             if (IN_param_value == NULL)
       
  7520               IN_param_value = function_call_param_iterator.next_nf();
       
  7521             if (IN_param_value != NULL) {
       
  7522               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7523               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7524             }
       
  7525             
       
  7526             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7527             {
       
  7528         
       
  7529                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7530                 
       
  7531                 if (IN_type_symbol == NULL)
       
  7532                   IN_type_symbol = last_type_symbol;
       
  7533                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7534                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7535                 function_type_prefix = return_type_symbol;
       
  7536                 break;
       
  7537                 
       
  7538             }
       
  7539             
       
  7540             
       
  7541             ERROR;
       
  7542         }
       
  7543         
       
  7544     }/*function_word_to_time*/
       
  7545     break;
       
  7546 
       
  7547 /****
       
  7548  *WORD_TO_INT
       
  7549  */
       
  7550     case function_word_to_int :
       
  7551     {
       
  7552         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
       
  7553 
       
  7554         {
       
  7555             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7556             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7557             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7558             symbol_c *IN_type_symbol = NULL;
       
  7559             
       
  7560             /* Get the value from a foo(<param_value>) style call */
       
  7561             if (IN_param_value == NULL)
       
  7562               IN_param_value = function_call_param_iterator.next_nf();
       
  7563             if (IN_param_value != NULL) {
       
  7564               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7565               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7566             }
       
  7567             
       
  7568             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7569             {
       
  7570         
       
  7571                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7572                 
       
  7573                 if (IN_type_symbol == NULL)
       
  7574                   IN_type_symbol = last_type_symbol;
       
  7575                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7576                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7577                 function_type_prefix = return_type_symbol;
       
  7578                 function_type_suffix = IN_type_symbol;
       
  7579                 break;
       
  7580                 
       
  7581             }
       
  7582             
       
  7583             
       
  7584             ERROR;
       
  7585         }
       
  7586         
       
  7587     }/*function_word_to_int*/
       
  7588     break;
       
  7589 
       
  7590 /****
       
  7591  *STRING_TO_REAL
       
  7592  */
       
  7593     case function_string_to_real :
       
  7594     {
       
  7595         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7596 
       
  7597         {
       
  7598             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7599             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7600             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7601             symbol_c *IN_type_symbol = NULL;
       
  7602             
       
  7603             /* Get the value from a foo(<param_value>) style call */
       
  7604             if (IN_param_value == NULL)
       
  7605               IN_param_value = function_call_param_iterator.next_nf();
       
  7606             if (IN_param_value != NULL) {
       
  7607               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7608               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7609             }
       
  7610             
       
  7611             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7612             {
       
  7613         
       
  7614                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  7615                 
       
  7616                 if (IN_type_symbol == NULL)
       
  7617                   IN_type_symbol = last_type_symbol;
       
  7618                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7619                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7620                 function_type_prefix = return_type_symbol;
       
  7621                 break;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             
       
  7626             ERROR;
       
  7627         }
       
  7628         
       
  7629     }/*function_string_to_real*/
       
  7630     break;
       
  7631 
       
  7632 /****
       
  7633  *STRING_TO_SINT
       
  7634  */
       
  7635     case function_string_to_sint :
       
  7636     {
       
  7637         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7638 
       
  7639         {
       
  7640             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7641             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7642             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7643             symbol_c *IN_type_symbol = NULL;
       
  7644             
       
  7645             /* Get the value from a foo(<param_value>) style call */
       
  7646             if (IN_param_value == NULL)
       
  7647               IN_param_value = function_call_param_iterator.next_nf();
       
  7648             if (IN_param_value != NULL) {
       
  7649               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7650               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7651             }
       
  7652             
       
  7653             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7654             {
       
  7655         
       
  7656                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7657                 
       
  7658                 if (IN_type_symbol == NULL)
       
  7659                   IN_type_symbol = last_type_symbol;
       
  7660                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7661                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7662                 function_type_prefix = return_type_symbol;
       
  7663                 break;
       
  7664                 
       
  7665             }
       
  7666             
       
  7667             
       
  7668             ERROR;
       
  7669         }
       
  7670         
       
  7671     }/*function_string_to_sint*/
       
  7672     break;
       
  7673 
       
  7674 /****
       
  7675  *STRING_TO_LINT
       
  7676  */
       
  7677     case function_string_to_lint :
       
  7678     {
       
  7679         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7680 
       
  7681         {
       
  7682             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7684             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7685             symbol_c *IN_type_symbol = NULL;
       
  7686             
       
  7687             /* Get the value from a foo(<param_value>) style call */
       
  7688             if (IN_param_value == NULL)
       
  7689               IN_param_value = function_call_param_iterator.next_nf();
       
  7690             if (IN_param_value != NULL) {
       
  7691               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7692               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7693             }
       
  7694             
       
  7695             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7696             {
       
  7697         
       
  7698                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7699                 
       
  7700                 if (IN_type_symbol == NULL)
       
  7701                   IN_type_symbol = last_type_symbol;
       
  7702                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7703                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7704                 function_type_prefix = return_type_symbol;
       
  7705                 break;
       
  7706                 
       
  7707             }
       
  7708             
       
  7709             
       
  7710             ERROR;
       
  7711         }
       
  7712         
       
  7713     }/*function_string_to_lint*/
       
  7714     break;
       
  7715 
       
  7716 /****
       
  7717  *STRING_TO_DINT
       
  7718  */
       
  7719     case function_string_to_dint :
       
  7720     {
       
  7721         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7722 
       
  7723         {
       
  7724             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7725             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7726             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7727             symbol_c *IN_type_symbol = NULL;
       
  7728             
       
  7729             /* Get the value from a foo(<param_value>) style call */
       
  7730             if (IN_param_value == NULL)
       
  7731               IN_param_value = function_call_param_iterator.next_nf();
       
  7732             if (IN_param_value != NULL) {
       
  7733               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7734               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7735             }
       
  7736             
       
  7737             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7738             {
       
  7739         
       
  7740                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7741                 
       
  7742                 if (IN_type_symbol == NULL)
       
  7743                   IN_type_symbol = last_type_symbol;
       
  7744                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7745                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7746                 function_type_prefix = return_type_symbol;
       
  7747                 break;
       
  7748                 
       
  7749             }
       
  7750             
       
  7751             
       
  7752             ERROR;
       
  7753         }
       
  7754         
       
  7755     }/*function_string_to_dint*/
       
  7756     break;
       
  7757 
       
  7758 /****
       
  7759  *STRING_TO_DATE
       
  7760  */
       
  7761     case function_string_to_date :
       
  7762     {
       
  7763         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7764 
       
  7765         {
       
  7766             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7767             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7768             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7769             symbol_c *IN_type_symbol = NULL;
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next_nf();
       
  7774             if (IN_param_value != NULL) {
       
  7775               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7776               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7777             }
       
  7778             
       
  7779             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7780             {
       
  7781         
       
  7782                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7783                 
       
  7784                 if (IN_type_symbol == NULL)
       
  7785                   IN_type_symbol = last_type_symbol;
       
  7786                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7787                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7788                 function_type_prefix = return_type_symbol;
       
  7789                 break;
       
  7790                 
       
  7791             }
       
  7792             
       
  7793             
       
  7794             ERROR;
       
  7795         }
       
  7796         
       
  7797     }/*function_string_to_date*/
       
  7798     break;
       
  7799 
       
  7800 /****
       
  7801  *STRING_TO_DWORD
       
  7802  */
       
  7803     case function_string_to_dword :
       
  7804     {
       
  7805         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7806 
       
  7807         {
       
  7808             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7809             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7810             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7811             symbol_c *IN_type_symbol = NULL;
       
  7812             
       
  7813             /* Get the value from a foo(<param_value>) style call */
       
  7814             if (IN_param_value == NULL)
       
  7815               IN_param_value = function_call_param_iterator.next_nf();
       
  7816             if (IN_param_value != NULL) {
       
  7817               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7818               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7819             }
       
  7820             
       
  7821             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7822             {
       
  7823         
       
  7824                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  7825                 
       
  7826                 if (IN_type_symbol == NULL)
       
  7827                   IN_type_symbol = last_type_symbol;
       
  7828                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7829                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7830                 function_type_prefix = return_type_symbol;
       
  7831                 break;
       
  7832                 
       
  7833             }
       
  7834             
       
  7835             
       
  7836             ERROR;
       
  7837         }
       
  7838         
       
  7839     }/*function_string_to_dword*/
       
  7840     break;
       
  7841 
       
  7842 /****
       
  7843  *STRING_TO_DT
       
  7844  */
       
  7845     case function_string_to_dt :
       
  7846     {
       
  7847         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7848 
       
  7849         {
       
  7850             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7852             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7853             symbol_c *IN_type_symbol = NULL;
       
  7854             
       
  7855             /* Get the value from a foo(<param_value>) style call */
       
  7856             if (IN_param_value == NULL)
       
  7857               IN_param_value = function_call_param_iterator.next_nf();
       
  7858             if (IN_param_value != NULL) {
       
  7859               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7860               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7861             }
       
  7862             
       
  7863             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7864             {
       
  7865         
       
  7866                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7867                 
       
  7868                 if (IN_type_symbol == NULL)
       
  7869                   IN_type_symbol = last_type_symbol;
       
  7870                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7871                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7872                 function_type_prefix = return_type_symbol;
       
  7873                 break;
       
  7874                 
       
  7875             }
       
  7876             
       
  7877             
       
  7878             ERROR;
       
  7879         }
       
  7880         
       
  7881     }/*function_string_to_dt*/
       
  7882     break;
       
  7883 
       
  7884 /****
       
  7885  *STRING_TO_TOD
       
  7886  */
       
  7887     case function_string_to_tod :
       
  7888     {
       
  7889         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7890 
       
  7891         {
       
  7892             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7894             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7895             symbol_c *IN_type_symbol = NULL;
       
  7896             
       
  7897             /* Get the value from a foo(<param_value>) style call */
       
  7898             if (IN_param_value == NULL)
       
  7899               IN_param_value = function_call_param_iterator.next_nf();
       
  7900             if (IN_param_value != NULL) {
       
  7901               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7902               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7903             }
       
  7904             
       
  7905             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7906             {
       
  7907         
       
  7908                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7909                 
       
  7910                 if (IN_type_symbol == NULL)
       
  7911                   IN_type_symbol = last_type_symbol;
       
  7912                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7913                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7914                 function_type_prefix = return_type_symbol;
       
  7915                 break;
       
  7916                 
       
  7917             }
       
  7918             
       
  7919             
       
  7920             ERROR;
       
  7921         }
       
  7922         
       
  7923     }/*function_string_to_tod*/
       
  7924     break;
       
  7925 
       
  7926 /****
       
  7927  *STRING_TO_UDINT
       
  7928  */
       
  7929     case function_string_to_udint :
       
  7930     {
       
  7931         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7932 
       
  7933         {
       
  7934             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7935             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7936             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7937             symbol_c *IN_type_symbol = NULL;
       
  7938             
       
  7939             /* Get the value from a foo(<param_value>) style call */
       
  7940             if (IN_param_value == NULL)
       
  7941               IN_param_value = function_call_param_iterator.next_nf();
       
  7942             if (IN_param_value != NULL) {
       
  7943               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7944               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7945             }
       
  7946             
       
  7947             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7948             {
       
  7949         
       
  7950                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  7951                 
       
  7952                 if (IN_type_symbol == NULL)
       
  7953                   IN_type_symbol = last_type_symbol;
       
  7954                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7955                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7956                 function_type_prefix = return_type_symbol;
       
  7957                 break;
       
  7958                 
       
  7959             }
       
  7960             
       
  7961             
       
  7962             ERROR;
       
  7963         }
       
  7964         
       
  7965     }/*function_string_to_udint*/
       
  7966     break;
       
  7967 
       
  7968 /****
       
  7969  *STRING_TO_WORD
       
  7970  */
       
  7971     case function_string_to_word :
       
  7972     {
       
  7973         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  7974 
       
  7975         {
       
  7976             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7977             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7978             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7979             symbol_c *IN_type_symbol = NULL;
       
  7980             
       
  7981             /* Get the value from a foo(<param_value>) style call */
       
  7982             if (IN_param_value == NULL)
       
  7983               IN_param_value = function_call_param_iterator.next_nf();
       
  7984             if (IN_param_value != NULL) {
       
  7985               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7986               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7987             }
       
  7988             
       
  7989             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7990             {
       
  7991         
       
  7992                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  7993                 
       
  7994                 if (IN_type_symbol == NULL)
       
  7995                   IN_type_symbol = last_type_symbol;
       
  7996                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7997                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7998                 function_type_prefix = return_type_symbol;
       
  7999                 break;
       
  8000                 
       
  8001             }
       
  8002             
       
  8003             
       
  8004             ERROR;
       
  8005         }
       
  8006         
       
  8007     }/*function_string_to_word*/
       
  8008     break;
       
  8009 
       
  8010 /****
       
  8011  *STRING_TO_LWORD
       
  8012  */
       
  8013     case function_string_to_lword :
       
  8014     {
       
  8015         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8016 
       
  8017         {
       
  8018             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8020             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8021             symbol_c *IN_type_symbol = NULL;
       
  8022             
       
  8023             /* Get the value from a foo(<param_value>) style call */
       
  8024             if (IN_param_value == NULL)
       
  8025               IN_param_value = function_call_param_iterator.next_nf();
       
  8026             if (IN_param_value != NULL) {
       
  8027               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8028               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8029             }
       
  8030             
       
  8031             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8032             {
       
  8033         
       
  8034                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8035                 
       
  8036                 if (IN_type_symbol == NULL)
       
  8037                   IN_type_symbol = last_type_symbol;
       
  8038                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8039                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8040                 function_type_prefix = return_type_symbol;
       
  8041                 break;
       
  8042                 
       
  8043             }
       
  8044             
       
  8045             
       
  8046             ERROR;
       
  8047         }
       
  8048         
       
  8049     }/*function_string_to_lword*/
       
  8050     break;
       
  8051 
       
  8052 /****
       
  8053  *STRING_TO_UINT
       
  8054  */
       
  8055     case function_string_to_uint :
       
  8056     {
       
  8057         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8058 
       
  8059         {
       
  8060             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8062             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8063             symbol_c *IN_type_symbol = NULL;
       
  8064             
       
  8065             /* Get the value from a foo(<param_value>) style call */
       
  8066             if (IN_param_value == NULL)
       
  8067               IN_param_value = function_call_param_iterator.next_nf();
       
  8068             if (IN_param_value != NULL) {
       
  8069               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8070               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8071             }
       
  8072             
       
  8073             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8074             {
       
  8075         
       
  8076                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8077                 
       
  8078                 if (IN_type_symbol == NULL)
       
  8079                   IN_type_symbol = last_type_symbol;
       
  8080                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8081                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8082                 function_type_prefix = return_type_symbol;
       
  8083                 break;
       
  8084                 
       
  8085             }
       
  8086             
       
  8087             
       
  8088             ERROR;
       
  8089         }
       
  8090         
       
  8091     }/*function_string_to_uint*/
       
  8092     break;
       
  8093 
       
  8094 /****
       
  8095  *STRING_TO_LREAL
       
  8096  */
       
  8097     case function_string_to_lreal :
       
  8098     {
       
  8099         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8100 
       
  8101         {
       
  8102             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8103             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8104             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8105             symbol_c *IN_type_symbol = NULL;
       
  8106             
       
  8107             /* Get the value from a foo(<param_value>) style call */
       
  8108             if (IN_param_value == NULL)
       
  8109               IN_param_value = function_call_param_iterator.next_nf();
       
  8110             if (IN_param_value != NULL) {
       
  8111               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8112               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8113             }
       
  8114             
       
  8115             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8116             {
       
  8117         
       
  8118                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  8119                 
       
  8120                 if (IN_type_symbol == NULL)
       
  8121                   IN_type_symbol = last_type_symbol;
       
  8122                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8123                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8124                 function_type_prefix = return_type_symbol;
       
  8125                 break;
       
  8126                 
       
  8127             }
       
  8128             
       
  8129             
       
  8130             ERROR;
       
  8131         }
       
  8132         
       
  8133     }/*function_string_to_lreal*/
       
  8134     break;
       
  8135 
       
  8136 /****
       
  8137  *STRING_TO_BYTE
       
  8138  */
       
  8139     case function_string_to_byte :
       
  8140     {
       
  8141         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8142 
       
  8143         {
       
  8144             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8145             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8146             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8147             symbol_c *IN_type_symbol = NULL;
       
  8148             
       
  8149             /* Get the value from a foo(<param_value>) style call */
       
  8150             if (IN_param_value == NULL)
       
  8151               IN_param_value = function_call_param_iterator.next_nf();
       
  8152             if (IN_param_value != NULL) {
       
  8153               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8154               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8155             }
       
  8156             
       
  8157             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8158             {
       
  8159         
       
  8160                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8161                 
       
  8162                 if (IN_type_symbol == NULL)
       
  8163                   IN_type_symbol = last_type_symbol;
       
  8164                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8165                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8166                 function_type_prefix = return_type_symbol;
       
  8167                 break;
       
  8168                 
       
  8169             }
       
  8170             
       
  8171             
       
  8172             ERROR;
       
  8173         }
       
  8174         
       
  8175     }/*function_string_to_byte*/
       
  8176     break;
       
  8177 
       
  8178 /****
       
  8179  *STRING_TO_USINT
       
  8180  */
       
  8181     case function_string_to_usint :
       
  8182     {
       
  8183         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8184 
       
  8185         {
       
  8186             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8188             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8189             symbol_c *IN_type_symbol = NULL;
       
  8190             
       
  8191             /* Get the value from a foo(<param_value>) style call */
       
  8192             if (IN_param_value == NULL)
       
  8193               IN_param_value = function_call_param_iterator.next_nf();
       
  8194             if (IN_param_value != NULL) {
       
  8195               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8196               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8197             }
       
  8198             
       
  8199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8200             {
       
  8201         
       
  8202                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8203                 
       
  8204                 if (IN_type_symbol == NULL)
       
  8205                   IN_type_symbol = last_type_symbol;
       
  8206                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8207                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8208                 function_type_prefix = return_type_symbol;
       
  8209                 break;
       
  8210                 
       
  8211             }
       
  8212             
       
  8213             
       
  8214             ERROR;
       
  8215         }
       
  8216         
       
  8217     }/*function_string_to_usint*/
       
  8218     break;
       
  8219 
       
  8220 /****
       
  8221  *STRING_TO_ULINT
       
  8222  */
       
  8223     case function_string_to_ulint :
       
  8224     {
       
  8225         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8226 
       
  8227         {
       
  8228             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8229             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8230             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8231             symbol_c *IN_type_symbol = NULL;
       
  8232             
       
  8233             /* Get the value from a foo(<param_value>) style call */
       
  8234             if (IN_param_value == NULL)
       
  8235               IN_param_value = function_call_param_iterator.next_nf();
       
  8236             if (IN_param_value != NULL) {
       
  8237               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8238               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8239             }
       
  8240             
       
  8241             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8242             {
       
  8243         
       
  8244                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8245                 
       
  8246                 if (IN_type_symbol == NULL)
       
  8247                   IN_type_symbol = last_type_symbol;
       
  8248                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8249                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8250                 function_type_prefix = return_type_symbol;
       
  8251                 break;
       
  8252                 
       
  8253             }
       
  8254             
       
  8255             
       
  8256             ERROR;
       
  8257         }
       
  8258         
       
  8259     }/*function_string_to_ulint*/
       
  8260     break;
       
  8261 
       
  8262 /****
       
  8263  *STRING_TO_BOOL
       
  8264  */
       
  8265     case function_string_to_bool :
       
  8266     {
       
  8267         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8268 
       
  8269         {
       
  8270             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8271             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8272             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8273             symbol_c *IN_type_symbol = NULL;
       
  8274             
       
  8275             /* Get the value from a foo(<param_value>) style call */
       
  8276             if (IN_param_value == NULL)
       
  8277               IN_param_value = function_call_param_iterator.next_nf();
       
  8278             if (IN_param_value != NULL) {
       
  8279               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8280               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8281             }
       
  8282             
       
  8283             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8284             {
       
  8285         
       
  8286                 function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
       
  8287                 
       
  8288                 if (IN_type_symbol == NULL)
       
  8289                   IN_type_symbol = last_type_symbol;
       
  8290                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8291                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8292                 function_type_prefix = return_type_symbol;
       
  8293                 break;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             
       
  8298             ERROR;
       
  8299         }
       
  8300         
       
  8301     }/*function_string_to_bool*/
       
  8302     break;
       
  8303 
       
  8304 /****
       
  8305  *STRING_TO_TIME
       
  8306  */
       
  8307     case function_string_to_time :
       
  8308     {
       
  8309         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8310 
       
  8311         {
       
  8312             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8313             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8314             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8315             symbol_c *IN_type_symbol = NULL;
       
  8316             
       
  8317             /* Get the value from a foo(<param_value>) style call */
       
  8318             if (IN_param_value == NULL)
       
  8319               IN_param_value = function_call_param_iterator.next_nf();
       
  8320             if (IN_param_value != NULL) {
       
  8321               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8322               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8323             }
       
  8324             
       
  8325             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8326             {
       
  8327         
       
  8328                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  8329                 
       
  8330                 if (IN_type_symbol == NULL)
       
  8331                   IN_type_symbol = last_type_symbol;
       
  8332                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8333                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8334                 function_type_prefix = return_type_symbol;
       
  8335                 break;
       
  8336                 
       
  8337             }
       
  8338             
       
  8339             
       
  8340             ERROR;
       
  8341         }
       
  8342         
       
  8343     }/*function_string_to_time*/
       
  8344     break;
       
  8345 
       
  8346 /****
       
  8347  *STRING_TO_INT
       
  8348  */
       
  8349     case function_string_to_int :
       
  8350     {
       
  8351         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
       
  8352 
       
  8353         {
       
  8354             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8355             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8356             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8357             symbol_c *IN_type_symbol = NULL;
       
  8358             
       
  8359             /* Get the value from a foo(<param_value>) style call */
       
  8360             if (IN_param_value == NULL)
       
  8361               IN_param_value = function_call_param_iterator.next_nf();
       
  8362             if (IN_param_value != NULL) {
       
  8363               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8364               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8365             }
       
  8366             
       
  8367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8368             {
       
  8369         
       
  8370                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  8371                 
       
  8372                 if (IN_type_symbol == NULL)
       
  8373                   IN_type_symbol = last_type_symbol;
       
  8374                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8375                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8376                 function_type_prefix = return_type_symbol;
       
  8377                 break;
       
  8378                 
       
  8379             }
       
  8380             
       
  8381             
       
  8382             ERROR;
       
  8383         }
       
  8384         
       
  8385     }/*function_string_to_int*/
       
  8386     break;
       
  8387 
       
  8388 /****
       
  8389  *LWORD_TO_REAL
       
  8390  */
       
  8391     case function_lword_to_real :
       
  8392     {
       
  8393         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8394 
       
  8395         {
       
  8396             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8397             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8398             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8399             symbol_c *IN_type_symbol = NULL;
       
  8400             
       
  8401             /* Get the value from a foo(<param_value>) style call */
       
  8402             if (IN_param_value == NULL)
       
  8403               IN_param_value = function_call_param_iterator.next_nf();
       
  8404             if (IN_param_value != NULL) {
       
  8405               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8406               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8407             }
       
  8408             
       
  8409             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8410             {
       
  8411         
       
  8412                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8413                 
       
  8414                 if (IN_type_symbol == NULL)
       
  8415                   IN_type_symbol = last_type_symbol;
       
  8416                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8417                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8418                 function_type_prefix = return_type_symbol;
       
  8419                 function_type_suffix = IN_type_symbol;
       
  8420                 break;
       
  8421                 
       
  8422             }
       
  8423             
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_lword_to_real*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *LWORD_TO_SINT
       
  8433  */
       
  8434     case function_lword_to_sint :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8437 
       
  8438         {
       
  8439             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8442             symbol_c *IN_type_symbol = NULL;
       
  8443             
       
  8444             /* Get the value from a foo(<param_value>) style call */
       
  8445             if (IN_param_value == NULL)
       
  8446               IN_param_value = function_call_param_iterator.next_nf();
       
  8447             if (IN_param_value != NULL) {
       
  8448               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8449               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8450             }
       
  8451             
       
  8452             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8453             {
       
  8454         
       
  8455                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8456                 
       
  8457                 if (IN_type_symbol == NULL)
       
  8458                   IN_type_symbol = last_type_symbol;
       
  8459                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8460                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8461                 function_type_prefix = return_type_symbol;
       
  8462                 function_type_suffix = IN_type_symbol;
       
  8463                 break;
       
  8464                 
       
  8465             }
       
  8466             
       
  8467             
       
  8468             ERROR;
       
  8469         }
       
  8470         
       
  8471     }/*function_lword_to_sint*/
       
  8472     break;
       
  8473 
       
  8474 /****
       
  8475  *LWORD_TO_LINT
       
  8476  */
       
  8477     case function_lword_to_lint :
       
  8478     {
       
  8479         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8480 
       
  8481         {
       
  8482             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8484             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8485             symbol_c *IN_type_symbol = NULL;
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next_nf();
       
  8490             if (IN_param_value != NULL) {
       
  8491               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8492               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8493             }
       
  8494             
       
  8495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8496             {
       
  8497         
       
  8498                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8499                 
       
  8500                 if (IN_type_symbol == NULL)
       
  8501                   IN_type_symbol = last_type_symbol;
       
  8502                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8503                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8504                 function_type_prefix = return_type_symbol;
       
  8505                 function_type_suffix = IN_type_symbol;
       
  8506                 break;
       
  8507                 
       
  8508             }
       
  8509             
       
  8510             
       
  8511             ERROR;
       
  8512         }
       
  8513         
       
  8514     }/*function_lword_to_lint*/
       
  8515     break;
       
  8516 
       
  8517 /****
       
  8518  *LWORD_TO_DINT
       
  8519  */
       
  8520     case function_lword_to_dint :
       
  8521     {
       
  8522         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8523 
       
  8524         {
       
  8525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8526             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8527             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8528             symbol_c *IN_type_symbol = NULL;
       
  8529             
       
  8530             /* Get the value from a foo(<param_value>) style call */
       
  8531             if (IN_param_value == NULL)
       
  8532               IN_param_value = function_call_param_iterator.next_nf();
       
  8533             if (IN_param_value != NULL) {
       
  8534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8535               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8536             }
       
  8537             
       
  8538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8539             {
       
  8540         
       
  8541                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8542                 
       
  8543                 if (IN_type_symbol == NULL)
       
  8544                   IN_type_symbol = last_type_symbol;
       
  8545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8546                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8547                 function_type_prefix = return_type_symbol;
       
  8548                 function_type_suffix = IN_type_symbol;
       
  8549                 break;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             
       
  8554             ERROR;
       
  8555         }
       
  8556         
       
  8557     }/*function_lword_to_dint*/
       
  8558     break;
       
  8559 
       
  8560 /****
       
  8561  *LWORD_TO_DATE
       
  8562  */
       
  8563     case function_lword_to_date :
       
  8564     {
       
  8565         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8566 
       
  8567         {
       
  8568             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8569             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8570             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8571             symbol_c *IN_type_symbol = NULL;
       
  8572             
       
  8573             /* Get the value from a foo(<param_value>) style call */
       
  8574             if (IN_param_value == NULL)
       
  8575               IN_param_value = function_call_param_iterator.next_nf();
       
  8576             if (IN_param_value != NULL) {
       
  8577               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8578               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8579             }
       
  8580             
       
  8581             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8582             {
       
  8583         
       
  8584                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8585                 
       
  8586                 if (IN_type_symbol == NULL)
       
  8587                   IN_type_symbol = last_type_symbol;
       
  8588                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8589                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8590                 function_type_prefix = return_type_symbol;
       
  8591                 break;
       
  8592                 
       
  8593             }
       
  8594             
       
  8595             
       
  8596             ERROR;
       
  8597         }
       
  8598         
       
  8599     }/*function_lword_to_date*/
       
  8600     break;
       
  8601 
       
  8602 /****
       
  8603  *LWORD_TO_DWORD
       
  8604  */
       
  8605     case function_lword_to_dword :
       
  8606     {
       
  8607         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8608 
       
  8609         {
       
  8610             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8611             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8612             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8613             symbol_c *IN_type_symbol = NULL;
       
  8614             
       
  8615             /* Get the value from a foo(<param_value>) style call */
       
  8616             if (IN_param_value == NULL)
       
  8617               IN_param_value = function_call_param_iterator.next_nf();
       
  8618             if (IN_param_value != NULL) {
       
  8619               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8620               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8621             }
       
  8622             
       
  8623             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8624             {
       
  8625         
       
  8626                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8627                 
       
  8628                 if (IN_type_symbol == NULL)
       
  8629                   IN_type_symbol = last_type_symbol;
       
  8630                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8631                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8632                 function_type_prefix = return_type_symbol;
       
  8633                 function_type_suffix = IN_type_symbol;
       
  8634                 break;
       
  8635                 
       
  8636             }
       
  8637             
       
  8638             
       
  8639             ERROR;
       
  8640         }
       
  8641         
       
  8642     }/*function_lword_to_dword*/
       
  8643     break;
       
  8644 
       
  8645 /****
       
  8646  *LWORD_TO_DT
       
  8647  */
       
  8648     case function_lword_to_dt :
       
  8649     {
       
  8650         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8651 
       
  8652         {
       
  8653             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8654             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8655             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8656             symbol_c *IN_type_symbol = NULL;
       
  8657             
       
  8658             /* Get the value from a foo(<param_value>) style call */
       
  8659             if (IN_param_value == NULL)
       
  8660               IN_param_value = function_call_param_iterator.next_nf();
       
  8661             if (IN_param_value != NULL) {
       
  8662               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8663               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8664             }
       
  8665             
       
  8666             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8667             {
       
  8668         
       
  8669                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8670                 
       
  8671                 if (IN_type_symbol == NULL)
       
  8672                   IN_type_symbol = last_type_symbol;
       
  8673                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8674                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8675                 function_type_prefix = return_type_symbol;
       
  8676                 break;
       
  8677                 
       
  8678             }
       
  8679             
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_lword_to_dt*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *LWORD_TO_TOD
       
  8689  */
       
  8690     case function_lword_to_tod :
       
  8691     {
       
  8692         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8693 
       
  8694         {
       
  8695             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8697             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8698             symbol_c *IN_type_symbol = NULL;
       
  8699             
       
  8700             /* Get the value from a foo(<param_value>) style call */
       
  8701             if (IN_param_value == NULL)
       
  8702               IN_param_value = function_call_param_iterator.next_nf();
       
  8703             if (IN_param_value != NULL) {
       
  8704               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8705               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8706             }
       
  8707             
       
  8708             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8709             {
       
  8710         
       
  8711                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8712                 
       
  8713                 if (IN_type_symbol == NULL)
       
  8714                   IN_type_symbol = last_type_symbol;
       
  8715                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8716                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8717                 function_type_prefix = return_type_symbol;
       
  8718                 break;
       
  8719                 
       
  8720             }
       
  8721             
       
  8722             
       
  8723             ERROR;
       
  8724         }
       
  8725         
       
  8726     }/*function_lword_to_tod*/
       
  8727     break;
       
  8728 
       
  8729 /****
       
  8730  *LWORD_TO_UDINT
       
  8731  */
       
  8732     case function_lword_to_udint :
       
  8733     {
       
  8734         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8735 
       
  8736         {
       
  8737             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8738             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8739             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8740             symbol_c *IN_type_symbol = NULL;
       
  8741             
       
  8742             /* Get the value from a foo(<param_value>) style call */
       
  8743             if (IN_param_value == NULL)
       
  8744               IN_param_value = function_call_param_iterator.next_nf();
       
  8745             if (IN_param_value != NULL) {
       
  8746               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8747               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8748             }
       
  8749             
       
  8750             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8751             {
       
  8752         
       
  8753                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8754                 
       
  8755                 if (IN_type_symbol == NULL)
       
  8756                   IN_type_symbol = last_type_symbol;
       
  8757                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8758                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8759                 function_type_prefix = return_type_symbol;
       
  8760                 function_type_suffix = IN_type_symbol;
       
  8761                 break;
       
  8762                 
       
  8763             }
       
  8764             
       
  8765             
       
  8766             ERROR;
       
  8767         }
       
  8768         
       
  8769     }/*function_lword_to_udint*/
       
  8770     break;
       
  8771 
       
  8772 /****
       
  8773  *LWORD_TO_WORD
       
  8774  */
       
  8775     case function_lword_to_word :
       
  8776     {
       
  8777         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8778 
       
  8779         {
       
  8780             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8782             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8783             symbol_c *IN_type_symbol = NULL;
       
  8784             
       
  8785             /* Get the value from a foo(<param_value>) style call */
       
  8786             if (IN_param_value == NULL)
       
  8787               IN_param_value = function_call_param_iterator.next_nf();
       
  8788             if (IN_param_value != NULL) {
       
  8789               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8790               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8791             }
       
  8792             
       
  8793             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8794             {
       
  8795         
       
  8796                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8797                 
       
  8798                 if (IN_type_symbol == NULL)
       
  8799                   IN_type_symbol = last_type_symbol;
       
  8800                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8801                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8802                 function_type_prefix = return_type_symbol;
       
  8803                 function_type_suffix = IN_type_symbol;
       
  8804                 break;
       
  8805                 
       
  8806             }
       
  8807             
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_lword_to_word*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *LWORD_TO_STRING
       
  8817  */
       
  8818     case function_lword_to_string :
       
  8819     {
       
  8820         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8821 
       
  8822         {
       
  8823             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8825             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8826             symbol_c *IN_type_symbol = NULL;
       
  8827             
       
  8828             /* Get the value from a foo(<param_value>) style call */
       
  8829             if (IN_param_value == NULL)
       
  8830               IN_param_value = function_call_param_iterator.next_nf();
       
  8831             if (IN_param_value != NULL) {
       
  8832               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8833               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8834             }
       
  8835             
       
  8836             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8837             {
       
  8838         
       
  8839                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  8840                 
       
  8841                 if (IN_type_symbol == NULL)
       
  8842                   IN_type_symbol = last_type_symbol;
       
  8843                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8844                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8845                 function_type_prefix = return_type_symbol;
       
  8846                 break;
       
  8847                 
       
  8848             }
       
  8849             
       
  8850             
       
  8851             ERROR;
       
  8852         }
       
  8853         
       
  8854     }/*function_lword_to_string*/
       
  8855     break;
       
  8856 
       
  8857 /****
       
  8858  *LWORD_TO_UINT
       
  8859  */
       
  8860     case function_lword_to_uint :
       
  8861     {
       
  8862         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8863 
       
  8864         {
       
  8865             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8866             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8867             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8868             symbol_c *IN_type_symbol = NULL;
       
  8869             
       
  8870             /* Get the value from a foo(<param_value>) style call */
       
  8871             if (IN_param_value == NULL)
       
  8872               IN_param_value = function_call_param_iterator.next_nf();
       
  8873             if (IN_param_value != NULL) {
       
  8874               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8875               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8876             }
       
  8877             
       
  8878             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8879             {
       
  8880         
       
  8881                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8882                 
       
  8883                 if (IN_type_symbol == NULL)
       
  8884                   IN_type_symbol = last_type_symbol;
       
  8885                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8886                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8887                 function_type_prefix = return_type_symbol;
       
  8888                 function_type_suffix = IN_type_symbol;
       
  8889                 break;
       
  8890                 
       
  8891             }
       
  8892             
       
  8893             
       
  8894             ERROR;
       
  8895         }
       
  8896         
       
  8897     }/*function_lword_to_uint*/
       
  8898     break;
       
  8899 
       
  8900 /****
       
  8901  *LWORD_TO_LREAL
       
  8902  */
       
  8903     case function_lword_to_lreal :
       
  8904     {
       
  8905         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8906 
       
  8907         {
       
  8908             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8909             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8910             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8911             symbol_c *IN_type_symbol = NULL;
       
  8912             
       
  8913             /* Get the value from a foo(<param_value>) style call */
       
  8914             if (IN_param_value == NULL)
       
  8915               IN_param_value = function_call_param_iterator.next_nf();
       
  8916             if (IN_param_value != NULL) {
       
  8917               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8918               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8919             }
       
  8920             
       
  8921             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8922             {
       
  8923         
       
  8924                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8925                 
       
  8926                 if (IN_type_symbol == NULL)
       
  8927                   IN_type_symbol = last_type_symbol;
       
  8928                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8929                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8930                 function_type_prefix = return_type_symbol;
       
  8931                 function_type_suffix = IN_type_symbol;
       
  8932                 break;
       
  8933                 
       
  8934             }
       
  8935             
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_lword_to_lreal*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *LWORD_TO_BYTE
       
  8945  */
       
  8946     case function_lword_to_byte :
       
  8947     {
       
  8948         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8949 
       
  8950         {
       
  8951             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8953             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8954             symbol_c *IN_type_symbol = NULL;
       
  8955             
       
  8956             /* Get the value from a foo(<param_value>) style call */
       
  8957             if (IN_param_value == NULL)
       
  8958               IN_param_value = function_call_param_iterator.next_nf();
       
  8959             if (IN_param_value != NULL) {
       
  8960               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8961               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8962             }
       
  8963             
       
  8964             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8965             {
       
  8966         
       
  8967                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8968                 
       
  8969                 if (IN_type_symbol == NULL)
       
  8970                   IN_type_symbol = last_type_symbol;
       
  8971                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8972                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8973                 function_type_prefix = return_type_symbol;
       
  8974                 function_type_suffix = IN_type_symbol;
       
  8975                 break;
       
  8976                 
       
  8977             }
       
  8978             
       
  8979             
       
  8980             ERROR;
       
  8981         }
       
  8982         
       
  8983     }/*function_lword_to_byte*/
       
  8984     break;
       
  8985 
       
  8986 /****
       
  8987  *LWORD_TO_USINT
       
  8988  */
       
  8989     case function_lword_to_usint :
       
  8990     {
       
  8991         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  8992 
       
  8993         {
       
  8994             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8995             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8996             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8997             symbol_c *IN_type_symbol = NULL;
       
  8998             
       
  8999             /* Get the value from a foo(<param_value>) style call */
       
  9000             if (IN_param_value == NULL)
       
  9001               IN_param_value = function_call_param_iterator.next_nf();
       
  9002             if (IN_param_value != NULL) {
       
  9003               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9004               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9005             }
       
  9006             
       
  9007             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9008             {
       
  9009         
       
  9010                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9011                 
       
  9012                 if (IN_type_symbol == NULL)
       
  9013                   IN_type_symbol = last_type_symbol;
       
  9014                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9015                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9016                 function_type_prefix = return_type_symbol;
       
  9017                 function_type_suffix = IN_type_symbol;
       
  9018                 break;
       
  9019                 
       
  9020             }
       
  9021             
       
  9022             
       
  9023             ERROR;
       
  9024         }
       
  9025         
       
  9026     }/*function_lword_to_usint*/
       
  9027     break;
       
  9028 
       
  9029 /****
       
  9030  *LWORD_TO_ULINT
       
  9031  */
       
  9032     case function_lword_to_ulint :
       
  9033     {
       
  9034         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  9035 
       
  9036         {
       
  9037             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9038             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9039             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9040             symbol_c *IN_type_symbol = NULL;
       
  9041             
       
  9042             /* Get the value from a foo(<param_value>) style call */
       
  9043             if (IN_param_value == NULL)
       
  9044               IN_param_value = function_call_param_iterator.next_nf();
       
  9045             if (IN_param_value != NULL) {
       
  9046               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9047               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9048             }
       
  9049             
       
  9050             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9051             {
       
  9052         
       
  9053                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9054                 
       
  9055                 if (IN_type_symbol == NULL)
       
  9056                   IN_type_symbol = last_type_symbol;
       
  9057                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9058                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9059                 function_type_prefix = return_type_symbol;
       
  9060                 function_type_suffix = IN_type_symbol;
       
  9061                 break;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             
       
  9066             ERROR;
       
  9067         }
       
  9068         
       
  9069     }/*function_lword_to_ulint*/
       
  9070     break;
       
  9071 
       
  9072 /****
       
  9073  *LWORD_TO_BOOL
       
  9074  */
       
  9075     case function_lword_to_bool :
       
  9076     {
       
  9077         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  9078 
       
  9079         {
       
  9080             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9081             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9082             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9083             symbol_c *IN_type_symbol = NULL;
       
  9084             
       
  9085             /* Get the value from a foo(<param_value>) style call */
       
  9086             if (IN_param_value == NULL)
       
  9087               IN_param_value = function_call_param_iterator.next_nf();
       
  9088             if (IN_param_value != NULL) {
       
  9089               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9090               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9091             }
       
  9092             
       
  9093             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9094             {
       
  9095         
       
  9096                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9097                 
       
  9098                 if (IN_type_symbol == NULL)
       
  9099                   IN_type_symbol = last_type_symbol;
       
  9100                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9101                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9102                 function_type_prefix = return_type_symbol;
       
  9103                 function_type_suffix = IN_type_symbol;
       
  9104                 break;
       
  9105                 
       
  9106             }
       
  9107             
       
  9108             
       
  9109             ERROR;
       
  9110         }
       
  9111         
       
  9112     }/*function_lword_to_bool*/
       
  9113     break;
       
  9114 
       
  9115 /****
       
  9116  *LWORD_TO_TIME
       
  9117  */
       
  9118     case function_lword_to_time :
       
  9119     {
       
  9120         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  9121 
       
  9122         {
       
  9123             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9124             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9125             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9126             symbol_c *IN_type_symbol = NULL;
       
  9127             
       
  9128             /* Get the value from a foo(<param_value>) style call */
       
  9129             if (IN_param_value == NULL)
       
  9130               IN_param_value = function_call_param_iterator.next_nf();
       
  9131             if (IN_param_value != NULL) {
       
  9132               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9133               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9134             }
       
  9135             
       
  9136             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9137             {
       
  9138         
       
  9139                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9140                 
       
  9141                 if (IN_type_symbol == NULL)
       
  9142                   IN_type_symbol = last_type_symbol;
       
  9143                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9144                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9145                 function_type_prefix = return_type_symbol;
       
  9146                 break;
       
  9147                 
       
  9148             }
       
  9149             
       
  9150             
       
  9151             ERROR;
       
  9152         }
       
  9153         
       
  9154     }/*function_lword_to_time*/
       
  9155     break;
       
  9156 
       
  9157 /****
       
  9158  *LWORD_TO_INT
       
  9159  */
       
  9160     case function_lword_to_int :
       
  9161     {
       
  9162         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
       
  9163 
       
  9164         {
       
  9165             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9166             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9167             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9168             symbol_c *IN_type_symbol = NULL;
       
  9169             
       
  9170             /* Get the value from a foo(<param_value>) style call */
       
  9171             if (IN_param_value == NULL)
       
  9172               IN_param_value = function_call_param_iterator.next_nf();
       
  9173             if (IN_param_value != NULL) {
       
  9174               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9175               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9176             }
       
  9177             
       
  9178             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9179             {
       
  9180         
       
  9181                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9182                 
       
  9183                 if (IN_type_symbol == NULL)
       
  9184                   IN_type_symbol = last_type_symbol;
       
  9185                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9186                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9187                 function_type_prefix = return_type_symbol;
       
  9188                 function_type_suffix = IN_type_symbol;
       
  9189                 break;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             
       
  9194             ERROR;
       
  9195         }
       
  9196         
       
  9197     }/*function_lword_to_int*/
       
  9198     break;
       
  9199 
       
  9200 /****
       
  9201  *UINT_TO_REAL
       
  9202  */
       
  9203     case function_uint_to_real :
       
  9204     {
       
  9205         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9206 
       
  9207         {
       
  9208             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9209             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9210             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9211             symbol_c *IN_type_symbol = NULL;
       
  9212             
       
  9213             /* Get the value from a foo(<param_value>) style call */
       
  9214             if (IN_param_value == NULL)
       
  9215               IN_param_value = function_call_param_iterator.next_nf();
       
  9216             if (IN_param_value != NULL) {
       
  9217               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9218               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9219             }
       
  9220             
       
  9221             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9222             {
       
  9223         
       
  9224                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9225                 
       
  9226                 if (IN_type_symbol == NULL)
       
  9227                   IN_type_symbol = last_type_symbol;
       
  9228                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9229                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9230                 function_type_prefix = return_type_symbol;
       
  9231                 function_type_suffix = IN_type_symbol;
       
  9232                 break;
       
  9233                 
       
  9234             }
       
  9235             
       
  9236             
       
  9237             ERROR;
       
  9238         }
       
  9239         
       
  9240     }/*function_uint_to_real*/
       
  9241     break;
       
  9242 
       
  9243 /****
       
  9244  *UINT_TO_SINT
       
  9245  */
       
  9246     case function_uint_to_sint :
       
  9247     {
       
  9248         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9249 
       
  9250         {
       
  9251             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9252             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9253             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9254             symbol_c *IN_type_symbol = NULL;
       
  9255             
       
  9256             /* Get the value from a foo(<param_value>) style call */
       
  9257             if (IN_param_value == NULL)
       
  9258               IN_param_value = function_call_param_iterator.next_nf();
       
  9259             if (IN_param_value != NULL) {
       
  9260               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9261               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9262             }
       
  9263             
       
  9264             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9265             {
       
  9266         
       
  9267                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9268                 
       
  9269                 if (IN_type_symbol == NULL)
       
  9270                   IN_type_symbol = last_type_symbol;
       
  9271                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9272                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9273                 function_type_prefix = return_type_symbol;
       
  9274                 function_type_suffix = IN_type_symbol;
       
  9275                 break;
       
  9276                 
       
  9277             }
       
  9278             
       
  9279             
       
  9280             ERROR;
       
  9281         }
       
  9282         
       
  9283     }/*function_uint_to_sint*/
       
  9284     break;
       
  9285 
       
  9286 /****
       
  9287  *UINT_TO_LINT
       
  9288  */
       
  9289     case function_uint_to_lint :
       
  9290     {
       
  9291         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9292 
       
  9293         {
       
  9294             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9295             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9296             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9297             symbol_c *IN_type_symbol = NULL;
       
  9298             
       
  9299             /* Get the value from a foo(<param_value>) style call */
       
  9300             if (IN_param_value == NULL)
       
  9301               IN_param_value = function_call_param_iterator.next_nf();
       
  9302             if (IN_param_value != NULL) {
       
  9303               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9304               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9305             }
       
  9306             
       
  9307             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9308             {
       
  9309         
       
  9310                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9311                 
       
  9312                 if (IN_type_symbol == NULL)
       
  9313                   IN_type_symbol = last_type_symbol;
       
  9314                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9315                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9316                 function_type_prefix = return_type_symbol;
       
  9317                 function_type_suffix = IN_type_symbol;
       
  9318                 break;
       
  9319                 
       
  9320             }
       
  9321             
       
  9322             
       
  9323             ERROR;
       
  9324         }
       
  9325         
       
  9326     }/*function_uint_to_lint*/
       
  9327     break;
       
  9328 
       
  9329 /****
       
  9330  *UINT_TO_DINT
       
  9331  */
       
  9332     case function_uint_to_dint :
       
  9333     {
       
  9334         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9335 
       
  9336         {
       
  9337             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9338             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9339             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9340             symbol_c *IN_type_symbol = NULL;
       
  9341             
       
  9342             /* Get the value from a foo(<param_value>) style call */
       
  9343             if (IN_param_value == NULL)
       
  9344               IN_param_value = function_call_param_iterator.next_nf();
       
  9345             if (IN_param_value != NULL) {
       
  9346               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9347               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9348             }
       
  9349             
       
  9350             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9351             {
       
  9352         
       
  9353                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9354                 
       
  9355                 if (IN_type_symbol == NULL)
       
  9356                   IN_type_symbol = last_type_symbol;
       
  9357                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9358                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9359                 function_type_prefix = return_type_symbol;
       
  9360                 function_type_suffix = IN_type_symbol;
       
  9361                 break;
       
  9362                 
       
  9363             }
       
  9364             
       
  9365             
       
  9366             ERROR;
       
  9367         }
       
  9368         
       
  9369     }/*function_uint_to_dint*/
       
  9370     break;
       
  9371 
       
  9372 /****
       
  9373  *UINT_TO_DATE
       
  9374  */
       
  9375     case function_uint_to_date :
       
  9376     {
       
  9377         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9378 
       
  9379         {
       
  9380             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9381             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9382             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9383             symbol_c *IN_type_symbol = NULL;
       
  9384             
       
  9385             /* Get the value from a foo(<param_value>) style call */
       
  9386             if (IN_param_value == NULL)
       
  9387               IN_param_value = function_call_param_iterator.next_nf();
       
  9388             if (IN_param_value != NULL) {
       
  9389               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9390               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9391             }
       
  9392             
       
  9393             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9394             {
       
  9395         
       
  9396                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9397                 
       
  9398                 if (IN_type_symbol == NULL)
       
  9399                   IN_type_symbol = last_type_symbol;
       
  9400                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9401                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9402                 function_type_prefix = return_type_symbol;
       
  9403                 break;
       
  9404                 
       
  9405             }
       
  9406             
       
  9407             
       
  9408             ERROR;
       
  9409         }
       
  9410         
       
  9411     }/*function_uint_to_date*/
       
  9412     break;
       
  9413 
       
  9414 /****
       
  9415  *UINT_TO_DWORD
       
  9416  */
       
  9417     case function_uint_to_dword :
       
  9418     {
       
  9419         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9420 
       
  9421         {
       
  9422             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9423             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9424             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9425             symbol_c *IN_type_symbol = NULL;
       
  9426             
       
  9427             /* Get the value from a foo(<param_value>) style call */
       
  9428             if (IN_param_value == NULL)
       
  9429               IN_param_value = function_call_param_iterator.next_nf();
       
  9430             if (IN_param_value != NULL) {
       
  9431               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9432               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9433             }
       
  9434             
       
  9435             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9436             {
       
  9437         
       
  9438                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9439                 
       
  9440                 if (IN_type_symbol == NULL)
       
  9441                   IN_type_symbol = last_type_symbol;
       
  9442                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9443                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9444                 function_type_prefix = return_type_symbol;
       
  9445                 function_type_suffix = IN_type_symbol;
       
  9446                 break;
       
  9447                 
       
  9448             }
       
  9449             
       
  9450             
       
  9451             ERROR;
       
  9452         }
       
  9453         
       
  9454     }/*function_uint_to_dword*/
       
  9455     break;
       
  9456 
       
  9457 /****
       
  9458  *UINT_TO_DT
       
  9459  */
       
  9460     case function_uint_to_dt :
       
  9461     {
       
  9462         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9463 
       
  9464         {
       
  9465             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9466             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9467             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9468             symbol_c *IN_type_symbol = NULL;
       
  9469             
       
  9470             /* Get the value from a foo(<param_value>) style call */
       
  9471             if (IN_param_value == NULL)
       
  9472               IN_param_value = function_call_param_iterator.next_nf();
       
  9473             if (IN_param_value != NULL) {
       
  9474               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9475               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9476             }
       
  9477             
       
  9478             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9479             {
       
  9480         
       
  9481                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9482                 
       
  9483                 if (IN_type_symbol == NULL)
       
  9484                   IN_type_symbol = last_type_symbol;
       
  9485                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9486                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9487                 function_type_prefix = return_type_symbol;
       
  9488                 break;
       
  9489                 
       
  9490             }
       
  9491             
       
  9492             
       
  9493             ERROR;
       
  9494         }
       
  9495         
       
  9496     }/*function_uint_to_dt*/
       
  9497     break;
       
  9498 
       
  9499 /****
       
  9500  *UINT_TO_TOD
       
  9501  */
       
  9502     case function_uint_to_tod :
       
  9503     {
       
  9504         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9505 
       
  9506         {
       
  9507             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9508             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9509             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9510             symbol_c *IN_type_symbol = NULL;
       
  9511             
       
  9512             /* Get the value from a foo(<param_value>) style call */
       
  9513             if (IN_param_value == NULL)
       
  9514               IN_param_value = function_call_param_iterator.next_nf();
       
  9515             if (IN_param_value != NULL) {
       
  9516               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9517               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9518             }
       
  9519             
       
  9520             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9521             {
       
  9522         
       
  9523                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9524                 
       
  9525                 if (IN_type_symbol == NULL)
       
  9526                   IN_type_symbol = last_type_symbol;
       
  9527                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9528                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9529                 function_type_prefix = return_type_symbol;
       
  9530                 break;
       
  9531                 
       
  9532             }
       
  9533             
       
  9534             
       
  9535             ERROR;
       
  9536         }
       
  9537         
       
  9538     }/*function_uint_to_tod*/
       
  9539     break;
       
  9540 
       
  9541 /****
       
  9542  *UINT_TO_UDINT
       
  9543  */
       
  9544     case function_uint_to_udint :
       
  9545     {
       
  9546         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9547 
       
  9548         {
       
  9549             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9550             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9551             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9552             symbol_c *IN_type_symbol = NULL;
       
  9553             
       
  9554             /* Get the value from a foo(<param_value>) style call */
       
  9555             if (IN_param_value == NULL)
       
  9556               IN_param_value = function_call_param_iterator.next_nf();
       
  9557             if (IN_param_value != NULL) {
       
  9558               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9559               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9560             }
       
  9561             
       
  9562             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9563             {
       
  9564         
       
  9565                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9566                 
       
  9567                 if (IN_type_symbol == NULL)
       
  9568                   IN_type_symbol = last_type_symbol;
       
  9569                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9570                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9571                 function_type_prefix = return_type_symbol;
       
  9572                 function_type_suffix = IN_type_symbol;
       
  9573                 break;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             
       
  9578             ERROR;
       
  9579         }
       
  9580         
       
  9581     }/*function_uint_to_udint*/
       
  9582     break;
       
  9583 
       
  9584 /****
       
  9585  *UINT_TO_WORD
       
  9586  */
       
  9587     case function_uint_to_word :
       
  9588     {
       
  9589         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9590 
       
  9591         {
       
  9592             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9593             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9594             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9595             symbol_c *IN_type_symbol = NULL;
       
  9596             
       
  9597             /* Get the value from a foo(<param_value>) style call */
       
  9598             if (IN_param_value == NULL)
       
  9599               IN_param_value = function_call_param_iterator.next_nf();
       
  9600             if (IN_param_value != NULL) {
       
  9601               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9602               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9603             }
       
  9604             
       
  9605             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9606             {
       
  9607         
       
  9608                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9609                 
       
  9610                 if (IN_type_symbol == NULL)
       
  9611                   IN_type_symbol = last_type_symbol;
       
  9612                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9613                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9614                 function_type_prefix = return_type_symbol;
       
  9615                 function_type_suffix = IN_type_symbol;
       
  9616                 break;
       
  9617                 
       
  9618             }
       
  9619             
       
  9620             
       
  9621             ERROR;
       
  9622         }
       
  9623         
       
  9624     }/*function_uint_to_word*/
       
  9625     break;
       
  9626 
       
  9627 /****
       
  9628  *UINT_TO_STRING
       
  9629  */
       
  9630     case function_uint_to_string :
       
  9631     {
       
  9632         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9633 
       
  9634         {
       
  9635             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9636             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9637             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9638             symbol_c *IN_type_symbol = NULL;
       
  9639             
       
  9640             /* Get the value from a foo(<param_value>) style call */
       
  9641             if (IN_param_value == NULL)
       
  9642               IN_param_value = function_call_param_iterator.next_nf();
       
  9643             if (IN_param_value != NULL) {
       
  9644               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9645               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9646             }
       
  9647             
       
  9648             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9649             {
       
  9650         
       
  9651                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  9652                 
       
  9653                 if (IN_type_symbol == NULL)
       
  9654                   IN_type_symbol = last_type_symbol;
       
  9655                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9656                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9657                 function_type_prefix = return_type_symbol;
       
  9658                 break;
       
  9659                 
       
  9660             }
       
  9661             
       
  9662             
       
  9663             ERROR;
       
  9664         }
       
  9665         
       
  9666     }/*function_uint_to_string*/
       
  9667     break;
       
  9668 
       
  9669 /****
       
  9670  *UINT_TO_LWORD
       
  9671  */
       
  9672     case function_uint_to_lword :
       
  9673     {
       
  9674         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9675 
       
  9676         {
       
  9677             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9678             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9679             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9680             symbol_c *IN_type_symbol = NULL;
       
  9681             
       
  9682             /* Get the value from a foo(<param_value>) style call */
       
  9683             if (IN_param_value == NULL)
       
  9684               IN_param_value = function_call_param_iterator.next_nf();
       
  9685             if (IN_param_value != NULL) {
       
  9686               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9687               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9688             }
       
  9689             
       
  9690             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9691             {
       
  9692         
       
  9693                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9694                 
       
  9695                 if (IN_type_symbol == NULL)
       
  9696                   IN_type_symbol = last_type_symbol;
       
  9697                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9698                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9699                 function_type_prefix = return_type_symbol;
       
  9700                 function_type_suffix = IN_type_symbol;
       
  9701                 break;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             
       
  9706             ERROR;
       
  9707         }
       
  9708         
       
  9709     }/*function_uint_to_lword*/
       
  9710     break;
       
  9711 
       
  9712 /****
       
  9713  *UINT_TO_LREAL
       
  9714  */
       
  9715     case function_uint_to_lreal :
       
  9716     {
       
  9717         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9718 
       
  9719         {
       
  9720             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9722             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9723             symbol_c *IN_type_symbol = NULL;
       
  9724             
       
  9725             /* Get the value from a foo(<param_value>) style call */
       
  9726             if (IN_param_value == NULL)
       
  9727               IN_param_value = function_call_param_iterator.next_nf();
       
  9728             if (IN_param_value != NULL) {
       
  9729               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9730               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9731             }
       
  9732             
       
  9733             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9734             {
       
  9735         
       
  9736                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9737                 
       
  9738                 if (IN_type_symbol == NULL)
       
  9739                   IN_type_symbol = last_type_symbol;
       
  9740                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9741                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9742                 function_type_prefix = return_type_symbol;
       
  9743                 function_type_suffix = IN_type_symbol;
       
  9744                 break;
       
  9745                 
       
  9746             }
       
  9747             
       
  9748             
       
  9749             ERROR;
       
  9750         }
       
  9751         
       
  9752     }/*function_uint_to_lreal*/
       
  9753     break;
       
  9754 
       
  9755 /****
       
  9756  *UINT_TO_BYTE
       
  9757  */
       
  9758     case function_uint_to_byte :
       
  9759     {
       
  9760         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9761 
       
  9762         {
       
  9763             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9764             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9765             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9766             symbol_c *IN_type_symbol = NULL;
       
  9767             
       
  9768             /* Get the value from a foo(<param_value>) style call */
       
  9769             if (IN_param_value == NULL)
       
  9770               IN_param_value = function_call_param_iterator.next_nf();
       
  9771             if (IN_param_value != NULL) {
       
  9772               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9773               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9774             }
       
  9775             
       
  9776             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9777             {
       
  9778         
       
  9779                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9780                 
       
  9781                 if (IN_type_symbol == NULL)
       
  9782                   IN_type_symbol = last_type_symbol;
       
  9783                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9784                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9785                 function_type_prefix = return_type_symbol;
       
  9786                 function_type_suffix = IN_type_symbol;
       
  9787                 break;
       
  9788                 
       
  9789             }
       
  9790             
       
  9791             
       
  9792             ERROR;
       
  9793         }
       
  9794         
       
  9795     }/*function_uint_to_byte*/
       
  9796     break;
       
  9797 
       
  9798 /****
       
  9799  *UINT_TO_USINT
       
  9800  */
       
  9801     case function_uint_to_usint :
       
  9802     {
       
  9803         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9804 
       
  9805         {
       
  9806             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9808             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9809             symbol_c *IN_type_symbol = NULL;
       
  9810             
       
  9811             /* Get the value from a foo(<param_value>) style call */
       
  9812             if (IN_param_value == NULL)
       
  9813               IN_param_value = function_call_param_iterator.next_nf();
       
  9814             if (IN_param_value != NULL) {
       
  9815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9817             }
       
  9818             
       
  9819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9820             {
       
  9821         
       
  9822                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9823                 
       
  9824                 if (IN_type_symbol == NULL)
       
  9825                   IN_type_symbol = last_type_symbol;
       
  9826                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9827                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9828                 function_type_prefix = return_type_symbol;
       
  9829                 function_type_suffix = IN_type_symbol;
       
  9830                 break;
       
  9831                 
       
  9832             }
       
  9833             
       
  9834             
       
  9835             ERROR;
       
  9836         }
       
  9837         
       
  9838     }/*function_uint_to_usint*/
       
  9839     break;
       
  9840 
       
  9841 /****
       
  9842  *UINT_TO_ULINT
       
  9843  */
       
  9844     case function_uint_to_ulint :
       
  9845     {
       
  9846         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9847 
       
  9848         {
       
  9849             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9850             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9851             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9852             symbol_c *IN_type_symbol = NULL;
       
  9853             
       
  9854             /* Get the value from a foo(<param_value>) style call */
       
  9855             if (IN_param_value == NULL)
       
  9856               IN_param_value = function_call_param_iterator.next_nf();
       
  9857             if (IN_param_value != NULL) {
       
  9858               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9859               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9860             }
       
  9861             
       
  9862             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9863             {
       
  9864         
       
  9865                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9866                 
       
  9867                 if (IN_type_symbol == NULL)
       
  9868                   IN_type_symbol = last_type_symbol;
       
  9869                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9870                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9871                 function_type_prefix = return_type_symbol;
       
  9872                 function_type_suffix = IN_type_symbol;
       
  9873                 break;
       
  9874                 
       
  9875             }
       
  9876             
       
  9877             
       
  9878             ERROR;
       
  9879         }
       
  9880         
       
  9881     }/*function_uint_to_ulint*/
       
  9882     break;
       
  9883 
       
  9884 /****
       
  9885  *UINT_TO_BOOL
       
  9886  */
       
  9887     case function_uint_to_bool :
       
  9888     {
       
  9889         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9890 
       
  9891         {
       
  9892             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9894             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9895             symbol_c *IN_type_symbol = NULL;
       
  9896             
       
  9897             /* Get the value from a foo(<param_value>) style call */
       
  9898             if (IN_param_value == NULL)
       
  9899               IN_param_value = function_call_param_iterator.next_nf();
       
  9900             if (IN_param_value != NULL) {
       
  9901               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9902               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9903             }
       
  9904             
       
  9905             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9906             {
       
  9907         
       
  9908                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9909                 
       
  9910                 if (IN_type_symbol == NULL)
       
  9911                   IN_type_symbol = last_type_symbol;
       
  9912                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9913                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9914                 function_type_prefix = return_type_symbol;
       
  9915                 function_type_suffix = IN_type_symbol;
       
  9916                 break;
       
  9917                 
       
  9918             }
       
  9919             
       
  9920             
       
  9921             ERROR;
       
  9922         }
       
  9923         
       
  9924     }/*function_uint_to_bool*/
       
  9925     break;
       
  9926 
       
  9927 /****
       
  9928  *UINT_TO_TIME
       
  9929  */
       
  9930     case function_uint_to_time :
       
  9931     {
       
  9932         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9933 
       
  9934         {
       
  9935             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9937             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9938             symbol_c *IN_type_symbol = NULL;
       
  9939             
       
  9940             /* Get the value from a foo(<param_value>) style call */
       
  9941             if (IN_param_value == NULL)
       
  9942               IN_param_value = function_call_param_iterator.next_nf();
       
  9943             if (IN_param_value != NULL) {
       
  9944               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9945               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9946             }
       
  9947             
       
  9948             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9949             {
       
  9950         
       
  9951                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9952                 
       
  9953                 if (IN_type_symbol == NULL)
       
  9954                   IN_type_symbol = last_type_symbol;
       
  9955                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9957                 function_type_prefix = return_type_symbol;
       
  9958                 break;
       
  9959                 
       
  9960             }
       
  9961             
       
  9962             
       
  9963             ERROR;
       
  9964         }
       
  9965         
       
  9966     }/*function_uint_to_time*/
       
  9967     break;
       
  9968 
       
  9969 /****
       
  9970  *UINT_TO_INT
       
  9971  */
       
  9972     case function_uint_to_int :
       
  9973     {
       
  9974         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
       
  9975 
       
  9976         {
       
  9977             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9978             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9979             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9980             symbol_c *IN_type_symbol = NULL;
       
  9981             
       
  9982             /* Get the value from a foo(<param_value>) style call */
       
  9983             if (IN_param_value == NULL)
       
  9984               IN_param_value = function_call_param_iterator.next_nf();
       
  9985             if (IN_param_value != NULL) {
       
  9986               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9987               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9988             }
       
  9989             
       
  9990             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9991             {
       
  9992         
       
  9993                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9994                 
       
  9995                 if (IN_type_symbol == NULL)
       
  9996                   IN_type_symbol = last_type_symbol;
       
  9997                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9998                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9999                 function_type_prefix = return_type_symbol;
       
 10000                 function_type_suffix = IN_type_symbol;
       
 10001                 break;
       
 10002                 
       
 10003             }
       
 10004             
       
 10005             
       
 10006             ERROR;
       
 10007         }
       
 10008         
       
 10009     }/*function_uint_to_int*/
       
 10010     break;
       
 10011 
       
 10012 /****
       
 10013  *LREAL_TO_REAL
       
 10014  */
       
 10015     case function_lreal_to_real :
       
 10016     {
       
 10017         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10018 
       
 10019         {
       
 10020             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10021             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10022             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10023             symbol_c *IN_type_symbol = NULL;
       
 10024             
       
 10025             /* Get the value from a foo(<param_value>) style call */
       
 10026             if (IN_param_value == NULL)
       
 10027               IN_param_value = function_call_param_iterator.next_nf();
       
 10028             if (IN_param_value != NULL) {
       
 10029               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10030               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10031             }
       
 10032             
       
 10033             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10034             {
       
 10035         
       
 10036                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10037                 
       
 10038                 if (IN_type_symbol == NULL)
       
 10039                   IN_type_symbol = last_type_symbol;
       
 10040                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10041                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10042                 function_type_prefix = return_type_symbol;
       
 10043                 function_type_suffix = IN_type_symbol;
       
 10044                 break;
       
 10045                 
       
 10046             }
       
 10047             
       
 10048             
       
 10049             ERROR;
       
 10050         }
       
 10051         
       
 10052     }/*function_lreal_to_real*/
       
 10053     break;
       
 10054 
       
 10055 /****
       
 10056  *LREAL_TO_SINT
       
 10057  */
       
 10058     case function_lreal_to_sint :
       
 10059     {
       
 10060         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10061 
       
 10062         {
       
 10063             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10065             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10066             symbol_c *IN_type_symbol = NULL;
       
 10067             
       
 10068             /* Get the value from a foo(<param_value>) style call */
       
 10069             if (IN_param_value == NULL)
       
 10070               IN_param_value = function_call_param_iterator.next_nf();
       
 10071             if (IN_param_value != NULL) {
       
 10072               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10073               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10074             }
       
 10075             
       
 10076             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10077             {
       
 10078         
       
 10079                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10080                 
       
 10081                 if (IN_type_symbol == NULL)
       
 10082                   IN_type_symbol = last_type_symbol;
       
 10083                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10085                 function_type_prefix = return_type_symbol;
       
 10086                 break;
       
 10087                 
       
 10088             }
       
 10089             
       
 10090             
       
 10091             ERROR;
       
 10092         }
       
 10093         
       
 10094     }/*function_lreal_to_sint*/
       
 10095     break;
       
 10096 
       
 10097 /****
       
 10098  *LREAL_TO_LINT
       
 10099  */
       
 10100     case function_lreal_to_lint :
       
 10101     {
       
 10102         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10103 
       
 10104         {
       
 10105             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10106             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10107             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10108             symbol_c *IN_type_symbol = NULL;
       
 10109             
       
 10110             /* Get the value from a foo(<param_value>) style call */
       
 10111             if (IN_param_value == NULL)
       
 10112               IN_param_value = function_call_param_iterator.next_nf();
       
 10113             if (IN_param_value != NULL) {
       
 10114               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10115               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10116             }
       
 10117             
       
 10118             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10119             {
       
 10120         
       
 10121                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10122                 
       
 10123                 if (IN_type_symbol == NULL)
       
 10124                   IN_type_symbol = last_type_symbol;
       
 10125                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10126                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10127                 function_type_prefix = return_type_symbol;
       
 10128                 break;
       
 10129                 
       
 10130             }
       
 10131             
       
 10132             
       
 10133             ERROR;
       
 10134         }
       
 10135         
       
 10136     }/*function_lreal_to_lint*/
       
 10137     break;
       
 10138 
       
 10139 /****
       
 10140  *LREAL_TO_DINT
       
 10141  */
       
 10142     case function_lreal_to_dint :
       
 10143     {
       
 10144         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10145 
       
 10146         {
       
 10147             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10148             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10149             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10150             symbol_c *IN_type_symbol = NULL;
       
 10151             
       
 10152             /* Get the value from a foo(<param_value>) style call */
       
 10153             if (IN_param_value == NULL)
       
 10154               IN_param_value = function_call_param_iterator.next_nf();
       
 10155             if (IN_param_value != NULL) {
       
 10156               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10157               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10158             }
       
 10159             
       
 10160             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10161             {
       
 10162         
       
 10163                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10164                 
       
 10165                 if (IN_type_symbol == NULL)
       
 10166                   IN_type_symbol = last_type_symbol;
       
 10167                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10168                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10169                 function_type_prefix = return_type_symbol;
       
 10170                 break;
       
 10171                 
       
 10172             }
       
 10173             
       
 10174             
       
 10175             ERROR;
       
 10176         }
       
 10177         
       
 10178     }/*function_lreal_to_dint*/
       
 10179     break;
       
 10180 
       
 10181 /****
       
 10182  *LREAL_TO_DATE
       
 10183  */
       
 10184     case function_lreal_to_date :
       
 10185     {
       
 10186         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10187 
       
 10188         {
       
 10189             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10190             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10191             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10192             symbol_c *IN_type_symbol = NULL;
       
 10193             
       
 10194             /* Get the value from a foo(<param_value>) style call */
       
 10195             if (IN_param_value == NULL)
       
 10196               IN_param_value = function_call_param_iterator.next_nf();
       
 10197             if (IN_param_value != NULL) {
       
 10198               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10199               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10200             }
       
 10201             
       
 10202             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10203             {
       
 10204         
       
 10205                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10206                 
       
 10207                 if (IN_type_symbol == NULL)
       
 10208                   IN_type_symbol = last_type_symbol;
       
 10209                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10210                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10211                 function_type_prefix = return_type_symbol;
       
 10212                 break;
       
 10213                 
       
 10214             }
       
 10215             
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_lreal_to_date*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *LREAL_TO_DWORD
       
 10225  */
       
 10226     case function_lreal_to_dword :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10229 
       
 10230         {
       
 10231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10234             symbol_c *IN_type_symbol = NULL;
       
 10235             
       
 10236             /* Get the value from a foo(<param_value>) style call */
       
 10237             if (IN_param_value == NULL)
       
 10238               IN_param_value = function_call_param_iterator.next_nf();
       
 10239             if (IN_param_value != NULL) {
       
 10240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10241               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10242             }
       
 10243             
       
 10244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10245             {
       
 10246         
       
 10247                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10248                 
       
 10249                 if (IN_type_symbol == NULL)
       
 10250                   IN_type_symbol = last_type_symbol;
       
 10251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10252                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10253                 function_type_prefix = return_type_symbol;
       
 10254                 break;
       
 10255                 
       
 10256             }
       
 10257             
       
 10258             
       
 10259             ERROR;
       
 10260         }
       
 10261         
       
 10262     }/*function_lreal_to_dword*/
       
 10263     break;
       
 10264 
       
 10265 /****
       
 10266  *LREAL_TO_DT
       
 10267  */
       
 10268     case function_lreal_to_dt :
       
 10269     {
       
 10270         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10271 
       
 10272         {
       
 10273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10275             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10276             symbol_c *IN_type_symbol = NULL;
       
 10277             
       
 10278             /* Get the value from a foo(<param_value>) style call */
       
 10279             if (IN_param_value == NULL)
       
 10280               IN_param_value = function_call_param_iterator.next_nf();
       
 10281             if (IN_param_value != NULL) {
       
 10282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10283               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10284             }
       
 10285             
       
 10286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10287             {
       
 10288         
       
 10289                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10290                 
       
 10291                 if (IN_type_symbol == NULL)
       
 10292                   IN_type_symbol = last_type_symbol;
       
 10293                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10294                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10295                 function_type_prefix = return_type_symbol;
       
 10296                 break;
       
 10297                 
       
 10298             }
       
 10299             
       
 10300             
       
 10301             ERROR;
       
 10302         }
       
 10303         
       
 10304     }/*function_lreal_to_dt*/
       
 10305     break;
       
 10306 
       
 10307 /****
       
 10308  *LREAL_TO_TOD
       
 10309  */
       
 10310     case function_lreal_to_tod :
       
 10311     {
       
 10312         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10313 
       
 10314         {
       
 10315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10318             symbol_c *IN_type_symbol = NULL;
       
 10319             
       
 10320             /* Get the value from a foo(<param_value>) style call */
       
 10321             if (IN_param_value == NULL)
       
 10322               IN_param_value = function_call_param_iterator.next_nf();
       
 10323             if (IN_param_value != NULL) {
       
 10324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10326             }
       
 10327             
       
 10328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10329             {
       
 10330         
       
 10331                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10332                 
       
 10333                 if (IN_type_symbol == NULL)
       
 10334                   IN_type_symbol = last_type_symbol;
       
 10335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10336                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10337                 function_type_prefix = return_type_symbol;
       
 10338                 break;
       
 10339                 
       
 10340             }
       
 10341             
       
 10342             
       
 10343             ERROR;
       
 10344         }
       
 10345         
       
 10346     }/*function_lreal_to_tod*/
       
 10347     break;
       
 10348 
       
 10349 /****
       
 10350  *LREAL_TO_UDINT
       
 10351  */
       
 10352     case function_lreal_to_udint :
       
 10353     {
       
 10354         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10355 
       
 10356         {
       
 10357             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10359             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10360             symbol_c *IN_type_symbol = NULL;
       
 10361             
       
 10362             /* Get the value from a foo(<param_value>) style call */
       
 10363             if (IN_param_value == NULL)
       
 10364               IN_param_value = function_call_param_iterator.next_nf();
       
 10365             if (IN_param_value != NULL) {
       
 10366               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             }
       
 10369             
       
 10370             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10371             {
       
 10372         
       
 10373                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10374                 
       
 10375                 if (IN_type_symbol == NULL)
       
 10376                   IN_type_symbol = last_type_symbol;
       
 10377                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10378                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10379                 function_type_prefix = return_type_symbol;
       
 10380                 break;
       
 10381                 
       
 10382             }
       
 10383             
       
 10384             
       
 10385             ERROR;
       
 10386         }
       
 10387         
       
 10388     }/*function_lreal_to_udint*/
       
 10389     break;
       
 10390 
       
 10391 /****
       
 10392  *LREAL_TO_WORD
       
 10393  */
       
 10394     case function_lreal_to_word :
       
 10395     {
       
 10396         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10397 
       
 10398         {
       
 10399             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10401             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10402             symbol_c *IN_type_symbol = NULL;
       
 10403             
       
 10404             /* Get the value from a foo(<param_value>) style call */
       
 10405             if (IN_param_value == NULL)
       
 10406               IN_param_value = function_call_param_iterator.next_nf();
       
 10407             if (IN_param_value != NULL) {
       
 10408               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10409               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10410             }
       
 10411             
       
 10412             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10413             {
       
 10414         
       
 10415                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10416                 
       
 10417                 if (IN_type_symbol == NULL)
       
 10418                   IN_type_symbol = last_type_symbol;
       
 10419                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10421                 function_type_prefix = return_type_symbol;
       
 10422                 break;
       
 10423                 
       
 10424             }
       
 10425             
       
 10426             
       
 10427             ERROR;
       
 10428         }
       
 10429         
       
 10430     }/*function_lreal_to_word*/
       
 10431     break;
       
 10432 
       
 10433 /****
       
 10434  *LREAL_TO_STRING
       
 10435  */
       
 10436     case function_lreal_to_string :
       
 10437     {
       
 10438         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10439 
       
 10440         {
       
 10441             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10442             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10443             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10444             symbol_c *IN_type_symbol = NULL;
       
 10445             
       
 10446             /* Get the value from a foo(<param_value>) style call */
       
 10447             if (IN_param_value == NULL)
       
 10448               IN_param_value = function_call_param_iterator.next_nf();
       
 10449             if (IN_param_value != NULL) {
       
 10450               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10451               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10452             }
       
 10453             
       
 10454             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10455             {
       
 10456         
       
 10457                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
       
 10458                 
       
 10459                 if (IN_type_symbol == NULL)
       
 10460                   IN_type_symbol = last_type_symbol;
       
 10461                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10462                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10463                 function_type_prefix = return_type_symbol;
       
 10464                 break;
       
 10465                 
       
 10466             }
       
 10467             
       
 10468             
       
 10469             ERROR;
       
 10470         }
       
 10471         
       
 10472     }/*function_lreal_to_string*/
       
 10473     break;
       
 10474 
       
 10475 /****
       
 10476  *LREAL_TO_LWORD
       
 10477  */
       
 10478     case function_lreal_to_lword :
       
 10479     {
       
 10480         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10481 
       
 10482         {
       
 10483             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10485             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10486             symbol_c *IN_type_symbol = NULL;
       
 10487             
       
 10488             /* Get the value from a foo(<param_value>) style call */
       
 10489             if (IN_param_value == NULL)
       
 10490               IN_param_value = function_call_param_iterator.next_nf();
       
 10491             if (IN_param_value != NULL) {
       
 10492               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10493               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10494             }
       
 10495             
       
 10496             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10497             {
       
 10498         
       
 10499                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10500                 
       
 10501                 if (IN_type_symbol == NULL)
       
 10502                   IN_type_symbol = last_type_symbol;
       
 10503                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10504                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10505                 function_type_prefix = return_type_symbol;
       
 10506                 break;
       
 10507                 
       
 10508             }
       
 10509             
       
 10510             
       
 10511             ERROR;
       
 10512         }
       
 10513         
       
 10514     }/*function_lreal_to_lword*/
       
 10515     break;
       
 10516 
       
 10517 /****
       
 10518  *LREAL_TO_UINT
       
 10519  */
       
 10520     case function_lreal_to_uint :
       
 10521     {
       
 10522         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10523 
       
 10524         {
       
 10525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10526             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10527             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10528             symbol_c *IN_type_symbol = NULL;
       
 10529             
       
 10530             /* Get the value from a foo(<param_value>) style call */
       
 10531             if (IN_param_value == NULL)
       
 10532               IN_param_value = function_call_param_iterator.next_nf();
       
 10533             if (IN_param_value != NULL) {
       
 10534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10535               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10536             }
       
 10537             
       
 10538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10539             {
       
 10540         
       
 10541                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10542                 
       
 10543                 if (IN_type_symbol == NULL)
       
 10544                   IN_type_symbol = last_type_symbol;
       
 10545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10546                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10547                 function_type_prefix = return_type_symbol;
       
 10548                 break;
       
 10549                 
       
 10550             }
       
 10551             
       
 10552             
       
 10553             ERROR;
       
 10554         }
       
 10555         
       
 10556     }/*function_lreal_to_uint*/
       
 10557     break;
       
 10558 
       
 10559 /****
       
 10560  *LREAL_TO_BYTE
       
 10561  */
       
 10562     case function_lreal_to_byte :
       
 10563     {
       
 10564         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10565 
       
 10566         {
       
 10567             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10569             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10570             symbol_c *IN_type_symbol = NULL;
       
 10571             
       
 10572             /* Get the value from a foo(<param_value>) style call */
       
 10573             if (IN_param_value == NULL)
       
 10574               IN_param_value = function_call_param_iterator.next_nf();
       
 10575             if (IN_param_value != NULL) {
       
 10576               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10577               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10578             }
       
 10579             
       
 10580             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10581             {
       
 10582         
       
 10583                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10584                 
       
 10585                 if (IN_type_symbol == NULL)
       
 10586                   IN_type_symbol = last_type_symbol;
       
 10587                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10589                 function_type_prefix = return_type_symbol;
       
 10590                 break;
       
 10591                 
       
 10592             }
       
 10593             
       
 10594             
       
 10595             ERROR;
       
 10596         }
       
 10597         
       
 10598     }/*function_lreal_to_byte*/
       
 10599     break;
       
 10600 
       
 10601 /****
       
 10602  *LREAL_TO_USINT
       
 10603  */
       
 10604     case function_lreal_to_usint :
       
 10605     {
       
 10606         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10607 
       
 10608         {
       
 10609             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10611             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10612             symbol_c *IN_type_symbol = NULL;
       
 10613             
       
 10614             /* Get the value from a foo(<param_value>) style call */
       
 10615             if (IN_param_value == NULL)
       
 10616               IN_param_value = function_call_param_iterator.next_nf();
       
 10617             if (IN_param_value != NULL) {
       
 10618               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10619               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10620             }
       
 10621             
       
 10622             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10623             {
       
 10624         
       
 10625                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10626                 
       
 10627                 if (IN_type_symbol == NULL)
       
 10628                   IN_type_symbol = last_type_symbol;
       
 10629                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10630                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10631                 function_type_prefix = return_type_symbol;
       
 10632                 break;
       
 10633                 
       
 10634             }
       
 10635             
       
 10636             
       
 10637             ERROR;
       
 10638         }
       
 10639         
       
 10640     }/*function_lreal_to_usint*/
       
 10641     break;
       
 10642 
       
 10643 /****
       
 10644  *LREAL_TO_ULINT
       
 10645  */
       
 10646     case function_lreal_to_ulint :
       
 10647     {
       
 10648         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10649 
       
 10650         {
       
 10651             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10653             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10654             symbol_c *IN_type_symbol = NULL;
       
 10655             
       
 10656             /* Get the value from a foo(<param_value>) style call */
       
 10657             if (IN_param_value == NULL)
       
 10658               IN_param_value = function_call_param_iterator.next_nf();
       
 10659             if (IN_param_value != NULL) {
       
 10660               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10661               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10662             }
       
 10663             
       
 10664             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10665             {
       
 10666         
       
 10667                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10668                 
       
 10669                 if (IN_type_symbol == NULL)
       
 10670                   IN_type_symbol = last_type_symbol;
       
 10671                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10672                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10673                 function_type_prefix = return_type_symbol;
       
 10674                 break;
       
 10675                 
       
 10676             }
       
 10677             
       
 10678             
       
 10679             ERROR;
       
 10680         }
       
 10681         
       
 10682     }/*function_lreal_to_ulint*/
       
 10683     break;
       
 10684 
       
 10685 /****
       
 10686  *LREAL_TO_BOOL
       
 10687  */
       
 10688     case function_lreal_to_bool :
       
 10689     {
       
 10690         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10691 
       
 10692         {
       
 10693             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10694             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10695             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10696             symbol_c *IN_type_symbol = NULL;
       
 10697             
       
 10698             /* Get the value from a foo(<param_value>) style call */
       
 10699             if (IN_param_value == NULL)
       
 10700               IN_param_value = function_call_param_iterator.next_nf();
       
 10701             if (IN_param_value != NULL) {
       
 10702               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10703               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10704             }
       
 10705             
       
 10706             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10707             {
       
 10708         
       
 10709                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10710                 
       
 10711                 if (IN_type_symbol == NULL)
       
 10712                   IN_type_symbol = last_type_symbol;
       
 10713                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10714                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10715                 function_type_prefix = return_type_symbol;
       
 10716                 break;
       
 10717                 
       
 10718             }
       
 10719             
       
 10720             
       
 10721             ERROR;
       
 10722         }
       
 10723         
       
 10724     }/*function_lreal_to_bool*/
       
 10725     break;
       
 10726 
       
 10727 /****
       
 10728  *LREAL_TO_TIME
       
 10729  */
       
 10730     case function_lreal_to_time :
       
 10731     {
       
 10732         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10733 
       
 10734         {
       
 10735             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10737             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10738             symbol_c *IN_type_symbol = NULL;
       
 10739             
       
 10740             /* Get the value from a foo(<param_value>) style call */
       
 10741             if (IN_param_value == NULL)
       
 10742               IN_param_value = function_call_param_iterator.next_nf();
       
 10743             if (IN_param_value != NULL) {
       
 10744               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10745               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10746             }
       
 10747             
       
 10748             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10749             {
       
 10750         
       
 10751                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10752                 
       
 10753                 if (IN_type_symbol == NULL)
       
 10754                   IN_type_symbol = last_type_symbol;
       
 10755                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10757                 function_type_prefix = return_type_symbol;
       
 10758                 break;
       
 10759                 
       
 10760             }
       
 10761             
       
 10762             
       
 10763             ERROR;
       
 10764         }
       
 10765         
       
 10766     }/*function_lreal_to_time*/
       
 10767     break;
       
 10768 
       
 10769 /****
       
 10770  *LREAL_TO_INT
       
 10771  */
       
 10772     case function_lreal_to_int :
       
 10773     {
       
 10774         symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10775 
       
 10776         {
       
 10777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10780             symbol_c *IN_type_symbol = NULL;
       
 10781             
       
 10782             /* Get the value from a foo(<param_value>) style call */
       
 10783             if (IN_param_value == NULL)
       
 10784               IN_param_value = function_call_param_iterator.next_nf();
       
 10785             if (IN_param_value != NULL) {
       
 10786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10787               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10788             }
       
 10789             
       
 10790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10791             {
       
 10792         
       
 10793                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10794                 
       
 10795                 if (IN_type_symbol == NULL)
       
 10796                   IN_type_symbol = last_type_symbol;
       
 10797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10798                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10799                 function_type_prefix = return_type_symbol;
       
 10800                 break;
       
 10801                 
       
 10802             }
       
 10803             
       
 10804             
       
 10805             ERROR;
       
 10806         }
       
 10807         
       
 10808     }/*function_lreal_to_int*/
       
 10809     break;
       
 10810 
       
 10811 /****
       
 10812  *BYTE_TO_REAL
       
 10813  */
       
 10814     case function_byte_to_real :
       
 10815     {
       
 10816         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 10817 
       
 10818         {
       
 10819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10822             symbol_c *IN_type_symbol = NULL;
       
 10823             
       
 10824             /* Get the value from a foo(<param_value>) style call */
       
 10825             if (IN_param_value == NULL)
       
 10826               IN_param_value = function_call_param_iterator.next_nf();
       
 10827             if (IN_param_value != NULL) {
       
 10828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10830             }
       
 10831             
       
 10832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10833             {
       
 10834         
       
 10835                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10836                 
       
 10837                 if (IN_type_symbol == NULL)
       
 10838                   IN_type_symbol = last_type_symbol;
       
 10839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10840                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10841                 function_type_prefix = return_type_symbol;
       
 10842                 function_type_suffix = IN_type_symbol;
       
 10843                 break;
       
 10844                 
       
 10845             }
       
 10846             
       
 10847             
       
 10848             ERROR;
       
 10849         }
       
 10850         
       
 10851     }/*function_byte_to_real*/
       
 10852     break;
       
 10853 
       
 10854 /****
       
 10855  *BYTE_TO_SINT
       
 10856  */
       
 10857     case function_byte_to_sint :
       
 10858     {
       
 10859         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 10860 
       
 10861         {
       
 10862             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10864             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10865             symbol_c *IN_type_symbol = NULL;
       
 10866             
       
 10867             /* Get the value from a foo(<param_value>) style call */
       
 10868             if (IN_param_value == NULL)
       
 10869               IN_param_value = function_call_param_iterator.next_nf();
       
 10870             if (IN_param_value != NULL) {
       
 10871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10873             }
       
 10874             
       
 10875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10876             {
       
 10877         
       
 10878                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10879                 
       
 10880                 if (IN_type_symbol == NULL)
       
 10881                   IN_type_symbol = last_type_symbol;
       
 10882                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10883                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10884                 function_type_prefix = return_type_symbol;
       
 10885                 function_type_suffix = IN_type_symbol;
       
 10886                 break;
       
 10887                 
       
 10888             }
       
 10889             
       
 10890             
       
 10891             ERROR;
       
 10892         }
       
 10893         
       
 10894     }/*function_byte_to_sint*/
       
 10895     break;
       
 10896 
       
 10897 /****
       
 10898  *BYTE_TO_LINT
       
 10899  */
       
 10900     case function_byte_to_lint :
       
 10901     {
       
 10902         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 10903 
       
 10904         {
       
 10905             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10907             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10908             symbol_c *IN_type_symbol = NULL;
       
 10909             
       
 10910             /* Get the value from a foo(<param_value>) style call */
       
 10911             if (IN_param_value == NULL)
       
 10912               IN_param_value = function_call_param_iterator.next_nf();
       
 10913             if (IN_param_value != NULL) {
       
 10914               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10915               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10916             }
       
 10917             
       
 10918             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10919             {
       
 10920         
       
 10921                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10922                 
       
 10923                 if (IN_type_symbol == NULL)
       
 10924                   IN_type_symbol = last_type_symbol;
       
 10925                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10926                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10927                 function_type_prefix = return_type_symbol;
       
 10928                 function_type_suffix = IN_type_symbol;
       
 10929                 break;
       
 10930                 
       
 10931             }
       
 10932             
       
 10933             
       
 10934             ERROR;
       
 10935         }
       
 10936         
       
 10937     }/*function_byte_to_lint*/
       
 10938     break;
       
 10939 
       
 10940 /****
       
 10941  *BYTE_TO_DINT
       
 10942  */
       
 10943     case function_byte_to_dint :
       
 10944     {
       
 10945         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 10946 
       
 10947         {
       
 10948             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10949             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10950             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10951             symbol_c *IN_type_symbol = NULL;
       
 10952             
       
 10953             /* Get the value from a foo(<param_value>) style call */
       
 10954             if (IN_param_value == NULL)
       
 10955               IN_param_value = function_call_param_iterator.next_nf();
       
 10956             if (IN_param_value != NULL) {
       
 10957               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10958               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10959             }
       
 10960             
       
 10961             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10962             {
       
 10963         
       
 10964                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10965                 
       
 10966                 if (IN_type_symbol == NULL)
       
 10967                   IN_type_symbol = last_type_symbol;
       
 10968                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10969                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10970                 function_type_prefix = return_type_symbol;
       
 10971                 function_type_suffix = IN_type_symbol;
       
 10972                 break;
       
 10973                 
       
 10974             }
       
 10975             
       
 10976             
       
 10977             ERROR;
       
 10978         }
       
 10979         
       
 10980     }/*function_byte_to_dint*/
       
 10981     break;
       
 10982 
       
 10983 /****
       
 10984  *BYTE_TO_DATE
       
 10985  */
       
 10986     case function_byte_to_date :
       
 10987     {
       
 10988         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 10989 
       
 10990         {
       
 10991             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10993             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10994             symbol_c *IN_type_symbol = NULL;
       
 10995             
       
 10996             /* Get the value from a foo(<param_value>) style call */
       
 10997             if (IN_param_value == NULL)
       
 10998               IN_param_value = function_call_param_iterator.next_nf();
       
 10999             if (IN_param_value != NULL) {
       
 11000               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11001               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11002             }
       
 11003             
       
 11004             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11005             {
       
 11006         
       
 11007                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11008                 
       
 11009                 if (IN_type_symbol == NULL)
       
 11010                   IN_type_symbol = last_type_symbol;
       
 11011                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11013                 function_type_prefix = return_type_symbol;
       
 11014                 break;
       
 11015                 
       
 11016             }
       
 11017             
       
 11018             
       
 11019             ERROR;
       
 11020         }
       
 11021         
       
 11022     }/*function_byte_to_date*/
       
 11023     break;
       
 11024 
       
 11025 /****
       
 11026  *BYTE_TO_DWORD
       
 11027  */
       
 11028     case function_byte_to_dword :
       
 11029     {
       
 11030         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11031 
       
 11032         {
       
 11033             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11034             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11035             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11036             symbol_c *IN_type_symbol = NULL;
       
 11037             
       
 11038             /* Get the value from a foo(<param_value>) style call */
       
 11039             if (IN_param_value == NULL)
       
 11040               IN_param_value = function_call_param_iterator.next_nf();
       
 11041             if (IN_param_value != NULL) {
       
 11042               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11043               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11044             }
       
 11045             
       
 11046             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11047             {
       
 11048         
       
 11049                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11050                 
       
 11051                 if (IN_type_symbol == NULL)
       
 11052                   IN_type_symbol = last_type_symbol;
       
 11053                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11054                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11055                 function_type_prefix = return_type_symbol;
       
 11056                 function_type_suffix = IN_type_symbol;
       
 11057                 break;
       
 11058                 
       
 11059             }
       
 11060             
       
 11061             
       
 11062             ERROR;
       
 11063         }
       
 11064         
       
 11065     }/*function_byte_to_dword*/
       
 11066     break;
       
 11067 
       
 11068 /****
       
 11069  *BYTE_TO_DT
       
 11070  */
       
 11071     case function_byte_to_dt :
       
 11072     {
       
 11073         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11074 
       
 11075         {
       
 11076             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11078             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11079             symbol_c *IN_type_symbol = NULL;
       
 11080             
       
 11081             /* Get the value from a foo(<param_value>) style call */
       
 11082             if (IN_param_value == NULL)
       
 11083               IN_param_value = function_call_param_iterator.next_nf();
       
 11084             if (IN_param_value != NULL) {
       
 11085               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11086               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11087             }
       
 11088             
       
 11089             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11090             {
       
 11091         
       
 11092                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11093                 
       
 11094                 if (IN_type_symbol == NULL)
       
 11095                   IN_type_symbol = last_type_symbol;
       
 11096                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11097                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11098                 function_type_prefix = return_type_symbol;
       
 11099                 break;
       
 11100                 
       
 11101             }
       
 11102             
       
 11103             
       
 11104             ERROR;
       
 11105         }
       
 11106         
       
 11107     }/*function_byte_to_dt*/
       
 11108     break;
       
 11109 
       
 11110 /****
       
 11111  *BYTE_TO_TOD
       
 11112  */
       
 11113     case function_byte_to_tod :
       
 11114     {
       
 11115         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11116 
       
 11117         {
       
 11118             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11119             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11120             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11121             symbol_c *IN_type_symbol = NULL;
       
 11122             
       
 11123             /* Get the value from a foo(<param_value>) style call */
       
 11124             if (IN_param_value == NULL)
       
 11125               IN_param_value = function_call_param_iterator.next_nf();
       
 11126             if (IN_param_value != NULL) {
       
 11127               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11128               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11129             }
       
 11130             
       
 11131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11132             {
       
 11133         
       
 11134                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11135                 
       
 11136                 if (IN_type_symbol == NULL)
       
 11137                   IN_type_symbol = last_type_symbol;
       
 11138                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11139                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11140                 function_type_prefix = return_type_symbol;
       
 11141                 break;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             
       
 11146             ERROR;
       
 11147         }
       
 11148         
       
 11149     }/*function_byte_to_tod*/
       
 11150     break;
       
 11151 
       
 11152 /****
       
 11153  *BYTE_TO_UDINT
       
 11154  */
       
 11155     case function_byte_to_udint :
       
 11156     {
       
 11157         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11158 
       
 11159         {
       
 11160             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11162             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11163             symbol_c *IN_type_symbol = NULL;
       
 11164             
       
 11165             /* Get the value from a foo(<param_value>) style call */
       
 11166             if (IN_param_value == NULL)
       
 11167               IN_param_value = function_call_param_iterator.next_nf();
       
 11168             if (IN_param_value != NULL) {
       
 11169               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11170               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11171             }
       
 11172             
       
 11173             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11174             {
       
 11175         
       
 11176                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11177                 
       
 11178                 if (IN_type_symbol == NULL)
       
 11179                   IN_type_symbol = last_type_symbol;
       
 11180                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11181                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11182                 function_type_prefix = return_type_symbol;
       
 11183                 function_type_suffix = IN_type_symbol;
       
 11184                 break;
       
 11185                 
       
 11186             }
       
 11187             
       
 11188             
       
 11189             ERROR;
       
 11190         }
       
 11191         
       
 11192     }/*function_byte_to_udint*/
       
 11193     break;
       
 11194 
       
 11195 /****
       
 11196  *BYTE_TO_WORD
       
 11197  */
       
 11198     case function_byte_to_word :
       
 11199     {
       
 11200         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11201 
       
 11202         {
       
 11203             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11205             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11206             symbol_c *IN_type_symbol = NULL;
       
 11207             
       
 11208             /* Get the value from a foo(<param_value>) style call */
       
 11209             if (IN_param_value == NULL)
       
 11210               IN_param_value = function_call_param_iterator.next_nf();
       
 11211             if (IN_param_value != NULL) {
       
 11212               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11213               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11214             }
       
 11215             
       
 11216             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11217             {
       
 11218         
       
 11219                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11220                 
       
 11221                 if (IN_type_symbol == NULL)
       
 11222                   IN_type_symbol = last_type_symbol;
       
 11223                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11224                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11225                 function_type_prefix = return_type_symbol;
       
 11226                 function_type_suffix = IN_type_symbol;
       
 11227                 break;
       
 11228                 
       
 11229             }
       
 11230             
       
 11231             
       
 11232             ERROR;
       
 11233         }
       
 11234         
       
 11235     }/*function_byte_to_word*/
       
 11236     break;
       
 11237 
       
 11238 /****
       
 11239  *BYTE_TO_STRING
       
 11240  */
       
 11241     case function_byte_to_string :
       
 11242     {
       
 11243         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11244 
       
 11245         {
       
 11246             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11248             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11249             symbol_c *IN_type_symbol = NULL;
       
 11250             
       
 11251             /* Get the value from a foo(<param_value>) style call */
       
 11252             if (IN_param_value == NULL)
       
 11253               IN_param_value = function_call_param_iterator.next_nf();
       
 11254             if (IN_param_value != NULL) {
       
 11255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11257             }
       
 11258             
       
 11259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11260             {
       
 11261         
       
 11262                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
 11263                 
       
 11264                 if (IN_type_symbol == NULL)
       
 11265                   IN_type_symbol = last_type_symbol;
       
 11266                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11267                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11268                 function_type_prefix = return_type_symbol;
       
 11269                 break;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             
       
 11274             ERROR;
       
 11275         }
       
 11276         
       
 11277     }/*function_byte_to_string*/
       
 11278     break;
       
 11279 
       
 11280 /****
       
 11281  *BYTE_TO_LWORD
       
 11282  */
       
 11283     case function_byte_to_lword :
       
 11284     {
       
 11285         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11286 
       
 11287         {
       
 11288             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11289             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11290             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11291             symbol_c *IN_type_symbol = NULL;
       
 11292             
       
 11293             /* Get the value from a foo(<param_value>) style call */
       
 11294             if (IN_param_value == NULL)
       
 11295               IN_param_value = function_call_param_iterator.next_nf();
       
 11296             if (IN_param_value != NULL) {
       
 11297               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11298               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11299             }
       
 11300             
       
 11301             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11302             {
       
 11303         
       
 11304                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11305                 
       
 11306                 if (IN_type_symbol == NULL)
       
 11307                   IN_type_symbol = last_type_symbol;
       
 11308                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11309                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11310                 function_type_prefix = return_type_symbol;
       
 11311                 function_type_suffix = IN_type_symbol;
       
 11312                 break;
       
 11313                 
       
 11314             }
       
 11315             
       
 11316             
       
 11317             ERROR;
       
 11318         }
       
 11319         
       
 11320     }/*function_byte_to_lword*/
       
 11321     break;
       
 11322 
       
 11323 /****
       
 11324  *BYTE_TO_UINT
       
 11325  */
       
 11326     case function_byte_to_uint :
       
 11327     {
       
 11328         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11329 
       
 11330         {
       
 11331             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11333             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11334             symbol_c *IN_type_symbol = NULL;
       
 11335             
       
 11336             /* Get the value from a foo(<param_value>) style call */
       
 11337             if (IN_param_value == NULL)
       
 11338               IN_param_value = function_call_param_iterator.next_nf();
       
 11339             if (IN_param_value != NULL) {
       
 11340               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11341               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11342             }
       
 11343             
       
 11344             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11345             {
       
 11346         
       
 11347                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11348                 
       
 11349                 if (IN_type_symbol == NULL)
       
 11350                   IN_type_symbol = last_type_symbol;
       
 11351                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11352                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11353                 function_type_prefix = return_type_symbol;
       
 11354                 function_type_suffix = IN_type_symbol;
       
 11355                 break;
       
 11356                 
       
 11357             }
       
 11358             
       
 11359             
       
 11360             ERROR;
       
 11361         }
       
 11362         
       
 11363     }/*function_byte_to_uint*/
       
 11364     break;
       
 11365 
       
 11366 /****
       
 11367  *BYTE_TO_LREAL
       
 11368  */
       
 11369     case function_byte_to_lreal :
       
 11370     {
       
 11371         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11372 
       
 11373         {
       
 11374             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11376             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11377             symbol_c *IN_type_symbol = NULL;
       
 11378             
       
 11379             /* Get the value from a foo(<param_value>) style call */
       
 11380             if (IN_param_value == NULL)
       
 11381               IN_param_value = function_call_param_iterator.next_nf();
       
 11382             if (IN_param_value != NULL) {
       
 11383               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11384               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11385             }
       
 11386             
       
 11387             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11388             {
       
 11389         
       
 11390                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11391                 
       
 11392                 if (IN_type_symbol == NULL)
       
 11393                   IN_type_symbol = last_type_symbol;
       
 11394                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11395                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11396                 function_type_prefix = return_type_symbol;
       
 11397                 function_type_suffix = IN_type_symbol;
       
 11398                 break;
       
 11399                 
       
 11400             }
       
 11401             
       
 11402             
       
 11403             ERROR;
       
 11404         }
       
 11405         
       
 11406     }/*function_byte_to_lreal*/
       
 11407     break;
       
 11408 
       
 11409 /****
       
 11410  *BYTE_TO_USINT
       
 11411  */
       
 11412     case function_byte_to_usint :
       
 11413     {
       
 11414         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11415 
       
 11416         {
       
 11417             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11419             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11420             symbol_c *IN_type_symbol = NULL;
       
 11421             
       
 11422             /* Get the value from a foo(<param_value>) style call */
       
 11423             if (IN_param_value == NULL)
       
 11424               IN_param_value = function_call_param_iterator.next_nf();
       
 11425             if (IN_param_value != NULL) {
       
 11426               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11427               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11428             }
       
 11429             
       
 11430             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11431             {
       
 11432         
       
 11433                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11434                 
       
 11435                 if (IN_type_symbol == NULL)
       
 11436                   IN_type_symbol = last_type_symbol;
       
 11437                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11438                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11439                 function_type_prefix = return_type_symbol;
       
 11440                 function_type_suffix = IN_type_symbol;
       
 11441                 break;
       
 11442                 
       
 11443             }
       
 11444             
       
 11445             
       
 11446             ERROR;
       
 11447         }
       
 11448         
       
 11449     }/*function_byte_to_usint*/
       
 11450     break;
       
 11451 
       
 11452 /****
       
 11453  *BYTE_TO_ULINT
       
 11454  */
       
 11455     case function_byte_to_ulint :
       
 11456     {
       
 11457         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11458 
       
 11459         {
       
 11460             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11462             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11463             symbol_c *IN_type_symbol = NULL;
       
 11464             
       
 11465             /* Get the value from a foo(<param_value>) style call */
       
 11466             if (IN_param_value == NULL)
       
 11467               IN_param_value = function_call_param_iterator.next_nf();
       
 11468             if (IN_param_value != NULL) {
       
 11469               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11470               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11471             }
       
 11472             
       
 11473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11474             {
       
 11475         
       
 11476                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11477                 
       
 11478                 if (IN_type_symbol == NULL)
       
 11479                   IN_type_symbol = last_type_symbol;
       
 11480                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11481                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11482                 function_type_prefix = return_type_symbol;
       
 11483                 function_type_suffix = IN_type_symbol;
       
 11484                 break;
       
 11485                 
       
 11486             }
       
 11487             
       
 11488             
       
 11489             ERROR;
       
 11490         }
       
 11491         
       
 11492     }/*function_byte_to_ulint*/
       
 11493     break;
       
 11494 
       
 11495 /****
       
 11496  *BYTE_TO_BOOL
       
 11497  */
       
 11498     case function_byte_to_bool :
       
 11499     {
       
 11500         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11501 
       
 11502         {
       
 11503             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11505             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11506             symbol_c *IN_type_symbol = NULL;
       
 11507             
       
 11508             /* Get the value from a foo(<param_value>) style call */
       
 11509             if (IN_param_value == NULL)
       
 11510               IN_param_value = function_call_param_iterator.next_nf();
       
 11511             if (IN_param_value != NULL) {
       
 11512               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11513               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11514             }
       
 11515             
       
 11516             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11517             {
       
 11518         
       
 11519                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11520                 
       
 11521                 if (IN_type_symbol == NULL)
       
 11522                   IN_type_symbol = last_type_symbol;
       
 11523                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11525                 function_type_prefix = return_type_symbol;
       
 11526                 function_type_suffix = IN_type_symbol;
       
 11527                 break;
       
 11528                 
       
 11529             }
       
 11530             
       
 11531             
       
 11532             ERROR;
       
 11533         }
       
 11534         
       
 11535     }/*function_byte_to_bool*/
       
 11536     break;
       
 11537 
       
 11538 /****
       
 11539  *BYTE_TO_TIME
       
 11540  */
       
 11541     case function_byte_to_time :
       
 11542     {
       
 11543         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11544 
       
 11545         {
       
 11546             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11548             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11549             symbol_c *IN_type_symbol = NULL;
       
 11550             
       
 11551             /* Get the value from a foo(<param_value>) style call */
       
 11552             if (IN_param_value == NULL)
       
 11553               IN_param_value = function_call_param_iterator.next_nf();
       
 11554             if (IN_param_value != NULL) {
       
 11555               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11556               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11557             }
       
 11558             
       
 11559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11560             {
       
 11561         
       
 11562                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11563                 
       
 11564                 if (IN_type_symbol == NULL)
       
 11565                   IN_type_symbol = last_type_symbol;
       
 11566                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11567                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11568                 function_type_prefix = return_type_symbol;
       
 11569                 break;
       
 11570                 
       
 11571             }
       
 11572             
       
 11573             
       
 11574             ERROR;
       
 11575         }
       
 11576         
       
 11577     }/*function_byte_to_time*/
       
 11578     break;
       
 11579 
       
 11580 /****
       
 11581  *BYTE_TO_INT
       
 11582  */
       
 11583     case function_byte_to_int :
       
 11584     {
       
 11585         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
       
 11586 
       
 11587         {
       
 11588             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11590             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11591             symbol_c *IN_type_symbol = NULL;
       
 11592             
       
 11593             /* Get the value from a foo(<param_value>) style call */
       
 11594             if (IN_param_value == NULL)
       
 11595               IN_param_value = function_call_param_iterator.next_nf();
       
 11596             if (IN_param_value != NULL) {
       
 11597               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11598               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11599             }
       
 11600             
       
 11601             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11602             {
       
 11603         
       
 11604                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11605                 
       
 11606                 if (IN_type_symbol == NULL)
       
 11607                   IN_type_symbol = last_type_symbol;
       
 11608                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11609                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11610                 function_type_prefix = return_type_symbol;
       
 11611                 function_type_suffix = IN_type_symbol;
       
 11612                 break;
       
 11613                 
       
 11614             }
       
 11615             
       
 11616             
       
 11617             ERROR;
       
 11618         }
       
 11619         
       
 11620     }/*function_byte_to_int*/
       
 11621     break;
       
 11622 
       
 11623 /****
       
 11624  *USINT_TO_REAL
       
 11625  */
       
 11626     case function_usint_to_real :
       
 11627     {
       
 11628         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11629 
       
 11630         {
       
 11631             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11633             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11634             symbol_c *IN_type_symbol = NULL;
       
 11635             
       
 11636             /* Get the value from a foo(<param_value>) style call */
       
 11637             if (IN_param_value == NULL)
       
 11638               IN_param_value = function_call_param_iterator.next_nf();
       
 11639             if (IN_param_value != NULL) {
       
 11640               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11641               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11642             }
       
 11643             
       
 11644             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11645             {
       
 11646         
       
 11647                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11648                 
       
 11649                 if (IN_type_symbol == NULL)
       
 11650                   IN_type_symbol = last_type_symbol;
       
 11651                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11653                 function_type_prefix = return_type_symbol;
       
 11654                 function_type_suffix = IN_type_symbol;
       
 11655                 break;
       
 11656                 
       
 11657             }
       
 11658             
       
 11659             
       
 11660             ERROR;
       
 11661         }
       
 11662         
       
 11663     }/*function_usint_to_real*/
       
 11664     break;
       
 11665 
       
 11666 /****
       
 11667  *USINT_TO_SINT
       
 11668  */
       
 11669     case function_usint_to_sint :
       
 11670     {
       
 11671         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11672 
       
 11673         {
       
 11674             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11676             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11677             symbol_c *IN_type_symbol = NULL;
       
 11678             
       
 11679             /* Get the value from a foo(<param_value>) style call */
       
 11680             if (IN_param_value == NULL)
       
 11681               IN_param_value = function_call_param_iterator.next_nf();
       
 11682             if (IN_param_value != NULL) {
       
 11683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11685             }
       
 11686             
       
 11687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11688             {
       
 11689         
       
 11690                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11691                 
       
 11692                 if (IN_type_symbol == NULL)
       
 11693                   IN_type_symbol = last_type_symbol;
       
 11694                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11695                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11696                 function_type_prefix = return_type_symbol;
       
 11697                 function_type_suffix = IN_type_symbol;
       
 11698                 break;
       
 11699                 
       
 11700             }
       
 11701             
       
 11702             
       
 11703             ERROR;
       
 11704         }
       
 11705         
       
 11706     }/*function_usint_to_sint*/
       
 11707     break;
       
 11708 
       
 11709 /****
       
 11710  *USINT_TO_LINT
       
 11711  */
       
 11712     case function_usint_to_lint :
       
 11713     {
       
 11714         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11715 
       
 11716         {
       
 11717             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11718             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11719             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11720             symbol_c *IN_type_symbol = NULL;
       
 11721             
       
 11722             /* Get the value from a foo(<param_value>) style call */
       
 11723             if (IN_param_value == NULL)
       
 11724               IN_param_value = function_call_param_iterator.next_nf();
       
 11725             if (IN_param_value != NULL) {
       
 11726               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11727               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11728             }
       
 11729             
       
 11730             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11731             {
       
 11732         
       
 11733                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11734                 
       
 11735                 if (IN_type_symbol == NULL)
       
 11736                   IN_type_symbol = last_type_symbol;
       
 11737                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11738                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11739                 function_type_prefix = return_type_symbol;
       
 11740                 function_type_suffix = IN_type_symbol;
       
 11741                 break;
       
 11742                 
       
 11743             }
       
 11744             
       
 11745             
       
 11746             ERROR;
       
 11747         }
       
 11748         
       
 11749     }/*function_usint_to_lint*/
       
 11750     break;
       
 11751 
       
 11752 /****
       
 11753  *USINT_TO_DINT
       
 11754  */
       
 11755     case function_usint_to_dint :
       
 11756     {
       
 11757         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11758 
       
 11759         {
       
 11760             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11761             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11762             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11763             symbol_c *IN_type_symbol = NULL;
       
 11764             
       
 11765             /* Get the value from a foo(<param_value>) style call */
       
 11766             if (IN_param_value == NULL)
       
 11767               IN_param_value = function_call_param_iterator.next_nf();
       
 11768             if (IN_param_value != NULL) {
       
 11769               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11770               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11771             }
       
 11772             
       
 11773             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11774             {
       
 11775         
       
 11776                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11777                 
       
 11778                 if (IN_type_symbol == NULL)
       
 11779                   IN_type_symbol = last_type_symbol;
       
 11780                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11781                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11782                 function_type_prefix = return_type_symbol;
       
 11783                 function_type_suffix = IN_type_symbol;
       
 11784                 break;
       
 11785                 
       
 11786             }
       
 11787             
       
 11788             
       
 11789             ERROR;
       
 11790         }
       
 11791         
       
 11792     }/*function_usint_to_dint*/
       
 11793     break;
       
 11794 
       
 11795 /****
       
 11796  *USINT_TO_DATE
       
 11797  */
       
 11798     case function_usint_to_date :
       
 11799     {
       
 11800         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11801 
       
 11802         {
       
 11803             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11804             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11805             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11806             symbol_c *IN_type_symbol = NULL;
       
 11807             
       
 11808             /* Get the value from a foo(<param_value>) style call */
       
 11809             if (IN_param_value == NULL)
       
 11810               IN_param_value = function_call_param_iterator.next_nf();
       
 11811             if (IN_param_value != NULL) {
       
 11812               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11813               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11814             }
       
 11815             
       
 11816             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11817             {
       
 11818         
       
 11819                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11820                 
       
 11821                 if (IN_type_symbol == NULL)
       
 11822                   IN_type_symbol = last_type_symbol;
       
 11823                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11824                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11825                 function_type_prefix = return_type_symbol;
       
 11826                 break;
       
 11827                 
       
 11828             }
       
 11829             
       
 11830             
       
 11831             ERROR;
       
 11832         }
       
 11833         
       
 11834     }/*function_usint_to_date*/
       
 11835     break;
       
 11836 
       
 11837 /****
       
 11838  *USINT_TO_DWORD
       
 11839  */
       
 11840     case function_usint_to_dword :
       
 11841     {
       
 11842         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11843 
       
 11844         {
       
 11845             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11846             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11847             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11848             symbol_c *IN_type_symbol = NULL;
       
 11849             
       
 11850             /* Get the value from a foo(<param_value>) style call */
       
 11851             if (IN_param_value == NULL)
       
 11852               IN_param_value = function_call_param_iterator.next_nf();
       
 11853             if (IN_param_value != NULL) {
       
 11854               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11855               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11856             }
       
 11857             
       
 11858             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11859             {
       
 11860         
       
 11861                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11862                 
       
 11863                 if (IN_type_symbol == NULL)
       
 11864                   IN_type_symbol = last_type_symbol;
       
 11865                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11866                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11867                 function_type_prefix = return_type_symbol;
       
 11868                 function_type_suffix = IN_type_symbol;
       
 11869                 break;
       
 11870                 
       
 11871             }
       
 11872             
       
 11873             
       
 11874             ERROR;
       
 11875         }
       
 11876         
       
 11877     }/*function_usint_to_dword*/
       
 11878     break;
       
 11879 
       
 11880 /****
       
 11881  *USINT_TO_DT
       
 11882  */
       
 11883     case function_usint_to_dt :
       
 11884     {
       
 11885         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11886 
       
 11887         {
       
 11888             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11889             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11890             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11891             symbol_c *IN_type_symbol = NULL;
       
 11892             
       
 11893             /* Get the value from a foo(<param_value>) style call */
       
 11894             if (IN_param_value == NULL)
       
 11895               IN_param_value = function_call_param_iterator.next_nf();
       
 11896             if (IN_param_value != NULL) {
       
 11897               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11898               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11899             }
       
 11900             
       
 11901             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11902             {
       
 11903         
       
 11904                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11905                 
       
 11906                 if (IN_type_symbol == NULL)
       
 11907                   IN_type_symbol = last_type_symbol;
       
 11908                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11909                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11910                 function_type_prefix = return_type_symbol;
       
 11911                 break;
       
 11912                 
       
 11913             }
       
 11914             
       
 11915             
       
 11916             ERROR;
       
 11917         }
       
 11918         
       
 11919     }/*function_usint_to_dt*/
       
 11920     break;
       
 11921 
       
 11922 /****
       
 11923  *USINT_TO_TOD
       
 11924  */
       
 11925     case function_usint_to_tod :
       
 11926     {
       
 11927         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11928 
       
 11929         {
       
 11930             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11932             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11933             symbol_c *IN_type_symbol = NULL;
       
 11934             
       
 11935             /* Get the value from a foo(<param_value>) style call */
       
 11936             if (IN_param_value == NULL)
       
 11937               IN_param_value = function_call_param_iterator.next_nf();
       
 11938             if (IN_param_value != NULL) {
       
 11939               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11940               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11941             }
       
 11942             
       
 11943             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11944             {
       
 11945         
       
 11946                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11947                 
       
 11948                 if (IN_type_symbol == NULL)
       
 11949                   IN_type_symbol = last_type_symbol;
       
 11950                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11951                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11952                 function_type_prefix = return_type_symbol;
       
 11953                 break;
       
 11954                 
       
 11955             }
       
 11956             
       
 11957             
       
 11958             ERROR;
       
 11959         }
       
 11960         
       
 11961     }/*function_usint_to_tod*/
       
 11962     break;
       
 11963 
       
 11964 /****
       
 11965  *USINT_TO_UDINT
       
 11966  */
       
 11967     case function_usint_to_udint :
       
 11968     {
       
 11969         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 11970 
       
 11971         {
       
 11972             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11974             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11975             symbol_c *IN_type_symbol = NULL;
       
 11976             
       
 11977             /* Get the value from a foo(<param_value>) style call */
       
 11978             if (IN_param_value == NULL)
       
 11979               IN_param_value = function_call_param_iterator.next_nf();
       
 11980             if (IN_param_value != NULL) {
       
 11981               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11982               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11983             }
       
 11984             
       
 11985             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11986             {
       
 11987         
       
 11988                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11989                 
       
 11990                 if (IN_type_symbol == NULL)
       
 11991                   IN_type_symbol = last_type_symbol;
       
 11992                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11993                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11994                 function_type_prefix = return_type_symbol;
       
 11995                 function_type_suffix = IN_type_symbol;
       
 11996                 break;
       
 11997                 
       
 11998             }
       
 11999             
       
 12000             
       
 12001             ERROR;
       
 12002         }
       
 12003         
       
 12004     }/*function_usint_to_udint*/
       
 12005     break;
       
 12006 
       
 12007 /****
       
 12008  *USINT_TO_WORD
       
 12009  */
       
 12010     case function_usint_to_word :
       
 12011     {
       
 12012         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12013 
       
 12014         {
       
 12015             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12017             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12018             symbol_c *IN_type_symbol = NULL;
       
 12019             
       
 12020             /* Get the value from a foo(<param_value>) style call */
       
 12021             if (IN_param_value == NULL)
       
 12022               IN_param_value = function_call_param_iterator.next_nf();
       
 12023             if (IN_param_value != NULL) {
       
 12024               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12025               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12026             }
       
 12027             
       
 12028             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12029             {
       
 12030         
       
 12031                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12032                 
       
 12033                 if (IN_type_symbol == NULL)
       
 12034                   IN_type_symbol = last_type_symbol;
       
 12035                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12036                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12037                 function_type_prefix = return_type_symbol;
       
 12038                 function_type_suffix = IN_type_symbol;
       
 12039                 break;
       
 12040                 
       
 12041             }
       
 12042             
       
 12043             
       
 12044             ERROR;
       
 12045         }
       
 12046         
       
 12047     }/*function_usint_to_word*/
       
 12048     break;
       
 12049 
       
 12050 /****
       
 12051  *USINT_TO_STRING
       
 12052  */
       
 12053     case function_usint_to_string :
       
 12054     {
       
 12055         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12056 
       
 12057         {
       
 12058             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12059             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12060             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12061             symbol_c *IN_type_symbol = NULL;
       
 12062             
       
 12063             /* Get the value from a foo(<param_value>) style call */
       
 12064             if (IN_param_value == NULL)
       
 12065               IN_param_value = function_call_param_iterator.next_nf();
       
 12066             if (IN_param_value != NULL) {
       
 12067               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12068               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12069             }
       
 12070             
       
 12071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12072             {
       
 12073         
       
 12074                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
 12075                 
       
 12076                 if (IN_type_symbol == NULL)
       
 12077                   IN_type_symbol = last_type_symbol;
       
 12078                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12079                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12080                 function_type_prefix = return_type_symbol;
       
 12081                 break;
       
 12082                 
       
 12083             }
       
 12084             
       
 12085             
       
 12086             ERROR;
       
 12087         }
       
 12088         
       
 12089     }/*function_usint_to_string*/
       
 12090     break;
       
 12091 
       
 12092 /****
       
 12093  *USINT_TO_LWORD
       
 12094  */
       
 12095     case function_usint_to_lword :
       
 12096     {
       
 12097         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12098 
       
 12099         {
       
 12100             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12101             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12102             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12103             symbol_c *IN_type_symbol = NULL;
       
 12104             
       
 12105             /* Get the value from a foo(<param_value>) style call */
       
 12106             if (IN_param_value == NULL)
       
 12107               IN_param_value = function_call_param_iterator.next_nf();
       
 12108             if (IN_param_value != NULL) {
       
 12109               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12110               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12111             }
       
 12112             
       
 12113             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12114             {
       
 12115         
       
 12116                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12117                 
       
 12118                 if (IN_type_symbol == NULL)
       
 12119                   IN_type_symbol = last_type_symbol;
       
 12120                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12121                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12122                 function_type_prefix = return_type_symbol;
       
 12123                 function_type_suffix = IN_type_symbol;
       
 12124                 break;
       
 12125                 
       
 12126             }
       
 12127             
       
 12128             
       
 12129             ERROR;
       
 12130         }
       
 12131         
       
 12132     }/*function_usint_to_lword*/
       
 12133     break;
       
 12134 
       
 12135 /****
       
 12136  *USINT_TO_UINT
       
 12137  */
       
 12138     case function_usint_to_uint :
       
 12139     {
       
 12140         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12141 
       
 12142         {
       
 12143             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12145             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12146             symbol_c *IN_type_symbol = NULL;
       
 12147             
       
 12148             /* Get the value from a foo(<param_value>) style call */
       
 12149             if (IN_param_value == NULL)
       
 12150               IN_param_value = function_call_param_iterator.next_nf();
       
 12151             if (IN_param_value != NULL) {
       
 12152               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12153               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12154             }
       
 12155             
       
 12156             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12157             {
       
 12158         
       
 12159                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12160                 
       
 12161                 if (IN_type_symbol == NULL)
       
 12162                   IN_type_symbol = last_type_symbol;
       
 12163                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12164                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12165                 function_type_prefix = return_type_symbol;
       
 12166                 function_type_suffix = IN_type_symbol;
       
 12167                 break;
       
 12168                 
       
 12169             }
       
 12170             
       
 12171             
       
 12172             ERROR;
       
 12173         }
       
 12174         
       
 12175     }/*function_usint_to_uint*/
       
 12176     break;
       
 12177 
       
 12178 /****
       
 12179  *USINT_TO_LREAL
       
 12180  */
       
 12181     case function_usint_to_lreal :
       
 12182     {
       
 12183         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12184 
       
 12185         {
       
 12186             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12188             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12189             symbol_c *IN_type_symbol = NULL;
       
 12190             
       
 12191             /* Get the value from a foo(<param_value>) style call */
       
 12192             if (IN_param_value == NULL)
       
 12193               IN_param_value = function_call_param_iterator.next_nf();
       
 12194             if (IN_param_value != NULL) {
       
 12195               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12196               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12197             }
       
 12198             
       
 12199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12200             {
       
 12201         
       
 12202                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12203                 
       
 12204                 if (IN_type_symbol == NULL)
       
 12205                   IN_type_symbol = last_type_symbol;
       
 12206                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12207                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12208                 function_type_prefix = return_type_symbol;
       
 12209                 function_type_suffix = IN_type_symbol;
       
 12210                 break;
       
 12211                 
       
 12212             }
       
 12213             
       
 12214             
       
 12215             ERROR;
       
 12216         }
       
 12217         
       
 12218     }/*function_usint_to_lreal*/
       
 12219     break;
       
 12220 
       
 12221 /****
       
 12222  *USINT_TO_BYTE
       
 12223  */
       
 12224     case function_usint_to_byte :
       
 12225     {
       
 12226         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12227 
       
 12228         {
       
 12229             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12231             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12232             symbol_c *IN_type_symbol = NULL;
       
 12233             
       
 12234             /* Get the value from a foo(<param_value>) style call */
       
 12235             if (IN_param_value == NULL)
       
 12236               IN_param_value = function_call_param_iterator.next_nf();
       
 12237             if (IN_param_value != NULL) {
       
 12238               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12239               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12240             }
       
 12241             
       
 12242             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12243             {
       
 12244         
       
 12245                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12246                 
       
 12247                 if (IN_type_symbol == NULL)
       
 12248                   IN_type_symbol = last_type_symbol;
       
 12249                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12250                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12251                 function_type_prefix = return_type_symbol;
       
 12252                 function_type_suffix = IN_type_symbol;
       
 12253                 break;
       
 12254                 
       
 12255             }
       
 12256             
       
 12257             
       
 12258             ERROR;
       
 12259         }
       
 12260         
       
 12261     }/*function_usint_to_byte*/
       
 12262     break;
       
 12263 
       
 12264 /****
       
 12265  *USINT_TO_ULINT
       
 12266  */
       
 12267     case function_usint_to_ulint :
       
 12268     {
       
 12269         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12270 
       
 12271         {
       
 12272             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12274             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12275             symbol_c *IN_type_symbol = NULL;
       
 12276             
       
 12277             /* Get the value from a foo(<param_value>) style call */
       
 12278             if (IN_param_value == NULL)
       
 12279               IN_param_value = function_call_param_iterator.next_nf();
       
 12280             if (IN_param_value != NULL) {
       
 12281               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12282               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12283             }
       
 12284             
       
 12285             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12286             {
       
 12287         
       
 12288                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12289                 
       
 12290                 if (IN_type_symbol == NULL)
       
 12291                   IN_type_symbol = last_type_symbol;
       
 12292                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12293                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12294                 function_type_prefix = return_type_symbol;
       
 12295                 function_type_suffix = IN_type_symbol;
       
 12296                 break;
       
 12297                 
       
 12298             }
       
 12299             
       
 12300             
       
 12301             ERROR;
       
 12302         }
       
 12303         
       
 12304     }/*function_usint_to_ulint*/
       
 12305     break;
       
 12306 
       
 12307 /****
       
 12308  *USINT_TO_BOOL
       
 12309  */
       
 12310     case function_usint_to_bool :
       
 12311     {
       
 12312         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12313 
       
 12314         {
       
 12315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12318             symbol_c *IN_type_symbol = NULL;
       
 12319             
       
 12320             /* Get the value from a foo(<param_value>) style call */
       
 12321             if (IN_param_value == NULL)
       
 12322               IN_param_value = function_call_param_iterator.next_nf();
       
 12323             if (IN_param_value != NULL) {
       
 12324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12326             }
       
 12327             
       
 12328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12329             {
       
 12330         
       
 12331                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12332                 
       
 12333                 if (IN_type_symbol == NULL)
       
 12334                   IN_type_symbol = last_type_symbol;
       
 12335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12336                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12337                 function_type_prefix = return_type_symbol;
       
 12338                 function_type_suffix = IN_type_symbol;
       
 12339                 break;
       
 12340                 
       
 12341             }
       
 12342             
       
 12343             
       
 12344             ERROR;
       
 12345         }
       
 12346         
       
 12347     }/*function_usint_to_bool*/
       
 12348     break;
       
 12349 
       
 12350 /****
       
 12351  *USINT_TO_TIME
       
 12352  */
       
 12353     case function_usint_to_time :
       
 12354     {
       
 12355         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12356 
       
 12357         {
       
 12358             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12360             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12361             symbol_c *IN_type_symbol = NULL;
       
 12362             
       
 12363             /* Get the value from a foo(<param_value>) style call */
       
 12364             if (IN_param_value == NULL)
       
 12365               IN_param_value = function_call_param_iterator.next_nf();
       
 12366             if (IN_param_value != NULL) {
       
 12367               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12368               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12369             }
       
 12370             
       
 12371             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12372             {
       
 12373         
       
 12374                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12375                 
       
 12376                 if (IN_type_symbol == NULL)
       
 12377                   IN_type_symbol = last_type_symbol;
       
 12378                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12379                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12380                 function_type_prefix = return_type_symbol;
       
 12381                 break;
       
 12382                 
       
 12383             }
       
 12384             
       
 12385             
       
 12386             ERROR;
       
 12387         }
       
 12388         
       
 12389     }/*function_usint_to_time*/
       
 12390     break;
       
 12391 
       
 12392 /****
       
 12393  *USINT_TO_INT
       
 12394  */
       
 12395     case function_usint_to_int :
       
 12396     {
       
 12397         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
       
 12398 
       
 12399         {
       
 12400             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12401             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12402             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12403             symbol_c *IN_type_symbol = NULL;
       
 12404             
       
 12405             /* Get the value from a foo(<param_value>) style call */
       
 12406             if (IN_param_value == NULL)
       
 12407               IN_param_value = function_call_param_iterator.next_nf();
       
 12408             if (IN_param_value != NULL) {
       
 12409               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12410               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12411             }
       
 12412             
       
 12413             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12414             {
       
 12415         
       
 12416                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12417                 
       
 12418                 if (IN_type_symbol == NULL)
       
 12419                   IN_type_symbol = last_type_symbol;
       
 12420                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12421                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12422                 function_type_prefix = return_type_symbol;
       
 12423                 function_type_suffix = IN_type_symbol;
       
 12424                 break;
       
 12425                 
       
 12426             }
       
 12427             
       
 12428             
       
 12429             ERROR;
       
 12430         }
       
 12431         
       
 12432     }/*function_usint_to_int*/
       
 12433     break;
       
 12434 
       
 12435 /****
       
 12436  *ULINT_TO_REAL
       
 12437  */
       
 12438     case function_ulint_to_real :
       
 12439     {
       
 12440         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12441 
       
 12442         {
       
 12443             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12445             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12446             symbol_c *IN_type_symbol = NULL;
       
 12447             
       
 12448             /* Get the value from a foo(<param_value>) style call */
       
 12449             if (IN_param_value == NULL)
       
 12450               IN_param_value = function_call_param_iterator.next_nf();
       
 12451             if (IN_param_value != NULL) {
       
 12452               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12453               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12454             }
       
 12455             
       
 12456             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12457             {
       
 12458         
       
 12459                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12460                 
       
 12461                 if (IN_type_symbol == NULL)
       
 12462                   IN_type_symbol = last_type_symbol;
       
 12463                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12464                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12465                 function_type_prefix = return_type_symbol;
       
 12466                 function_type_suffix = IN_type_symbol;
       
 12467                 break;
       
 12468                 
       
 12469             }
       
 12470             
       
 12471             
       
 12472             ERROR;
       
 12473         }
       
 12474         
       
 12475     }/*function_ulint_to_real*/
       
 12476     break;
       
 12477 
       
 12478 /****
       
 12479  *ULINT_TO_SINT
       
 12480  */
       
 12481     case function_ulint_to_sint :
       
 12482     {
       
 12483         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12484 
       
 12485         {
       
 12486             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12488             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12489             symbol_c *IN_type_symbol = NULL;
       
 12490             
       
 12491             /* Get the value from a foo(<param_value>) style call */
       
 12492             if (IN_param_value == NULL)
       
 12493               IN_param_value = function_call_param_iterator.next_nf();
       
 12494             if (IN_param_value != NULL) {
       
 12495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12497             }
       
 12498             
       
 12499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12500             {
       
 12501         
       
 12502                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12503                 
       
 12504                 if (IN_type_symbol == NULL)
       
 12505                   IN_type_symbol = last_type_symbol;
       
 12506                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12507                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12508                 function_type_prefix = return_type_symbol;
       
 12509                 function_type_suffix = IN_type_symbol;
       
 12510                 break;
       
 12511                 
       
 12512             }
       
 12513             
       
 12514             
       
 12515             ERROR;
       
 12516         }
       
 12517         
       
 12518     }/*function_ulint_to_sint*/
       
 12519     break;
       
 12520 
       
 12521 /****
       
 12522  *ULINT_TO_LINT
       
 12523  */
       
 12524     case function_ulint_to_lint :
       
 12525     {
       
 12526         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12527 
       
 12528         {
       
 12529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12532             symbol_c *IN_type_symbol = NULL;
       
 12533             
       
 12534             /* Get the value from a foo(<param_value>) style call */
       
 12535             if (IN_param_value == NULL)
       
 12536               IN_param_value = function_call_param_iterator.next_nf();
       
 12537             if (IN_param_value != NULL) {
       
 12538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12540             }
       
 12541             
       
 12542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12543             {
       
 12544         
       
 12545                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12546                 
       
 12547                 if (IN_type_symbol == NULL)
       
 12548                   IN_type_symbol = last_type_symbol;
       
 12549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12550                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12551                 function_type_prefix = return_type_symbol;
       
 12552                 function_type_suffix = IN_type_symbol;
       
 12553                 break;
       
 12554                 
       
 12555             }
       
 12556             
       
 12557             
       
 12558             ERROR;
       
 12559         }
       
 12560         
       
 12561     }/*function_ulint_to_lint*/
       
 12562     break;
       
 12563 
       
 12564 /****
       
 12565  *ULINT_TO_DINT
       
 12566  */
       
 12567     case function_ulint_to_dint :
       
 12568     {
       
 12569         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12570 
       
 12571         {
       
 12572             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12574             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12575             symbol_c *IN_type_symbol = NULL;
       
 12576             
       
 12577             /* Get the value from a foo(<param_value>) style call */
       
 12578             if (IN_param_value == NULL)
       
 12579               IN_param_value = function_call_param_iterator.next_nf();
       
 12580             if (IN_param_value != NULL) {
       
 12581               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12582               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12583             }
       
 12584             
       
 12585             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12586             {
       
 12587         
       
 12588                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12589                 
       
 12590                 if (IN_type_symbol == NULL)
       
 12591                   IN_type_symbol = last_type_symbol;
       
 12592                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12593                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12594                 function_type_prefix = return_type_symbol;
       
 12595                 function_type_suffix = IN_type_symbol;
       
 12596                 break;
       
 12597                 
       
 12598             }
       
 12599             
       
 12600             
       
 12601             ERROR;
       
 12602         }
       
 12603         
       
 12604     }/*function_ulint_to_dint*/
       
 12605     break;
       
 12606 
       
 12607 /****
       
 12608  *ULINT_TO_DATE
       
 12609  */
       
 12610     case function_ulint_to_date :
       
 12611     {
       
 12612         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12613 
       
 12614         {
       
 12615             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12617             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12618             symbol_c *IN_type_symbol = NULL;
       
 12619             
       
 12620             /* Get the value from a foo(<param_value>) style call */
       
 12621             if (IN_param_value == NULL)
       
 12622               IN_param_value = function_call_param_iterator.next_nf();
       
 12623             if (IN_param_value != NULL) {
       
 12624               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12625               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12626             }
       
 12627             
       
 12628             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12629             {
       
 12630         
       
 12631                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12632                 
       
 12633                 if (IN_type_symbol == NULL)
       
 12634                   IN_type_symbol = last_type_symbol;
       
 12635                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12636                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12637                 function_type_prefix = return_type_symbol;
       
 12638                 break;
       
 12639                 
       
 12640             }
       
 12641             
       
 12642             
       
 12643             ERROR;
       
 12644         }
       
 12645         
       
 12646     }/*function_ulint_to_date*/
       
 12647     break;
       
 12648 
       
 12649 /****
       
 12650  *ULINT_TO_DWORD
       
 12651  */
       
 12652     case function_ulint_to_dword :
       
 12653     {
       
 12654         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12655 
       
 12656         {
       
 12657             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12658             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12659             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12660             symbol_c *IN_type_symbol = NULL;
       
 12661             
       
 12662             /* Get the value from a foo(<param_value>) style call */
       
 12663             if (IN_param_value == NULL)
       
 12664               IN_param_value = function_call_param_iterator.next_nf();
       
 12665             if (IN_param_value != NULL) {
       
 12666               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12667               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12668             }
       
 12669             
       
 12670             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12671             {
       
 12672         
       
 12673                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12674                 
       
 12675                 if (IN_type_symbol == NULL)
       
 12676                   IN_type_symbol = last_type_symbol;
       
 12677                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12678                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12679                 function_type_prefix = return_type_symbol;
       
 12680                 function_type_suffix = IN_type_symbol;
       
 12681                 break;
       
 12682                 
       
 12683             }
       
 12684             
       
 12685             
       
 12686             ERROR;
       
 12687         }
       
 12688         
       
 12689     }/*function_ulint_to_dword*/
       
 12690     break;
       
 12691 
       
 12692 /****
       
 12693  *ULINT_TO_DT
       
 12694  */
       
 12695     case function_ulint_to_dt :
       
 12696     {
       
 12697         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12698 
       
 12699         {
       
 12700             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12701             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12702             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12703             symbol_c *IN_type_symbol = NULL;
       
 12704             
       
 12705             /* Get the value from a foo(<param_value>) style call */
       
 12706             if (IN_param_value == NULL)
       
 12707               IN_param_value = function_call_param_iterator.next_nf();
       
 12708             if (IN_param_value != NULL) {
       
 12709               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12710               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12711             }
       
 12712             
       
 12713             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12714             {
       
 12715         
       
 12716                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12717                 
       
 12718                 if (IN_type_symbol == NULL)
       
 12719                   IN_type_symbol = last_type_symbol;
       
 12720                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12721                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12722                 function_type_prefix = return_type_symbol;
       
 12723                 break;
       
 12724                 
       
 12725             }
       
 12726             
       
 12727             
       
 12728             ERROR;
       
 12729         }
       
 12730         
       
 12731     }/*function_ulint_to_dt*/
       
 12732     break;
       
 12733 
       
 12734 /****
       
 12735  *ULINT_TO_TOD
       
 12736  */
       
 12737     case function_ulint_to_tod :
       
 12738     {
       
 12739         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12740 
       
 12741         {
       
 12742             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12744             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12745             symbol_c *IN_type_symbol = NULL;
       
 12746             
       
 12747             /* Get the value from a foo(<param_value>) style call */
       
 12748             if (IN_param_value == NULL)
       
 12749               IN_param_value = function_call_param_iterator.next_nf();
       
 12750             if (IN_param_value != NULL) {
       
 12751               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12752               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12753             }
       
 12754             
       
 12755             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12756             {
       
 12757         
       
 12758                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12759                 
       
 12760                 if (IN_type_symbol == NULL)
       
 12761                   IN_type_symbol = last_type_symbol;
       
 12762                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12763                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12764                 function_type_prefix = return_type_symbol;
       
 12765                 break;
       
 12766                 
       
 12767             }
       
 12768             
       
 12769             
       
 12770             ERROR;
       
 12771         }
       
 12772         
       
 12773     }/*function_ulint_to_tod*/
       
 12774     break;
       
 12775 
       
 12776 /****
       
 12777  *ULINT_TO_UDINT
       
 12778  */
       
 12779     case function_ulint_to_udint :
       
 12780     {
       
 12781         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12782 
       
 12783         {
       
 12784             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12785             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12786             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12787             symbol_c *IN_type_symbol = NULL;
       
 12788             
       
 12789             /* Get the value from a foo(<param_value>) style call */
       
 12790             if (IN_param_value == NULL)
       
 12791               IN_param_value = function_call_param_iterator.next_nf();
       
 12792             if (IN_param_value != NULL) {
       
 12793               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12794               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12795             }
       
 12796             
       
 12797             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12798             {
       
 12799         
       
 12800                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12801                 
       
 12802                 if (IN_type_symbol == NULL)
       
 12803                   IN_type_symbol = last_type_symbol;
       
 12804                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12805                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12806                 function_type_prefix = return_type_symbol;
       
 12807                 function_type_suffix = IN_type_symbol;
       
 12808                 break;
       
 12809                 
       
 12810             }
       
 12811             
       
 12812             
       
 12813             ERROR;
       
 12814         }
       
 12815         
       
 12816     }/*function_ulint_to_udint*/
       
 12817     break;
       
 12818 
       
 12819 /****
       
 12820  *ULINT_TO_WORD
       
 12821  */
       
 12822     case function_ulint_to_word :
       
 12823     {
       
 12824         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12825 
       
 12826         {
       
 12827             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12828             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12829             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12830             symbol_c *IN_type_symbol = NULL;
       
 12831             
       
 12832             /* Get the value from a foo(<param_value>) style call */
       
 12833             if (IN_param_value == NULL)
       
 12834               IN_param_value = function_call_param_iterator.next_nf();
       
 12835             if (IN_param_value != NULL) {
       
 12836               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12837               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12838             }
       
 12839             
       
 12840             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12841             {
       
 12842         
       
 12843                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12844                 
       
 12845                 if (IN_type_symbol == NULL)
       
 12846                   IN_type_symbol = last_type_symbol;
       
 12847                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12848                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12849                 function_type_prefix = return_type_symbol;
       
 12850                 function_type_suffix = IN_type_symbol;
       
 12851                 break;
       
 12852                 
       
 12853             }
       
 12854             
       
 12855             
       
 12856             ERROR;
       
 12857         }
       
 12858         
       
 12859     }/*function_ulint_to_word*/
       
 12860     break;
       
 12861 
       
 12862 /****
       
 12863  *ULINT_TO_STRING
       
 12864  */
       
 12865     case function_ulint_to_string :
       
 12866     {
       
 12867         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12868 
       
 12869         {
       
 12870             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12871             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12872             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12873             symbol_c *IN_type_symbol = NULL;
       
 12874             
       
 12875             /* Get the value from a foo(<param_value>) style call */
       
 12876             if (IN_param_value == NULL)
       
 12877               IN_param_value = function_call_param_iterator.next_nf();
       
 12878             if (IN_param_value != NULL) {
       
 12879               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12880               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12881             }
       
 12882             
       
 12883             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12884             {
       
 12885         
       
 12886                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
 12887                 
       
 12888                 if (IN_type_symbol == NULL)
       
 12889                   IN_type_symbol = last_type_symbol;
       
 12890                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12891                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12892                 function_type_prefix = return_type_symbol;
       
 12893                 break;
       
 12894                 
       
 12895             }
       
 12896             
       
 12897             
       
 12898             ERROR;
       
 12899         }
       
 12900         
       
 12901     }/*function_ulint_to_string*/
       
 12902     break;
       
 12903 
       
 12904 /****
       
 12905  *ULINT_TO_LWORD
       
 12906  */
       
 12907     case function_ulint_to_lword :
       
 12908     {
       
 12909         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12910 
       
 12911         {
       
 12912             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12913             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12914             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12915             symbol_c *IN_type_symbol = NULL;
       
 12916             
       
 12917             /* Get the value from a foo(<param_value>) style call */
       
 12918             if (IN_param_value == NULL)
       
 12919               IN_param_value = function_call_param_iterator.next_nf();
       
 12920             if (IN_param_value != NULL) {
       
 12921               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12922               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12923             }
       
 12924             
       
 12925             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12926             {
       
 12927         
       
 12928                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12929                 
       
 12930                 if (IN_type_symbol == NULL)
       
 12931                   IN_type_symbol = last_type_symbol;
       
 12932                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12933                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12934                 function_type_prefix = return_type_symbol;
       
 12935                 function_type_suffix = IN_type_symbol;
       
 12936                 break;
       
 12937                 
       
 12938             }
       
 12939             
       
 12940             
       
 12941             ERROR;
       
 12942         }
       
 12943         
       
 12944     }/*function_ulint_to_lword*/
       
 12945     break;
       
 12946 
       
 12947 /****
       
 12948  *ULINT_TO_UINT
       
 12949  */
       
 12950     case function_ulint_to_uint :
       
 12951     {
       
 12952         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12953 
       
 12954         {
       
 12955             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12956             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12957             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12958             symbol_c *IN_type_symbol = NULL;
       
 12959             
       
 12960             /* Get the value from a foo(<param_value>) style call */
       
 12961             if (IN_param_value == NULL)
       
 12962               IN_param_value = function_call_param_iterator.next_nf();
       
 12963             if (IN_param_value != NULL) {
       
 12964               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12965               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12966             }
       
 12967             
       
 12968             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12969             {
       
 12970         
       
 12971                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12972                 
       
 12973                 if (IN_type_symbol == NULL)
       
 12974                   IN_type_symbol = last_type_symbol;
       
 12975                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12976                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12977                 function_type_prefix = return_type_symbol;
       
 12978                 function_type_suffix = IN_type_symbol;
       
 12979                 break;
       
 12980                 
       
 12981             }
       
 12982             
       
 12983             
       
 12984             ERROR;
       
 12985         }
       
 12986         
       
 12987     }/*function_ulint_to_uint*/
       
 12988     break;
       
 12989 
       
 12990 /****
       
 12991  *ULINT_TO_LREAL
       
 12992  */
       
 12993     case function_ulint_to_lreal :
       
 12994     {
       
 12995         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12996 
       
 12997         {
       
 12998             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12999             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13000             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13001             symbol_c *IN_type_symbol = NULL;
       
 13002             
       
 13003             /* Get the value from a foo(<param_value>) style call */
       
 13004             if (IN_param_value == NULL)
       
 13005               IN_param_value = function_call_param_iterator.next_nf();
       
 13006             if (IN_param_value != NULL) {
       
 13007               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13008               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13009             }
       
 13010             
       
 13011             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13012             {
       
 13013         
       
 13014                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13015                 
       
 13016                 if (IN_type_symbol == NULL)
       
 13017                   IN_type_symbol = last_type_symbol;
       
 13018                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13019                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13020                 function_type_prefix = return_type_symbol;
       
 13021                 function_type_suffix = IN_type_symbol;
       
 13022                 break;
       
 13023                 
       
 13024             }
       
 13025             
       
 13026             
       
 13027             ERROR;
       
 13028         }
       
 13029         
       
 13030     }/*function_ulint_to_lreal*/
       
 13031     break;
       
 13032 
       
 13033 /****
       
 13034  *ULINT_TO_BYTE
       
 13035  */
       
 13036     case function_ulint_to_byte :
       
 13037     {
       
 13038         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13039 
       
 13040         {
       
 13041             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13042             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13043             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13044             symbol_c *IN_type_symbol = NULL;
       
 13045             
       
 13046             /* Get the value from a foo(<param_value>) style call */
       
 13047             if (IN_param_value == NULL)
       
 13048               IN_param_value = function_call_param_iterator.next_nf();
       
 13049             if (IN_param_value != NULL) {
       
 13050               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13051               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13052             }
       
 13053             
       
 13054             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13055             {
       
 13056         
       
 13057                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13058                 
       
 13059                 if (IN_type_symbol == NULL)
       
 13060                   IN_type_symbol = last_type_symbol;
       
 13061                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13062                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13063                 function_type_prefix = return_type_symbol;
       
 13064                 function_type_suffix = IN_type_symbol;
       
 13065                 break;
       
 13066                 
       
 13067             }
       
 13068             
       
 13069             
       
 13070             ERROR;
       
 13071         }
       
 13072         
       
 13073     }/*function_ulint_to_byte*/
       
 13074     break;
       
 13075 
       
 13076 /****
       
 13077  *ULINT_TO_USINT
       
 13078  */
       
 13079     case function_ulint_to_usint :
       
 13080     {
       
 13081         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13082 
       
 13083         {
       
 13084             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13085             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13086             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13087             symbol_c *IN_type_symbol = NULL;
       
 13088             
       
 13089             /* Get the value from a foo(<param_value>) style call */
       
 13090             if (IN_param_value == NULL)
       
 13091               IN_param_value = function_call_param_iterator.next_nf();
       
 13092             if (IN_param_value != NULL) {
       
 13093               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13094               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13095             }
       
 13096             
       
 13097             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13098             {
       
 13099         
       
 13100                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13101                 
       
 13102                 if (IN_type_symbol == NULL)
       
 13103                   IN_type_symbol = last_type_symbol;
       
 13104                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13105                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13106                 function_type_prefix = return_type_symbol;
       
 13107                 function_type_suffix = IN_type_symbol;
       
 13108                 break;
       
 13109                 
       
 13110             }
       
 13111             
       
 13112             
       
 13113             ERROR;
       
 13114         }
       
 13115         
       
 13116     }/*function_ulint_to_usint*/
       
 13117     break;
       
 13118 
       
 13119 /****
       
 13120  *ULINT_TO_BOOL
       
 13121  */
       
 13122     case function_ulint_to_bool :
       
 13123     {
       
 13124         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13125 
       
 13126         {
       
 13127             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13129             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13130             symbol_c *IN_type_symbol = NULL;
       
 13131             
       
 13132             /* Get the value from a foo(<param_value>) style call */
       
 13133             if (IN_param_value == NULL)
       
 13134               IN_param_value = function_call_param_iterator.next_nf();
       
 13135             if (IN_param_value != NULL) {
       
 13136               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13137               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13138             }
       
 13139             
       
 13140             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13141             {
       
 13142         
       
 13143                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13144                 
       
 13145                 if (IN_type_symbol == NULL)
       
 13146                   IN_type_symbol = last_type_symbol;
       
 13147                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13148                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13149                 function_type_prefix = return_type_symbol;
       
 13150                 function_type_suffix = IN_type_symbol;
       
 13151                 break;
       
 13152                 
       
 13153             }
       
 13154             
       
 13155             
       
 13156             ERROR;
       
 13157         }
       
 13158         
       
 13159     }/*function_ulint_to_bool*/
       
 13160     break;
       
 13161 
       
 13162 /****
       
 13163  *ULINT_TO_TIME
       
 13164  */
       
 13165     case function_ulint_to_time :
       
 13166     {
       
 13167         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13168 
       
 13169         {
       
 13170             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13172             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13173             symbol_c *IN_type_symbol = NULL;
       
 13174             
       
 13175             /* Get the value from a foo(<param_value>) style call */
       
 13176             if (IN_param_value == NULL)
       
 13177               IN_param_value = function_call_param_iterator.next_nf();
       
 13178             if (IN_param_value != NULL) {
       
 13179               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13180               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13181             }
       
 13182             
       
 13183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13184             {
       
 13185         
       
 13186                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13187                 
       
 13188                 if (IN_type_symbol == NULL)
       
 13189                   IN_type_symbol = last_type_symbol;
       
 13190                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13191                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13192                 function_type_prefix = return_type_symbol;
       
 13193                 break;
       
 13194                 
       
 13195             }
       
 13196             
       
 13197             
       
 13198             ERROR;
       
 13199         }
       
 13200         
       
 13201     }/*function_ulint_to_time*/
       
 13202     break;
       
 13203 
       
 13204 /****
       
 13205  *ULINT_TO_INT
       
 13206  */
       
 13207     case function_ulint_to_int :
       
 13208     {
       
 13209         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13210 
       
 13211         {
       
 13212             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13213             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13214             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13215             symbol_c *IN_type_symbol = NULL;
       
 13216             
       
 13217             /* Get the value from a foo(<param_value>) style call */
       
 13218             if (IN_param_value == NULL)
       
 13219               IN_param_value = function_call_param_iterator.next_nf();
       
 13220             if (IN_param_value != NULL) {
       
 13221               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13222               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13223             }
       
 13224             
       
 13225             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13226             {
       
 13227         
       
 13228                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13229                 
       
 13230                 if (IN_type_symbol == NULL)
       
 13231                   IN_type_symbol = last_type_symbol;
       
 13232                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13233                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13234                 function_type_prefix = return_type_symbol;
       
 13235                 function_type_suffix = IN_type_symbol;
       
 13236                 break;
       
 13237                 
       
 13238             }
       
 13239             
       
 13240             
       
 13241             ERROR;
       
 13242         }
       
 13243         
       
 13244     }/*function_ulint_to_int*/
       
 13245     break;
       
 13246 
       
 13247 /****
       
 13248  *BOOL_TO_REAL
       
 13249  */
       
 13250     case function_bool_to_real :
       
 13251     {
       
 13252         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13253 
       
 13254         {
       
 13255             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13257             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13258             symbol_c *IN_type_symbol = NULL;
       
 13259             
       
 13260             /* Get the value from a foo(<param_value>) style call */
       
 13261             if (IN_param_value == NULL)
       
 13262               IN_param_value = function_call_param_iterator.next_nf();
       
 13263             if (IN_param_value != NULL) {
       
 13264               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13265               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13266             }
       
 13267             
       
 13268             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13269             {
       
 13270         
       
 13271                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13272                 
       
 13273                 if (IN_type_symbol == NULL)
       
 13274                   IN_type_symbol = last_type_symbol;
       
 13275                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13276                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 13277                 function_type_prefix = return_type_symbol;
       
 13278                 function_type_suffix = IN_type_symbol;
       
 13279                 break;
       
 13280                 
       
 13281             }
       
 13282             
       
 13283             
       
 13284             ERROR;
       
 13285         }
       
 13286         
       
 13287     }/*function_bool_to_real*/
       
 13288     break;
       
 13289 
       
 13290 /****
       
 13291  *BOOL_TO_SINT
       
 13292  */
       
 13293     case function_bool_to_sint :
       
 13294     {
       
 13295         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13296 
       
 13297         {
       
 13298             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13300             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13301             symbol_c *IN_type_symbol = NULL;
       
 13302             
       
 13303             /* Get the value from a foo(<param_value>) style call */
       
 13304             if (IN_param_value == NULL)
       
 13305               IN_param_value = function_call_param_iterator.next_nf();
       
 13306             if (IN_param_value != NULL) {
       
 13307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13309             }
       
 13310             
       
 13311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13312             {
       
 13313         
       
 13314                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13315                 
       
 13316                 if (IN_type_symbol == NULL)
       
 13317                   IN_type_symbol = last_type_symbol;
       
 13318                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13319                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13320                 function_type_prefix = return_type_symbol;
       
 13321                 function_type_suffix = IN_type_symbol;
       
 13322                 break;
       
 13323                 
       
 13324             }
       
 13325             
       
 13326             
       
 13327             ERROR;
       
 13328         }
       
 13329         
       
 13330     }/*function_bool_to_sint*/
       
 13331     break;
       
 13332 
       
 13333 /****
       
 13334  *BOOL_TO_LINT
       
 13335  */
       
 13336     case function_bool_to_lint :
       
 13337     {
       
 13338         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13339 
       
 13340         {
       
 13341             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13343             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13344             symbol_c *IN_type_symbol = NULL;
       
 13345             
       
 13346             /* Get the value from a foo(<param_value>) style call */
       
 13347             if (IN_param_value == NULL)
       
 13348               IN_param_value = function_call_param_iterator.next_nf();
       
 13349             if (IN_param_value != NULL) {
       
 13350               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13351               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13352             }
       
 13353             
       
 13354             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13355             {
       
 13356         
       
 13357                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13358                 
       
 13359                 if (IN_type_symbol == NULL)
       
 13360                   IN_type_symbol = last_type_symbol;
       
 13361                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13362                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13363                 function_type_prefix = return_type_symbol;
       
 13364                 function_type_suffix = IN_type_symbol;
       
 13365                 break;
       
 13366                 
       
 13367             }
       
 13368             
       
 13369             
       
 13370             ERROR;
       
 13371         }
       
 13372         
       
 13373     }/*function_bool_to_lint*/
       
 13374     break;
       
 13375 
       
 13376 /****
       
 13377  *BOOL_TO_DINT
       
 13378  */
       
 13379     case function_bool_to_dint :
       
 13380     {
       
 13381         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13382 
       
 13383         {
       
 13384             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13386             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13387             symbol_c *IN_type_symbol = NULL;
       
 13388             
       
 13389             /* Get the value from a foo(<param_value>) style call */
       
 13390             if (IN_param_value == NULL)
       
 13391               IN_param_value = function_call_param_iterator.next_nf();
       
 13392             if (IN_param_value != NULL) {
       
 13393               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13394               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13395             }
       
 13396             
       
 13397             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13398             {
       
 13399         
       
 13400                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13401                 
       
 13402                 if (IN_type_symbol == NULL)
       
 13403                   IN_type_symbol = last_type_symbol;
       
 13404                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13405                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13406                 function_type_prefix = return_type_symbol;
       
 13407                 function_type_suffix = IN_type_symbol;
       
 13408                 break;
       
 13409                 
       
 13410             }
       
 13411             
       
 13412             
       
 13413             ERROR;
       
 13414         }
       
 13415         
       
 13416     }/*function_bool_to_dint*/
       
 13417     break;
       
 13418 
       
 13419 /****
       
 13420  *BOOL_TO_DATE
       
 13421  */
       
 13422     case function_bool_to_date :
       
 13423     {
       
 13424         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13425 
       
 13426         {
       
 13427             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13429             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13430             symbol_c *IN_type_symbol = NULL;
       
 13431             
       
 13432             /* Get the value from a foo(<param_value>) style call */
       
 13433             if (IN_param_value == NULL)
       
 13434               IN_param_value = function_call_param_iterator.next_nf();
       
 13435             if (IN_param_value != NULL) {
       
 13436               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13437               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13438             }
       
 13439             
       
 13440             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13441             {
       
 13442         
       
 13443                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13444                 
       
 13445                 if (IN_type_symbol == NULL)
       
 13446                   IN_type_symbol = last_type_symbol;
       
 13447                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13448                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13449                 function_type_prefix = return_type_symbol;
       
 13450                 break;
       
 13451                 
       
 13452             }
       
 13453             
       
 13454             
       
 13455             ERROR;
       
 13456         }
       
 13457         
       
 13458     }/*function_bool_to_date*/
       
 13459     break;
       
 13460 
       
 13461 /****
       
 13462  *BOOL_TO_DWORD
       
 13463  */
       
 13464     case function_bool_to_dword :
       
 13465     {
       
 13466         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13467 
       
 13468         {
       
 13469             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13470             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13471             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13472             symbol_c *IN_type_symbol = NULL;
       
 13473             
       
 13474             /* Get the value from a foo(<param_value>) style call */
       
 13475             if (IN_param_value == NULL)
       
 13476               IN_param_value = function_call_param_iterator.next_nf();
       
 13477             if (IN_param_value != NULL) {
       
 13478               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13479               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13480             }
       
 13481             
       
 13482             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13483             {
       
 13484         
       
 13485                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13486                 
       
 13487                 if (IN_type_symbol == NULL)
       
 13488                   IN_type_symbol = last_type_symbol;
       
 13489                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13490                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13491                 function_type_prefix = return_type_symbol;
       
 13492                 function_type_suffix = IN_type_symbol;
       
 13493                 break;
       
 13494                 
       
 13495             }
       
 13496             
       
 13497             
       
 13498             ERROR;
       
 13499         }
       
 13500         
       
 13501     }/*function_bool_to_dword*/
       
 13502     break;
       
 13503 
       
 13504 /****
       
 13505  *BOOL_TO_DT
       
 13506  */
       
 13507     case function_bool_to_dt :
       
 13508     {
       
 13509         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13510 
       
 13511         {
       
 13512             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13513             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13514             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13515             symbol_c *IN_type_symbol = NULL;
       
 13516             
       
 13517             /* Get the value from a foo(<param_value>) style call */
       
 13518             if (IN_param_value == NULL)
       
 13519               IN_param_value = function_call_param_iterator.next_nf();
       
 13520             if (IN_param_value != NULL) {
       
 13521               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13522               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13523             }
       
 13524             
       
 13525             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13526             {
       
 13527         
       
 13528                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13529                 
       
 13530                 if (IN_type_symbol == NULL)
       
 13531                   IN_type_symbol = last_type_symbol;
       
 13532                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13533                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13534                 function_type_prefix = return_type_symbol;
       
 13535                 break;
       
 13536                 
       
 13537             }
       
 13538             
       
 13539             
       
 13540             ERROR;
       
 13541         }
       
 13542         
       
 13543     }/*function_bool_to_dt*/
       
 13544     break;
       
 13545 
       
 13546 /****
       
 13547  *BOOL_TO_TOD
       
 13548  */
       
 13549     case function_bool_to_tod :
       
 13550     {
       
 13551         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13552 
       
 13553         {
       
 13554             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13556             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13557             symbol_c *IN_type_symbol = NULL;
       
 13558             
       
 13559             /* Get the value from a foo(<param_value>) style call */
       
 13560             if (IN_param_value == NULL)
       
 13561               IN_param_value = function_call_param_iterator.next_nf();
       
 13562             if (IN_param_value != NULL) {
       
 13563               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13564               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13565             }
       
 13566             
       
 13567             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13568             {
       
 13569         
       
 13570                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13571                 
       
 13572                 if (IN_type_symbol == NULL)
       
 13573                   IN_type_symbol = last_type_symbol;
       
 13574                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13575                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13576                 function_type_prefix = return_type_symbol;
       
 13577                 break;
       
 13578                 
       
 13579             }
       
 13580             
       
 13581             
       
 13582             ERROR;
       
 13583         }
       
 13584         
       
 13585     }/*function_bool_to_tod*/
       
 13586     break;
       
 13587 
       
 13588 /****
       
 13589  *BOOL_TO_UDINT
       
 13590  */
       
 13591     case function_bool_to_udint :
       
 13592     {
       
 13593         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13594 
       
 13595         {
       
 13596             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13597             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13598             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13599             symbol_c *IN_type_symbol = NULL;
       
 13600             
       
 13601             /* Get the value from a foo(<param_value>) style call */
       
 13602             if (IN_param_value == NULL)
       
 13603               IN_param_value = function_call_param_iterator.next_nf();
       
 13604             if (IN_param_value != NULL) {
       
 13605               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13606               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13607             }
       
 13608             
       
 13609             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13610             {
       
 13611         
       
 13612                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13613                 
       
 13614                 if (IN_type_symbol == NULL)
       
 13615                   IN_type_symbol = last_type_symbol;
       
 13616                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13617                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13618                 function_type_prefix = return_type_symbol;
       
 13619                 function_type_suffix = IN_type_symbol;
       
 13620                 break;
       
 13621                 
       
 13622             }
       
 13623             
       
 13624             
       
 13625             ERROR;
       
 13626         }
       
 13627         
       
 13628     }/*function_bool_to_udint*/
       
 13629     break;
       
 13630 
       
 13631 /****
       
 13632  *BOOL_TO_WORD
       
 13633  */
       
 13634     case function_bool_to_word :
       
 13635     {
       
 13636         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13637 
       
 13638         {
       
 13639             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13641             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13642             symbol_c *IN_type_symbol = NULL;
       
 13643             
       
 13644             /* Get the value from a foo(<param_value>) style call */
       
 13645             if (IN_param_value == NULL)
       
 13646               IN_param_value = function_call_param_iterator.next_nf();
       
 13647             if (IN_param_value != NULL) {
       
 13648               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13649               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13650             }
       
 13651             
       
 13652             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13653             {
       
 13654         
       
 13655                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13656                 
       
 13657                 if (IN_type_symbol == NULL)
       
 13658                   IN_type_symbol = last_type_symbol;
       
 13659                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13660                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13661                 function_type_prefix = return_type_symbol;
       
 13662                 function_type_suffix = IN_type_symbol;
       
 13663                 break;
       
 13664                 
       
 13665             }
       
 13666             
       
 13667             
       
 13668             ERROR;
       
 13669         }
       
 13670         
       
 13671     }/*function_bool_to_word*/
       
 13672     break;
       
 13673 
       
 13674 /****
       
 13675  *BOOL_TO_STRING
       
 13676  */
       
 13677     case function_bool_to_string :
       
 13678     {
       
 13679         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13680 
       
 13681         {
       
 13682             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13684             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13685             symbol_c *IN_type_symbol = NULL;
       
 13686             
       
 13687             /* Get the value from a foo(<param_value>) style call */
       
 13688             if (IN_param_value == NULL)
       
 13689               IN_param_value = function_call_param_iterator.next_nf();
       
 13690             if (IN_param_value != NULL) {
       
 13691               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13692               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13693             }
       
 13694             
       
 13695             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13696             {
       
 13697         
       
 13698                 function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
       
 13699                 
       
 13700                 if (IN_type_symbol == NULL)
       
 13701                   IN_type_symbol = last_type_symbol;
       
 13702                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13703                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13704                 function_type_prefix = return_type_symbol;
       
 13705                 break;
       
 13706                 
       
 13707             }
       
 13708             
       
 13709             
       
 13710             ERROR;
       
 13711         }
       
 13712         
       
 13713     }/*function_bool_to_string*/
       
 13714     break;
       
 13715 
       
 13716 /****
       
 13717  *BOOL_TO_LWORD
       
 13718  */
       
 13719     case function_bool_to_lword :
       
 13720     {
       
 13721         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13722 
       
 13723         {
       
 13724             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13725             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13726             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13727             symbol_c *IN_type_symbol = NULL;
       
 13728             
       
 13729             /* Get the value from a foo(<param_value>) style call */
       
 13730             if (IN_param_value == NULL)
       
 13731               IN_param_value = function_call_param_iterator.next_nf();
       
 13732             if (IN_param_value != NULL) {
       
 13733               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13734               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13735             }
       
 13736             
       
 13737             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13738             {
       
 13739         
       
 13740                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13741                 
       
 13742                 if (IN_type_symbol == NULL)
       
 13743                   IN_type_symbol = last_type_symbol;
       
 13744                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13745                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13746                 function_type_prefix = return_type_symbol;
       
 13747                 function_type_suffix = IN_type_symbol;
       
 13748                 break;
       
 13749                 
       
 13750             }
       
 13751             
       
 13752             
       
 13753             ERROR;
       
 13754         }
       
 13755         
       
 13756     }/*function_bool_to_lword*/
       
 13757     break;
       
 13758 
       
 13759 /****
       
 13760  *BOOL_TO_UINT
       
 13761  */
       
 13762     case function_bool_to_uint :
       
 13763     {
       
 13764         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13765 
       
 13766         {
       
 13767             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13769             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13770             symbol_c *IN_type_symbol = NULL;
       
 13771             
       
 13772             /* Get the value from a foo(<param_value>) style call */
       
 13773             if (IN_param_value == NULL)
       
 13774               IN_param_value = function_call_param_iterator.next_nf();
       
 13775             if (IN_param_value != NULL) {
       
 13776               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13777               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13778             }
       
 13779             
       
 13780             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13781             {
       
 13782         
       
 13783                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13784                 
       
 13785                 if (IN_type_symbol == NULL)
       
 13786                   IN_type_symbol = last_type_symbol;
       
 13787                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13788                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13789                 function_type_prefix = return_type_symbol;
       
 13790                 function_type_suffix = IN_type_symbol;
       
 13791                 break;
       
 13792                 
       
 13793             }
       
 13794             
       
 13795             
       
 13796             ERROR;
       
 13797         }
       
 13798         
       
 13799     }/*function_bool_to_uint*/
       
 13800     break;
       
 13801 
       
 13802 /****
       
 13803  *BOOL_TO_LREAL
       
 13804  */
       
 13805     case function_bool_to_lreal :
       
 13806     {
       
 13807         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13808 
       
 13809         {
       
 13810             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13812             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13813             symbol_c *IN_type_symbol = NULL;
       
 13814             
       
 13815             /* Get the value from a foo(<param_value>) style call */
       
 13816             if (IN_param_value == NULL)
       
 13817               IN_param_value = function_call_param_iterator.next_nf();
       
 13818             if (IN_param_value != NULL) {
       
 13819               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13820               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13821             }
       
 13822             
       
 13823             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13824             {
       
 13825         
       
 13826                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13827                 
       
 13828                 if (IN_type_symbol == NULL)
       
 13829                   IN_type_symbol = last_type_symbol;
       
 13830                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13831                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13832                 function_type_prefix = return_type_symbol;
       
 13833                 function_type_suffix = IN_type_symbol;
       
 13834                 break;
       
 13835                 
       
 13836             }
       
 13837             
       
 13838             
       
 13839             ERROR;
       
 13840         }
       
 13841         
       
 13842     }/*function_bool_to_lreal*/
       
 13843     break;
       
 13844 
       
 13845 /****
       
 13846  *BOOL_TO_BYTE
       
 13847  */
       
 13848     case function_bool_to_byte :
       
 13849     {
       
 13850         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13851 
       
 13852         {
       
 13853             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13855             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13856             symbol_c *IN_type_symbol = NULL;
       
 13857             
       
 13858             /* Get the value from a foo(<param_value>) style call */
       
 13859             if (IN_param_value == NULL)
       
 13860               IN_param_value = function_call_param_iterator.next_nf();
       
 13861             if (IN_param_value != NULL) {
       
 13862               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13863               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13864             }
       
 13865             
       
 13866             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13867             {
       
 13868         
       
 13869                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13870                 
       
 13871                 if (IN_type_symbol == NULL)
       
 13872                   IN_type_symbol = last_type_symbol;
       
 13873                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13874                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13875                 function_type_prefix = return_type_symbol;
       
 13876                 function_type_suffix = IN_type_symbol;
       
 13877                 break;
       
 13878                 
       
 13879             }
       
 13880             
       
 13881             
       
 13882             ERROR;
       
 13883         }
       
 13884         
       
 13885     }/*function_bool_to_byte*/
       
 13886     break;
       
 13887 
       
 13888 /****
       
 13889  *BOOL_TO_USINT
       
 13890  */
       
 13891     case function_bool_to_usint :
       
 13892     {
       
 13893         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13894 
       
 13895         {
       
 13896             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13897             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13898             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13899             symbol_c *IN_type_symbol = NULL;
       
 13900             
       
 13901             /* Get the value from a foo(<param_value>) style call */
       
 13902             if (IN_param_value == NULL)
       
 13903               IN_param_value = function_call_param_iterator.next_nf();
       
 13904             if (IN_param_value != NULL) {
       
 13905               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13906               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13907             }
       
 13908             
       
 13909             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13910             {
       
 13911         
       
 13912                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13913                 
       
 13914                 if (IN_type_symbol == NULL)
       
 13915                   IN_type_symbol = last_type_symbol;
       
 13916                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13917                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13918                 function_type_prefix = return_type_symbol;
       
 13919                 function_type_suffix = IN_type_symbol;
       
 13920                 break;
       
 13921                 
       
 13922             }
       
 13923             
       
 13924             
       
 13925             ERROR;
       
 13926         }
       
 13927         
       
 13928     }/*function_bool_to_usint*/
       
 13929     break;
       
 13930 
       
 13931 /****
       
 13932  *BOOL_TO_ULINT
       
 13933  */
       
 13934     case function_bool_to_ulint :
       
 13935     {
       
 13936         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13937 
       
 13938         {
       
 13939             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13940             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13941             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13942             symbol_c *IN_type_symbol = NULL;
       
 13943             
       
 13944             /* Get the value from a foo(<param_value>) style call */
       
 13945             if (IN_param_value == NULL)
       
 13946               IN_param_value = function_call_param_iterator.next_nf();
       
 13947             if (IN_param_value != NULL) {
       
 13948               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13949               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13950             }
       
 13951             
       
 13952             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13953             {
       
 13954         
       
 13955                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13956                 
       
 13957                 if (IN_type_symbol == NULL)
       
 13958                   IN_type_symbol = last_type_symbol;
       
 13959                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13960                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13961                 function_type_prefix = return_type_symbol;
       
 13962                 function_type_suffix = IN_type_symbol;
       
 13963                 break;
       
 13964                 
       
 13965             }
       
 13966             
       
 13967             
       
 13968             ERROR;
       
 13969         }
       
 13970         
       
 13971     }/*function_bool_to_ulint*/
       
 13972     break;
       
 13973 
       
 13974 /****
       
 13975  *BOOL_TO_TIME
       
 13976  */
       
 13977     case function_bool_to_time :
       
 13978     {
       
 13979         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 13980 
       
 13981         {
       
 13982             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13983             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13984             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13985             symbol_c *IN_type_symbol = NULL;
       
 13986             
       
 13987             /* Get the value from a foo(<param_value>) style call */
       
 13988             if (IN_param_value == NULL)
       
 13989               IN_param_value = function_call_param_iterator.next_nf();
       
 13990             if (IN_param_value != NULL) {
       
 13991               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13992               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13993             }
       
 13994             
       
 13995             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13996             {
       
 13997         
       
 13998                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13999                 
       
 14000                 if (IN_type_symbol == NULL)
       
 14001                   IN_type_symbol = last_type_symbol;
       
 14002                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14003                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14004                 function_type_prefix = return_type_symbol;
       
 14005                 break;
       
 14006                 
       
 14007             }
       
 14008             
       
 14009             
       
 14010             ERROR;
       
 14011         }
       
 14012         
       
 14013     }/*function_bool_to_time*/
       
 14014     break;
       
 14015 
       
 14016 /****
       
 14017  *BOOL_TO_INT
       
 14018  */
       
 14019     case function_bool_to_int :
       
 14020     {
       
 14021         symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name;
       
 14022 
       
 14023         {
       
 14024             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14025             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14026             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14027             symbol_c *IN_type_symbol = NULL;
       
 14028             
       
 14029             /* Get the value from a foo(<param_value>) style call */
       
 14030             if (IN_param_value == NULL)
       
 14031               IN_param_value = function_call_param_iterator.next_nf();
       
 14032             if (IN_param_value != NULL) {
       
 14033               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14034               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14035             }
       
 14036             
       
 14037             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14038             {
       
 14039         
       
 14040                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14041                 
       
 14042                 if (IN_type_symbol == NULL)
       
 14043                   IN_type_symbol = last_type_symbol;
       
 14044                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14045                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14046                 function_type_prefix = return_type_symbol;
       
 14047                 function_type_suffix = IN_type_symbol;
       
 14048                 break;
       
 14049                 
       
 14050             }
       
 14051             
       
 14052             
       
 14053             ERROR;
       
 14054         }
       
 14055         
       
 14056     }/*function_bool_to_int*/
       
 14057     break;
       
 14058 
       
 14059 /****
       
 14060  *TIME_TO_REAL
       
 14061  */
       
 14062     case function_time_to_real :
       
 14063     {
       
 14064         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14065 
       
 14066         {
       
 14067             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14068             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14069             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14070             symbol_c *IN_type_symbol = NULL;
       
 14071             
       
 14072             /* Get the value from a foo(<param_value>) style call */
       
 14073             if (IN_param_value == NULL)
       
 14074               IN_param_value = function_call_param_iterator.next_nf();
       
 14075             if (IN_param_value != NULL) {
       
 14076               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14077               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14078             }
       
 14079             
       
 14080             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14081             {
       
 14082         
       
 14083                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
 14084                 
       
 14085                 if (IN_type_symbol == NULL)
       
 14086                   IN_type_symbol = last_type_symbol;
       
 14087                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14088                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14089                 function_type_prefix = return_type_symbol;
       
 14090                 break;
       
 14091                 
       
 14092             }
       
 14093             
       
 14094             
       
 14095             ERROR;
       
 14096         }
       
 14097         
       
 14098     }/*function_time_to_real*/
       
 14099     break;
       
 14100 
       
 14101 /****
       
 14102  *TIME_TO_SINT
       
 14103  */
       
 14104     case function_time_to_sint :
       
 14105     {
       
 14106         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14107 
       
 14108         {
       
 14109             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14110             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14111             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14112             symbol_c *IN_type_symbol = NULL;
       
 14113             
       
 14114             /* Get the value from a foo(<param_value>) style call */
       
 14115             if (IN_param_value == NULL)
       
 14116               IN_param_value = function_call_param_iterator.next_nf();
       
 14117             if (IN_param_value != NULL) {
       
 14118               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14119               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14120             }
       
 14121             
       
 14122             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14123             {
       
 14124         
       
 14125                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14126                 
       
 14127                 if (IN_type_symbol == NULL)
       
 14128                   IN_type_symbol = last_type_symbol;
       
 14129                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14130                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14131                 function_type_prefix = return_type_symbol;
       
 14132                 break;
       
 14133                 
       
 14134             }
       
 14135             
       
 14136             
       
 14137             ERROR;
       
 14138         }
       
 14139         
       
 14140     }/*function_time_to_sint*/
       
 14141     break;
       
 14142 
       
 14143 /****
       
 14144  *TIME_TO_LINT
       
 14145  */
       
 14146     case function_time_to_lint :
       
 14147     {
       
 14148         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14149 
       
 14150         {
       
 14151             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14153             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14154             symbol_c *IN_type_symbol = NULL;
       
 14155             
       
 14156             /* Get the value from a foo(<param_value>) style call */
       
 14157             if (IN_param_value == NULL)
       
 14158               IN_param_value = function_call_param_iterator.next_nf();
       
 14159             if (IN_param_value != NULL) {
       
 14160               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14161               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14162             }
       
 14163             
       
 14164             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14165             {
       
 14166         
       
 14167                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14168                 
       
 14169                 if (IN_type_symbol == NULL)
       
 14170                   IN_type_symbol = last_type_symbol;
       
 14171                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14172                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14173                 function_type_prefix = return_type_symbol;
       
 14174                 break;
       
 14175                 
       
 14176             }
       
 14177             
       
 14178             
       
 14179             ERROR;
       
 14180         }
       
 14181         
       
 14182     }/*function_time_to_lint*/
       
 14183     break;
       
 14184 
       
 14185 /****
       
 14186  *TIME_TO_DINT
       
 14187  */
       
 14188     case function_time_to_dint :
       
 14189     {
       
 14190         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14191 
       
 14192         {
       
 14193             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14194             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14195             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14196             symbol_c *IN_type_symbol = NULL;
       
 14197             
       
 14198             /* Get the value from a foo(<param_value>) style call */
       
 14199             if (IN_param_value == NULL)
       
 14200               IN_param_value = function_call_param_iterator.next_nf();
       
 14201             if (IN_param_value != NULL) {
       
 14202               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14203               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14204             }
       
 14205             
       
 14206             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14207             {
       
 14208         
       
 14209                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14210                 
       
 14211                 if (IN_type_symbol == NULL)
       
 14212                   IN_type_symbol = last_type_symbol;
       
 14213                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14214                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14215                 function_type_prefix = return_type_symbol;
       
 14216                 break;
       
 14217                 
       
 14218             }
       
 14219             
       
 14220             
       
 14221             ERROR;
       
 14222         }
       
 14223         
       
 14224     }/*function_time_to_dint*/
       
 14225     break;
       
 14226 
       
 14227 /****
       
 14228  *TIME_TO_DWORD
       
 14229  */
       
 14230     case function_time_to_dword :
       
 14231     {
       
 14232         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14233 
       
 14234         {
       
 14235             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14236             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14237             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14238             symbol_c *IN_type_symbol = NULL;
       
 14239             
       
 14240             /* Get the value from a foo(<param_value>) style call */
       
 14241             if (IN_param_value == NULL)
       
 14242               IN_param_value = function_call_param_iterator.next_nf();
       
 14243             if (IN_param_value != NULL) {
       
 14244               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14245               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14246             }
       
 14247             
       
 14248             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14249             {
       
 14250         
       
 14251                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14252                 
       
 14253                 if (IN_type_symbol == NULL)
       
 14254                   IN_type_symbol = last_type_symbol;
       
 14255                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14256                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 14257                 function_type_prefix = return_type_symbol;
       
 14258                 break;
       
 14259                 
       
 14260             }
       
 14261             
       
 14262             
       
 14263             ERROR;
       
 14264         }
       
 14265         
       
 14266     }/*function_time_to_dword*/
       
 14267     break;
       
 14268 
       
 14269 /****
       
 14270  *TIME_TO_UDINT
       
 14271  */
       
 14272     case function_time_to_udint :
       
 14273     {
       
 14274         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14275 
       
 14276         {
       
 14277             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14278             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14279             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14280             symbol_c *IN_type_symbol = NULL;
       
 14281             
       
 14282             /* Get the value from a foo(<param_value>) style call */
       
 14283             if (IN_param_value == NULL)
       
 14284               IN_param_value = function_call_param_iterator.next_nf();
       
 14285             if (IN_param_value != NULL) {
       
 14286               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14287               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14288             }
       
 14289             
       
 14290             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14291             {
       
 14292         
       
 14293                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14294                 
       
 14295                 if (IN_type_symbol == NULL)
       
 14296                   IN_type_symbol = last_type_symbol;
       
 14297                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14298                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14299                 function_type_prefix = return_type_symbol;
       
 14300                 break;
       
 14301                 
       
 14302             }
       
 14303             
       
 14304             
       
 14305             ERROR;
       
 14306         }
       
 14307         
       
 14308     }/*function_time_to_udint*/
       
 14309     break;
       
 14310 
       
 14311 /****
       
 14312  *TIME_TO_WORD
       
 14313  */
       
 14314     case function_time_to_word :
       
 14315     {
       
 14316         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14317 
       
 14318         {
       
 14319             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14321             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14322             symbol_c *IN_type_symbol = NULL;
       
 14323             
       
 14324             /* Get the value from a foo(<param_value>) style call */
       
 14325             if (IN_param_value == NULL)
       
 14326               IN_param_value = function_call_param_iterator.next_nf();
       
 14327             if (IN_param_value != NULL) {
       
 14328               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14329               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14330             }
       
 14331             
       
 14332             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14333             {
       
 14334         
       
 14335                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14336                 
       
 14337                 if (IN_type_symbol == NULL)
       
 14338                   IN_type_symbol = last_type_symbol;
       
 14339                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14340                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14341                 function_type_prefix = return_type_symbol;
       
 14342                 break;
       
 14343                 
       
 14344             }
       
 14345             
       
 14346             
       
 14347             ERROR;
       
 14348         }
       
 14349         
       
 14350     }/*function_time_to_word*/
       
 14351     break;
       
 14352 
       
 14353 /****
       
 14354  *TIME_TO_STRING
       
 14355  */
       
 14356     case function_time_to_string :
       
 14357     {
       
 14358         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14359 
       
 14360         {
       
 14361             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14363             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14364             symbol_c *IN_type_symbol = NULL;
       
 14365             
       
 14366             /* Get the value from a foo(<param_value>) style call */
       
 14367             if (IN_param_value == NULL)
       
 14368               IN_param_value = function_call_param_iterator.next_nf();
       
 14369             if (IN_param_value != NULL) {
       
 14370               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14371               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14372             }
       
 14373             
       
 14374             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14375             {
       
 14376         
       
 14377                 function_name = (symbol_c*)(new pragma_c("__time_to_string"));
       
 14378                 
       
 14379                 if (IN_type_symbol == NULL)
       
 14380                   IN_type_symbol = last_type_symbol;
       
 14381                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14382                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14383                 function_type_prefix = return_type_symbol;
       
 14384                 break;
       
 14385                 
       
 14386             }
       
 14387             
       
 14388             
       
 14389             ERROR;
       
 14390         }
       
 14391         
       
 14392     }/*function_time_to_string*/
       
 14393     break;
       
 14394 
       
 14395 /****
       
 14396  *TIME_TO_LWORD
       
 14397  */
       
 14398     case function_time_to_lword :
       
 14399     {
       
 14400         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14401 
       
 14402         {
       
 14403             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14404             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14405             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14406             symbol_c *IN_type_symbol = NULL;
       
 14407             
       
 14408             /* Get the value from a foo(<param_value>) style call */
       
 14409             if (IN_param_value == NULL)
       
 14410               IN_param_value = function_call_param_iterator.next_nf();
       
 14411             if (IN_param_value != NULL) {
       
 14412               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14413               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14414             }
       
 14415             
       
 14416             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14417             {
       
 14418         
       
 14419                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14420                 
       
 14421                 if (IN_type_symbol == NULL)
       
 14422                   IN_type_symbol = last_type_symbol;
       
 14423                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14424                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 14425                 function_type_prefix = return_type_symbol;
       
 14426                 break;
       
 14427                 
       
 14428             }
       
 14429             
       
 14430             
       
 14431             ERROR;
       
 14432         }
       
 14433         
       
 14434     }/*function_time_to_lword*/
       
 14435     break;
       
 14436 
       
 14437 /****
       
 14438  *TIME_TO_UINT
       
 14439  */
       
 14440     case function_time_to_uint :
       
 14441     {
       
 14442         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14443 
       
 14444         {
       
 14445             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14446             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14447             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14448             symbol_c *IN_type_symbol = NULL;
       
 14449             
       
 14450             /* Get the value from a foo(<param_value>) style call */
       
 14451             if (IN_param_value == NULL)
       
 14452               IN_param_value = function_call_param_iterator.next_nf();
       
 14453             if (IN_param_value != NULL) {
       
 14454               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14455               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14456             }
       
 14457             
       
 14458             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14459             {
       
 14460         
       
 14461                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14462                 
       
 14463                 if (IN_type_symbol == NULL)
       
 14464                   IN_type_symbol = last_type_symbol;
       
 14465                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14466                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14467                 function_type_prefix = return_type_symbol;
       
 14468                 break;
       
 14469                 
       
 14470             }
       
 14471             
       
 14472             
       
 14473             ERROR;
       
 14474         }
       
 14475         
       
 14476     }/*function_time_to_uint*/
       
 14477     break;
       
 14478 
       
 14479 /****
       
 14480  *TIME_TO_LREAL
       
 14481  */
       
 14482     case function_time_to_lreal :
       
 14483     {
       
 14484         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14485 
       
 14486         {
       
 14487             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14489             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14490             symbol_c *IN_type_symbol = NULL;
       
 14491             
       
 14492             /* Get the value from a foo(<param_value>) style call */
       
 14493             if (IN_param_value == NULL)
       
 14494               IN_param_value = function_call_param_iterator.next_nf();
       
 14495             if (IN_param_value != NULL) {
       
 14496               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14497               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14498             }
       
 14499             
       
 14500             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14501             {
       
 14502         
       
 14503                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
 14504                 
       
 14505                 if (IN_type_symbol == NULL)
       
 14506                   IN_type_symbol = last_type_symbol;
       
 14507                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14508                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14509                 function_type_prefix = return_type_symbol;
       
 14510                 break;
       
 14511                 
       
 14512             }
       
 14513             
       
 14514             
       
 14515             ERROR;
       
 14516         }
       
 14517         
       
 14518     }/*function_time_to_lreal*/
       
 14519     break;
       
 14520 
       
 14521 /****
       
 14522  *TIME_TO_BYTE
       
 14523  */
       
 14524     case function_time_to_byte :
       
 14525     {
       
 14526         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14527 
       
 14528         {
       
 14529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14532             symbol_c *IN_type_symbol = NULL;
       
 14533             
       
 14534             /* Get the value from a foo(<param_value>) style call */
       
 14535             if (IN_param_value == NULL)
       
 14536               IN_param_value = function_call_param_iterator.next_nf();
       
 14537             if (IN_param_value != NULL) {
       
 14538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14540             }
       
 14541             
       
 14542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14543             {
       
 14544         
       
 14545                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14546                 
       
 14547                 if (IN_type_symbol == NULL)
       
 14548                   IN_type_symbol = last_type_symbol;
       
 14549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14550                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 14551                 function_type_prefix = return_type_symbol;
       
 14552                 break;
       
 14553                 
       
 14554             }
       
 14555             
       
 14556             
       
 14557             ERROR;
       
 14558         }
       
 14559         
       
 14560     }/*function_time_to_byte*/
       
 14561     break;
       
 14562 
       
 14563 /****
       
 14564  *TIME_TO_USINT
       
 14565  */
       
 14566     case function_time_to_usint :
       
 14567     {
       
 14568         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14569 
       
 14570         {
       
 14571             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14572             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14573             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14574             symbol_c *IN_type_symbol = NULL;
       
 14575             
       
 14576             /* Get the value from a foo(<param_value>) style call */
       
 14577             if (IN_param_value == NULL)
       
 14578               IN_param_value = function_call_param_iterator.next_nf();
       
 14579             if (IN_param_value != NULL) {
       
 14580               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14581               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14582             }
       
 14583             
       
 14584             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14585             {
       
 14586         
       
 14587                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14588                 
       
 14589                 if (IN_type_symbol == NULL)
       
 14590                   IN_type_symbol = last_type_symbol;
       
 14591                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14592                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 14593                 function_type_prefix = return_type_symbol;
       
 14594                 break;
       
 14595                 
       
 14596             }
       
 14597             
       
 14598             
       
 14599             ERROR;
       
 14600         }
       
 14601         
       
 14602     }/*function_time_to_usint*/
       
 14603     break;
       
 14604 
       
 14605 /****
       
 14606  *TIME_TO_ULINT
       
 14607  */
       
 14608     case function_time_to_ulint :
       
 14609     {
       
 14610         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14611 
       
 14612         {
       
 14613             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14614             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14615             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14616             symbol_c *IN_type_symbol = NULL;
       
 14617             
       
 14618             /* Get the value from a foo(<param_value>) style call */
       
 14619             if (IN_param_value == NULL)
       
 14620               IN_param_value = function_call_param_iterator.next_nf();
       
 14621             if (IN_param_value != NULL) {
       
 14622               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14623               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14624             }
       
 14625             
       
 14626             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14627             {
       
 14628         
       
 14629                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14630                 
       
 14631                 if (IN_type_symbol == NULL)
       
 14632                   IN_type_symbol = last_type_symbol;
       
 14633                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14634                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14635                 function_type_prefix = return_type_symbol;
       
 14636                 break;
       
 14637                 
       
 14638             }
       
 14639             
       
 14640             
       
 14641             ERROR;
       
 14642         }
       
 14643         
       
 14644     }/*function_time_to_ulint*/
       
 14645     break;
       
 14646 
       
 14647 /****
       
 14648  *TIME_TO_INT
       
 14649  */
       
 14650     case function_time_to_int :
       
 14651     {
       
 14652         symbol_c *last_type_symbol = &search_constant_type_c::time_type_name;
       
 14653 
       
 14654         {
       
 14655             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14657             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14658             symbol_c *IN_type_symbol = NULL;
       
 14659             
       
 14660             /* Get the value from a foo(<param_value>) style call */
       
 14661             if (IN_param_value == NULL)
       
 14662               IN_param_value = function_call_param_iterator.next_nf();
       
 14663             if (IN_param_value != NULL) {
       
 14664               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14665               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14666             }
       
 14667             
       
 14668             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14669             {
       
 14670         
       
 14671                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14672                 
       
 14673                 if (IN_type_symbol == NULL)
       
 14674                   IN_type_symbol = last_type_symbol;
       
 14675                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14676                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14677                 function_type_prefix = return_type_symbol;
       
 14678                 break;
       
 14679                 
       
 14680             }
       
 14681             
       
 14682             
       
 14683             ERROR;
       
 14684         }
       
 14685         
       
 14686     }/*function_time_to_int*/
       
 14687     break;
       
 14688 
       
 14689 /****
       
 14690  *INT_TO_REAL
       
 14691  */
       
 14692     case function_int_to_real :
       
 14693     {
       
 14694         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14695 
       
 14696         {
       
 14697             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14698             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14699             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14700             symbol_c *IN_type_symbol = NULL;
       
 14701             
       
 14702             /* Get the value from a foo(<param_value>) style call */
       
 14703             if (IN_param_value == NULL)
       
 14704               IN_param_value = function_call_param_iterator.next_nf();
       
 14705             if (IN_param_value != NULL) {
       
 14706               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14707               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14708             }
       
 14709             
       
 14710             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14711             {
       
 14712         
       
 14713                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14714                 
       
 14715                 if (IN_type_symbol == NULL)
       
 14716                   IN_type_symbol = last_type_symbol;
       
 14717                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14718                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14719                 function_type_prefix = return_type_symbol;
       
 14720                 function_type_suffix = IN_type_symbol;
       
 14721                 break;
       
 14722                 
       
 14723             }
       
 14724             
       
 14725             
       
 14726             ERROR;
       
 14727         }
       
 14728         
       
 14729     }/*function_int_to_real*/
       
 14730     break;
       
 14731 
       
 14732 /****
       
 14733  *INT_TO_SINT
       
 14734  */
       
 14735     case function_int_to_sint :
       
 14736     {
       
 14737         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14738 
       
 14739         {
       
 14740             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14741             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14742             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14743             symbol_c *IN_type_symbol = NULL;
       
 14744             
       
 14745             /* Get the value from a foo(<param_value>) style call */
       
 14746             if (IN_param_value == NULL)
       
 14747               IN_param_value = function_call_param_iterator.next_nf();
       
 14748             if (IN_param_value != NULL) {
       
 14749               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14750               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14751             }
       
 14752             
       
 14753             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14754             {
       
 14755         
       
 14756                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14757                 
       
 14758                 if (IN_type_symbol == NULL)
       
 14759                   IN_type_symbol = last_type_symbol;
       
 14760                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14761                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14762                 function_type_prefix = return_type_symbol;
       
 14763                 function_type_suffix = IN_type_symbol;
       
 14764                 break;
       
 14765                 
       
 14766             }
       
 14767             
       
 14768             
       
 14769             ERROR;
       
 14770         }
       
 14771         
       
 14772     }/*function_int_to_sint*/
       
 14773     break;
       
 14774 
       
 14775 /****
       
 14776  *INT_TO_LINT
       
 14777  */
       
 14778     case function_int_to_lint :
       
 14779     {
       
 14780         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14781 
       
 14782         {
       
 14783             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14785             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14786             symbol_c *IN_type_symbol = NULL;
       
 14787             
       
 14788             /* Get the value from a foo(<param_value>) style call */
       
 14789             if (IN_param_value == NULL)
       
 14790               IN_param_value = function_call_param_iterator.next_nf();
       
 14791             if (IN_param_value != NULL) {
       
 14792               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14793               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14794             }
       
 14795             
       
 14796             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14797             {
       
 14798         
       
 14799                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14800                 
       
 14801                 if (IN_type_symbol == NULL)
       
 14802                   IN_type_symbol = last_type_symbol;
       
 14803                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14804                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14805                 function_type_prefix = return_type_symbol;
       
 14806                 function_type_suffix = IN_type_symbol;
       
 14807                 break;
       
 14808                 
       
 14809             }
       
 14810             
       
 14811             
       
 14812             ERROR;
       
 14813         }
       
 14814         
       
 14815     }/*function_int_to_lint*/
       
 14816     break;
       
 14817 
       
 14818 /****
       
 14819  *INT_TO_DINT
       
 14820  */
       
 14821     case function_int_to_dint :
       
 14822     {
       
 14823         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14824 
       
 14825         {
       
 14826             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14828             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14829             symbol_c *IN_type_symbol = NULL;
       
 14830             
       
 14831             /* Get the value from a foo(<param_value>) style call */
       
 14832             if (IN_param_value == NULL)
       
 14833               IN_param_value = function_call_param_iterator.next_nf();
       
 14834             if (IN_param_value != NULL) {
       
 14835               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14836               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14837             }
       
 14838             
       
 14839             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14840             {
       
 14841         
       
 14842                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14843                 
       
 14844                 if (IN_type_symbol == NULL)
       
 14845                   IN_type_symbol = last_type_symbol;
       
 14846                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14847                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14848                 function_type_prefix = return_type_symbol;
       
 14849                 function_type_suffix = IN_type_symbol;
       
 14850                 break;
       
 14851                 
       
 14852             }
       
 14853             
       
 14854             
       
 14855             ERROR;
       
 14856         }
       
 14857         
       
 14858     }/*function_int_to_dint*/
       
 14859     break;
       
 14860 
       
 14861 /****
       
 14862  *INT_TO_DATE
       
 14863  */
       
 14864     case function_int_to_date :
       
 14865     {
       
 14866         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14867 
       
 14868         {
       
 14869             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14870             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14871             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14872             symbol_c *IN_type_symbol = NULL;
       
 14873             
       
 14874             /* Get the value from a foo(<param_value>) style call */
       
 14875             if (IN_param_value == NULL)
       
 14876               IN_param_value = function_call_param_iterator.next_nf();
       
 14877             if (IN_param_value != NULL) {
       
 14878               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14879               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14880             }
       
 14881             
       
 14882             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14883             {
       
 14884         
       
 14885                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 14886                 
       
 14887                 if (IN_type_symbol == NULL)
       
 14888                   IN_type_symbol = last_type_symbol;
       
 14889                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14890                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 14891                 function_type_prefix = return_type_symbol;
       
 14892                 break;
       
 14893                 
       
 14894             }
       
 14895             
       
 14896             
       
 14897             ERROR;
       
 14898         }
       
 14899         
       
 14900     }/*function_int_to_date*/
       
 14901     break;
       
 14902 
       
 14903 /****
       
 14904  *INT_TO_DWORD
       
 14905  */
       
 14906     case function_int_to_dword :
       
 14907     {
       
 14908         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14909 
       
 14910         {
       
 14911             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14913             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14914             symbol_c *IN_type_symbol = NULL;
       
 14915             
       
 14916             /* Get the value from a foo(<param_value>) style call */
       
 14917             if (IN_param_value == NULL)
       
 14918               IN_param_value = function_call_param_iterator.next_nf();
       
 14919             if (IN_param_value != NULL) {
       
 14920               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14921               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14922             }
       
 14923             
       
 14924             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14925             {
       
 14926         
       
 14927                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14928                 
       
 14929                 if (IN_type_symbol == NULL)
       
 14930                   IN_type_symbol = last_type_symbol;
       
 14931                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14932                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 14933                 function_type_prefix = return_type_symbol;
       
 14934                 function_type_suffix = IN_type_symbol;
       
 14935                 break;
       
 14936                 
       
 14937             }
       
 14938             
       
 14939             
       
 14940             ERROR;
       
 14941         }
       
 14942         
       
 14943     }/*function_int_to_dword*/
       
 14944     break;
       
 14945 
       
 14946 /****
       
 14947  *INT_TO_DT
       
 14948  */
       
 14949     case function_int_to_dt :
       
 14950     {
       
 14951         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14952 
       
 14953         {
       
 14954             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14955             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14956             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14957             symbol_c *IN_type_symbol = NULL;
       
 14958             
       
 14959             /* Get the value from a foo(<param_value>) style call */
       
 14960             if (IN_param_value == NULL)
       
 14961               IN_param_value = function_call_param_iterator.next_nf();
       
 14962             if (IN_param_value != NULL) {
       
 14963               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14964               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14965             }
       
 14966             
       
 14967             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14968             {
       
 14969         
       
 14970                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 14971                 
       
 14972                 if (IN_type_symbol == NULL)
       
 14973                   IN_type_symbol = last_type_symbol;
       
 14974                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14975                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14976                 function_type_prefix = return_type_symbol;
       
 14977                 break;
       
 14978                 
       
 14979             }
       
 14980             
       
 14981             
       
 14982             ERROR;
       
 14983         }
       
 14984         
       
 14985     }/*function_int_to_dt*/
       
 14986     break;
       
 14987 
       
 14988 /****
       
 14989  *INT_TO_TOD
       
 14990  */
       
 14991     case function_int_to_tod :
       
 14992     {
       
 14993         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 14994 
       
 14995         {
       
 14996             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14997             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14998             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14999             symbol_c *IN_type_symbol = NULL;
       
 15000             
       
 15001             /* Get the value from a foo(<param_value>) style call */
       
 15002             if (IN_param_value == NULL)
       
 15003               IN_param_value = function_call_param_iterator.next_nf();
       
 15004             if (IN_param_value != NULL) {
       
 15005               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15006               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15007             }
       
 15008             
       
 15009             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15010             {
       
 15011         
       
 15012                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 15013                 
       
 15014                 if (IN_type_symbol == NULL)
       
 15015                   IN_type_symbol = last_type_symbol;
       
 15016                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15017                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15018                 function_type_prefix = return_type_symbol;
       
 15019                 break;
       
 15020                 
       
 15021             }
       
 15022             
       
 15023             
       
 15024             ERROR;
       
 15025         }
       
 15026         
       
 15027     }/*function_int_to_tod*/
       
 15028     break;
       
 15029 
       
 15030 /****
       
 15031  *INT_TO_UDINT
       
 15032  */
       
 15033     case function_int_to_udint :
       
 15034     {
       
 15035         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15036 
       
 15037         {
       
 15038             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15040             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15041             symbol_c *IN_type_symbol = NULL;
       
 15042             
       
 15043             /* Get the value from a foo(<param_value>) style call */
       
 15044             if (IN_param_value == NULL)
       
 15045               IN_param_value = function_call_param_iterator.next_nf();
       
 15046             if (IN_param_value != NULL) {
       
 15047               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15048               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15049             }
       
 15050             
       
 15051             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15052             {
       
 15053         
       
 15054                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15055                 
       
 15056                 if (IN_type_symbol == NULL)
       
 15057                   IN_type_symbol = last_type_symbol;
       
 15058                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15059                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15060                 function_type_prefix = return_type_symbol;
       
 15061                 function_type_suffix = IN_type_symbol;
       
 15062                 break;
       
 15063                 
       
 15064             }
       
 15065             
       
 15066             
       
 15067             ERROR;
       
 15068         }
       
 15069         
       
 15070     }/*function_int_to_udint*/
       
 15071     break;
       
 15072 
       
 15073 /****
       
 15074  *INT_TO_WORD
       
 15075  */
       
 15076     case function_int_to_word :
       
 15077     {
       
 15078         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15079 
       
 15080         {
       
 15081             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15082             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15083             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15084             symbol_c *IN_type_symbol = NULL;
       
 15085             
       
 15086             /* Get the value from a foo(<param_value>) style call */
       
 15087             if (IN_param_value == NULL)
       
 15088               IN_param_value = function_call_param_iterator.next_nf();
       
 15089             if (IN_param_value != NULL) {
       
 15090               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15091               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15092             }
       
 15093             
       
 15094             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15095             {
       
 15096         
       
 15097                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15098                 
       
 15099                 if (IN_type_symbol == NULL)
       
 15100                   IN_type_symbol = last_type_symbol;
       
 15101                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15102                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15103                 function_type_prefix = return_type_symbol;
       
 15104                 function_type_suffix = IN_type_symbol;
       
 15105                 break;
       
 15106                 
       
 15107             }
       
 15108             
       
 15109             
       
 15110             ERROR;
       
 15111         }
       
 15112         
       
 15113     }/*function_int_to_word*/
       
 15114     break;
       
 15115 
       
 15116 /****
       
 15117  *INT_TO_STRING
       
 15118  */
       
 15119     case function_int_to_string :
       
 15120     {
       
 15121         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15122 
       
 15123         {
       
 15124             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15125             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15126             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15127             symbol_c *IN_type_symbol = NULL;
       
 15128             
       
 15129             /* Get the value from a foo(<param_value>) style call */
       
 15130             if (IN_param_value == NULL)
       
 15131               IN_param_value = function_call_param_iterator.next_nf();
       
 15132             if (IN_param_value != NULL) {
       
 15133               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15134               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15135             }
       
 15136             
       
 15137             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15138             {
       
 15139         
       
 15140                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
 15141                 
       
 15142                 if (IN_type_symbol == NULL)
       
 15143                   IN_type_symbol = last_type_symbol;
       
 15144                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15145                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15146                 function_type_prefix = return_type_symbol;
       
 15147                 break;
       
 15148                 
       
 15149             }
       
 15150             
       
 15151             
       
 15152             ERROR;
       
 15153         }
       
 15154         
       
 15155     }/*function_int_to_string*/
       
 15156     break;
       
 15157 
       
 15158 /****
       
 15159  *INT_TO_LWORD
       
 15160  */
       
 15161     case function_int_to_lword :
       
 15162     {
       
 15163         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15164 
       
 15165         {
       
 15166             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15168             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15169             symbol_c *IN_type_symbol = NULL;
       
 15170             
       
 15171             /* Get the value from a foo(<param_value>) style call */
       
 15172             if (IN_param_value == NULL)
       
 15173               IN_param_value = function_call_param_iterator.next_nf();
       
 15174             if (IN_param_value != NULL) {
       
 15175               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15176               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15177             }
       
 15178             
       
 15179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15180             {
       
 15181         
       
 15182                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15183                 
       
 15184                 if (IN_type_symbol == NULL)
       
 15185                   IN_type_symbol = last_type_symbol;
       
 15186                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15187                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15188                 function_type_prefix = return_type_symbol;
       
 15189                 function_type_suffix = IN_type_symbol;
       
 15190                 break;
       
 15191                 
       
 15192             }
       
 15193             
       
 15194             
       
 15195             ERROR;
       
 15196         }
       
 15197         
       
 15198     }/*function_int_to_lword*/
       
 15199     break;
       
 15200 
       
 15201 /****
       
 15202  *INT_TO_UINT
       
 15203  */
       
 15204     case function_int_to_uint :
       
 15205     {
       
 15206         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15207 
       
 15208         {
       
 15209             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15210             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15211             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15212             symbol_c *IN_type_symbol = NULL;
       
 15213             
       
 15214             /* Get the value from a foo(<param_value>) style call */
       
 15215             if (IN_param_value == NULL)
       
 15216               IN_param_value = function_call_param_iterator.next_nf();
       
 15217             if (IN_param_value != NULL) {
       
 15218               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15219               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15220             }
       
 15221             
       
 15222             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15223             {
       
 15224         
       
 15225                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15226                 
       
 15227                 if (IN_type_symbol == NULL)
       
 15228                   IN_type_symbol = last_type_symbol;
       
 15229                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15230                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15231                 function_type_prefix = return_type_symbol;
       
 15232                 function_type_suffix = IN_type_symbol;
       
 15233                 break;
       
 15234                 
       
 15235             }
       
 15236             
       
 15237             
       
 15238             ERROR;
       
 15239         }
       
 15240         
       
 15241     }/*function_int_to_uint*/
       
 15242     break;
       
 15243 
       
 15244 /****
       
 15245  *INT_TO_LREAL
       
 15246  */
       
 15247     case function_int_to_lreal :
       
 15248     {
       
 15249         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15250 
       
 15251         {
       
 15252             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15253             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15254             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15255             symbol_c *IN_type_symbol = NULL;
       
 15256             
       
 15257             /* Get the value from a foo(<param_value>) style call */
       
 15258             if (IN_param_value == NULL)
       
 15259               IN_param_value = function_call_param_iterator.next_nf();
       
 15260             if (IN_param_value != NULL) {
       
 15261               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15262               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15263             }
       
 15264             
       
 15265             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15266             {
       
 15267         
       
 15268                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15269                 
       
 15270                 if (IN_type_symbol == NULL)
       
 15271                   IN_type_symbol = last_type_symbol;
       
 15272                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15273                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15274                 function_type_prefix = return_type_symbol;
       
 15275                 function_type_suffix = IN_type_symbol;
       
 15276                 break;
       
 15277                 
       
 15278             }
       
 15279             
       
 15280             
       
 15281             ERROR;
       
 15282         }
       
 15283         
       
 15284     }/*function_int_to_lreal*/
       
 15285     break;
       
 15286 
       
 15287 /****
       
 15288  *INT_TO_BYTE
       
 15289  */
       
 15290     case function_int_to_byte :
       
 15291     {
       
 15292         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15293 
       
 15294         {
       
 15295             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15297             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15298             symbol_c *IN_type_symbol = NULL;
       
 15299             
       
 15300             /* Get the value from a foo(<param_value>) style call */
       
 15301             if (IN_param_value == NULL)
       
 15302               IN_param_value = function_call_param_iterator.next_nf();
       
 15303             if (IN_param_value != NULL) {
       
 15304               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15305               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15306             }
       
 15307             
       
 15308             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15309             {
       
 15310         
       
 15311                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15312                 
       
 15313                 if (IN_type_symbol == NULL)
       
 15314                   IN_type_symbol = last_type_symbol;
       
 15315                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15316                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15317                 function_type_prefix = return_type_symbol;
       
 15318                 function_type_suffix = IN_type_symbol;
       
 15319                 break;
       
 15320                 
       
 15321             }
       
 15322             
       
 15323             
       
 15324             ERROR;
       
 15325         }
       
 15326         
       
 15327     }/*function_int_to_byte*/
       
 15328     break;
       
 15329 
       
 15330 /****
       
 15331  *INT_TO_USINT
       
 15332  */
       
 15333     case function_int_to_usint :
       
 15334     {
       
 15335         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15336 
       
 15337         {
       
 15338             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15339             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15340             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15341             symbol_c *IN_type_symbol = NULL;
       
 15342             
       
 15343             /* Get the value from a foo(<param_value>) style call */
       
 15344             if (IN_param_value == NULL)
       
 15345               IN_param_value = function_call_param_iterator.next_nf();
       
 15346             if (IN_param_value != NULL) {
       
 15347               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15348               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15349             }
       
 15350             
       
 15351             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15352             {
       
 15353         
       
 15354                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15355                 
       
 15356                 if (IN_type_symbol == NULL)
       
 15357                   IN_type_symbol = last_type_symbol;
       
 15358                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15359                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15360                 function_type_prefix = return_type_symbol;
       
 15361                 function_type_suffix = IN_type_symbol;
       
 15362                 break;
       
 15363                 
       
 15364             }
       
 15365             
       
 15366             
       
 15367             ERROR;
       
 15368         }
       
 15369         
       
 15370     }/*function_int_to_usint*/
       
 15371     break;
       
 15372 
       
 15373 /****
       
 15374  *INT_TO_ULINT
       
 15375  */
       
 15376     case function_int_to_ulint :
       
 15377     {
       
 15378         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15379 
       
 15380         {
       
 15381             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15382             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15383             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15384             symbol_c *IN_type_symbol = NULL;
       
 15385             
       
 15386             /* Get the value from a foo(<param_value>) style call */
       
 15387             if (IN_param_value == NULL)
       
 15388               IN_param_value = function_call_param_iterator.next_nf();
       
 15389             if (IN_param_value != NULL) {
       
 15390               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15391               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15392             }
       
 15393             
       
 15394             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15395             {
       
 15396         
       
 15397                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15398                 
       
 15399                 if (IN_type_symbol == NULL)
       
 15400                   IN_type_symbol = last_type_symbol;
       
 15401                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15402                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15403                 function_type_prefix = return_type_symbol;
       
 15404                 function_type_suffix = IN_type_symbol;
       
 15405                 break;
       
 15406                 
       
 15407             }
       
 15408             
       
 15409             
       
 15410             ERROR;
       
 15411         }
       
 15412         
       
 15413     }/*function_int_to_ulint*/
       
 15414     break;
       
 15415 
       
 15416 /****
       
 15417  *INT_TO_BOOL
       
 15418  */
       
 15419     case function_int_to_bool :
       
 15420     {
       
 15421         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15422 
       
 15423         {
       
 15424             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15426             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15427             symbol_c *IN_type_symbol = NULL;
       
 15428             
       
 15429             /* Get the value from a foo(<param_value>) style call */
       
 15430             if (IN_param_value == NULL)
       
 15431               IN_param_value = function_call_param_iterator.next_nf();
       
 15432             if (IN_param_value != NULL) {
       
 15433               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15434               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15435             }
       
 15436             
       
 15437             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15438             {
       
 15439         
       
 15440                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15441                 
       
 15442                 if (IN_type_symbol == NULL)
       
 15443                   IN_type_symbol = last_type_symbol;
       
 15444                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15445                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15446                 function_type_prefix = return_type_symbol;
       
 15447                 function_type_suffix = IN_type_symbol;
       
 15448                 break;
       
 15449                 
       
 15450             }
       
 15451             
       
 15452             
       
 15453             ERROR;
       
 15454         }
       
 15455         
       
 15456     }/*function_int_to_bool*/
       
 15457     break;
       
 15458 
       
 15459 /****
       
 15460  *INT_TO_TIME
       
 15461  */
       
 15462     case function_int_to_time :
       
 15463     {
       
 15464         symbol_c *last_type_symbol = &search_constant_type_c::int_type_name;
       
 15465 
       
 15466         {
       
 15467             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15468             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15469             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15470             symbol_c *IN_type_symbol = NULL;
       
 15471             
       
 15472             /* Get the value from a foo(<param_value>) style call */
       
 15473             if (IN_param_value == NULL)
       
 15474               IN_param_value = function_call_param_iterator.next_nf();
       
 15475             if (IN_param_value != NULL) {
       
 15476               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15477               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15478             }
       
 15479             
       
 15480             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15481             {
       
 15482         
       
 15483                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 15484                 
       
 15485                 if (IN_type_symbol == NULL)
       
 15486                   IN_type_symbol = last_type_symbol;
       
 15487                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15488                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15489                 function_type_prefix = return_type_symbol;
       
 15490                 break;
       
 15491                 
       
 15492             }
       
 15493             
       
 15494             
       
 15495             ERROR;
       
 15496         }
       
 15497         
       
 15498     }/*function_int_to_time*/
       
 15499     break;
       
 15500 
       
 15501 /****
       
 15502  *TRUNC
       
 15503  */
       
 15504     case function_trunc :
       
 15505     {
    34         symbol_c *last_type_symbol = NULL;
 15506         symbol_c *last_type_symbol = NULL;
    35 
 15507 
    36         {
 15508         {
    37             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15509             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
    38             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15510             /* Get the value from a foo(<param_name> = <param_value>) style call */
    45             if (IN_param_value != NULL) {
 15517             if (IN_param_value != NULL) {
    46               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15518               IN_type_symbol = search_expression_type->get_type(IN_param_value);
    47               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15519               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    48             }
 15520             }
    49             
 15521             
    50             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 15522             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
    51             {
       
    52         
       
    53                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
    54                 
       
    55                 if (IN_type_symbol == NULL)
       
    56                   IN_type_symbol = last_type_symbol;
       
    57                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
    58                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    59                 function_type_prefix = return_type_symbol;
       
    60                 break;
       
    61                 
       
    62             }
       
    63             
       
    64             
       
    65             ERROR;
       
    66         }
       
    67         
       
    68     }/*function_real_to_sint*/
       
    69     break;
       
    70 
       
    71 /****
       
    72  *REAL_TO_LINT
       
    73  */
       
    74     case function_real_to_lint :
       
    75     {
       
    76         symbol_c *last_type_symbol = NULL;
       
    77 
       
    78         {
       
    79             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
    80             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    81             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
    82             symbol_c *IN_type_symbol = NULL;
       
    83             
       
    84             /* Get the value from a foo(<param_value>) style call */
       
    85             if (IN_param_value == NULL)
       
    86               IN_param_value = function_call_param_iterator.next_nf();
       
    87             if (IN_param_value != NULL) {
       
    88               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    89               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    90             }
       
    91             
       
    92             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
    93             {
       
    94         
       
    95                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
    96                 
       
    97                 if (IN_type_symbol == NULL)
       
    98                   IN_type_symbol = last_type_symbol;
       
    99                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   100                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   101                 function_type_prefix = return_type_symbol;
       
   102                 break;
       
   103                 
       
   104             }
       
   105             
       
   106             
       
   107             ERROR;
       
   108         }
       
   109         
       
   110     }/*function_real_to_lint*/
       
   111     break;
       
   112 
       
   113 /****
       
   114  *REAL_TO_DINT
       
   115  */
       
   116     case function_real_to_dint :
       
   117     {
       
   118         symbol_c *last_type_symbol = NULL;
       
   119 
       
   120         {
       
   121             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   122             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   123             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   124             symbol_c *IN_type_symbol = NULL;
       
   125             
       
   126             /* Get the value from a foo(<param_value>) style call */
       
   127             if (IN_param_value == NULL)
       
   128               IN_param_value = function_call_param_iterator.next_nf();
       
   129             if (IN_param_value != NULL) {
       
   130               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   131               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   132             }
       
   133             
       
   134             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   135             {
       
   136         
       
   137                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
   138                 
       
   139                 if (IN_type_symbol == NULL)
       
   140                   IN_type_symbol = last_type_symbol;
       
   141                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   142                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   143                 function_type_prefix = return_type_symbol;
       
   144                 break;
       
   145                 
       
   146             }
       
   147             
       
   148             
       
   149             ERROR;
       
   150         }
       
   151         
       
   152     }/*function_real_to_dint*/
       
   153     break;
       
   154 
       
   155 /****
       
   156  *REAL_TO_DATE
       
   157  */
       
   158     case function_real_to_date :
       
   159     {
       
   160         symbol_c *last_type_symbol = NULL;
       
   161 
       
   162         {
       
   163             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   165             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   166             symbol_c *IN_type_symbol = NULL;
       
   167             
       
   168             /* Get the value from a foo(<param_value>) style call */
       
   169             if (IN_param_value == NULL)
       
   170               IN_param_value = function_call_param_iterator.next_nf();
       
   171             if (IN_param_value != NULL) {
       
   172               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   173               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   174             }
       
   175             
       
   176             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   177             {
       
   178         
       
   179                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   180                 
       
   181                 if (IN_type_symbol == NULL)
       
   182                   IN_type_symbol = last_type_symbol;
       
   183                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   184                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   185                 function_type_prefix = return_type_symbol;
       
   186                 break;
       
   187                 
       
   188             }
       
   189             
       
   190             
       
   191             ERROR;
       
   192         }
       
   193         
       
   194     }/*function_real_to_date*/
       
   195     break;
       
   196 
       
   197 /****
       
   198  *REAL_TO_DWORD
       
   199  */
       
   200     case function_real_to_dword :
       
   201     {
       
   202         symbol_c *last_type_symbol = NULL;
       
   203 
       
   204         {
       
   205             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   206             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   207             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   208             symbol_c *IN_type_symbol = NULL;
       
   209             
       
   210             /* Get the value from a foo(<param_value>) style call */
       
   211             if (IN_param_value == NULL)
       
   212               IN_param_value = function_call_param_iterator.next_nf();
       
   213             if (IN_param_value != NULL) {
       
   214               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   215               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   216             }
       
   217             
       
   218             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   219             {
       
   220         
       
   221                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   222                 
       
   223                 if (IN_type_symbol == NULL)
       
   224                   IN_type_symbol = last_type_symbol;
       
   225                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   226                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   227                 function_type_prefix = return_type_symbol;
       
   228                 break;
       
   229                 
       
   230             }
       
   231             
       
   232             
       
   233             ERROR;
       
   234         }
       
   235         
       
   236     }/*function_real_to_dword*/
       
   237     break;
       
   238 
       
   239 /****
       
   240  *REAL_TO_DT
       
   241  */
       
   242     case function_real_to_dt :
       
   243     {
       
   244         symbol_c *last_type_symbol = NULL;
       
   245 
       
   246         {
       
   247             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   249             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   250             symbol_c *IN_type_symbol = NULL;
       
   251             
       
   252             /* Get the value from a foo(<param_value>) style call */
       
   253             if (IN_param_value == NULL)
       
   254               IN_param_value = function_call_param_iterator.next_nf();
       
   255             if (IN_param_value != NULL) {
       
   256               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   257               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   258             }
       
   259             
       
   260             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   261             {
       
   262         
       
   263                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   264                 
       
   265                 if (IN_type_symbol == NULL)
       
   266                   IN_type_symbol = last_type_symbol;
       
   267                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   268                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   269                 function_type_prefix = return_type_symbol;
       
   270                 break;
       
   271                 
       
   272             }
       
   273             
       
   274             
       
   275             ERROR;
       
   276         }
       
   277         
       
   278     }/*function_real_to_dt*/
       
   279     break;
       
   280 
       
   281 /****
       
   282  *REAL_TO_TOD
       
   283  */
       
   284     case function_real_to_tod :
       
   285     {
       
   286         symbol_c *last_type_symbol = NULL;
       
   287 
       
   288         {
       
   289             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   291             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   292             symbol_c *IN_type_symbol = NULL;
       
   293             
       
   294             /* Get the value from a foo(<param_value>) style call */
       
   295             if (IN_param_value == NULL)
       
   296               IN_param_value = function_call_param_iterator.next_nf();
       
   297             if (IN_param_value != NULL) {
       
   298               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   299               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   300             }
       
   301             
       
   302             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   303             {
       
   304         
       
   305                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   306                 
       
   307                 if (IN_type_symbol == NULL)
       
   308                   IN_type_symbol = last_type_symbol;
       
   309                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   310                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   311                 function_type_prefix = return_type_symbol;
       
   312                 break;
       
   313                 
       
   314             }
       
   315             
       
   316             
       
   317             ERROR;
       
   318         }
       
   319         
       
   320     }/*function_real_to_tod*/
       
   321     break;
       
   322 
       
   323 /****
       
   324  *REAL_TO_UDINT
       
   325  */
       
   326     case function_real_to_udint :
       
   327     {
       
   328         symbol_c *last_type_symbol = NULL;
       
   329 
       
   330         {
       
   331             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   333             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   334             symbol_c *IN_type_symbol = NULL;
       
   335             
       
   336             /* Get the value from a foo(<param_value>) style call */
       
   337             if (IN_param_value == NULL)
       
   338               IN_param_value = function_call_param_iterator.next_nf();
       
   339             if (IN_param_value != NULL) {
       
   340               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   341               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   342             }
       
   343             
       
   344             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   345             {
       
   346         
       
   347                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   348                 
       
   349                 if (IN_type_symbol == NULL)
       
   350                   IN_type_symbol = last_type_symbol;
       
   351                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   352                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   353                 function_type_prefix = return_type_symbol;
       
   354                 break;
       
   355                 
       
   356             }
       
   357             
       
   358             
       
   359             ERROR;
       
   360         }
       
   361         
       
   362     }/*function_real_to_udint*/
       
   363     break;
       
   364 
       
   365 /****
       
   366  *REAL_TO_WORD
       
   367  */
       
   368     case function_real_to_word :
       
   369     {
       
   370         symbol_c *last_type_symbol = NULL;
       
   371 
       
   372         {
       
   373             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   374             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   375             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   376             symbol_c *IN_type_symbol = NULL;
       
   377             
       
   378             /* Get the value from a foo(<param_value>) style call */
       
   379             if (IN_param_value == NULL)
       
   380               IN_param_value = function_call_param_iterator.next_nf();
       
   381             if (IN_param_value != NULL) {
       
   382               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   383               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   384             }
       
   385             
       
   386             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   387             {
       
   388         
       
   389                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   390                 
       
   391                 if (IN_type_symbol == NULL)
       
   392                   IN_type_symbol = last_type_symbol;
       
   393                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   394                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   395                 function_type_prefix = return_type_symbol;
       
   396                 break;
       
   397                 
       
   398             }
       
   399             
       
   400             
       
   401             ERROR;
       
   402         }
       
   403         
       
   404     }/*function_real_to_word*/
       
   405     break;
       
   406 
       
   407 /****
       
   408  *REAL_TO_STRING
       
   409  */
       
   410     case function_real_to_string :
       
   411     {
       
   412         symbol_c *last_type_symbol = NULL;
       
   413 
       
   414         {
       
   415             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   417             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   418             symbol_c *IN_type_symbol = NULL;
       
   419             
       
   420             /* Get the value from a foo(<param_value>) style call */
       
   421             if (IN_param_value == NULL)
       
   422               IN_param_value = function_call_param_iterator.next_nf();
       
   423             if (IN_param_value != NULL) {
       
   424               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   425               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   426             }
       
   427             
       
   428             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   429             {
       
   430         
       
   431                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
       
   432                 
       
   433                 if (IN_type_symbol == NULL)
       
   434                   IN_type_symbol = last_type_symbol;
       
   435                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   436                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   437                 function_type_prefix = return_type_symbol;
       
   438                 break;
       
   439                 
       
   440             }
       
   441             
       
   442             
       
   443             ERROR;
       
   444         }
       
   445         
       
   446     }/*function_real_to_string*/
       
   447     break;
       
   448 
       
   449 /****
       
   450  *REAL_TO_LWORD
       
   451  */
       
   452     case function_real_to_lword :
       
   453     {
       
   454         symbol_c *last_type_symbol = NULL;
       
   455 
       
   456         {
       
   457             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   458             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   459             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   460             symbol_c *IN_type_symbol = NULL;
       
   461             
       
   462             /* Get the value from a foo(<param_value>) style call */
       
   463             if (IN_param_value == NULL)
       
   464               IN_param_value = function_call_param_iterator.next_nf();
       
   465             if (IN_param_value != NULL) {
       
   466               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   467               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   468             }
       
   469             
       
   470             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   471             {
       
   472         
       
   473                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   474                 
       
   475                 if (IN_type_symbol == NULL)
       
   476                   IN_type_symbol = last_type_symbol;
       
   477                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   478                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   479                 function_type_prefix = return_type_symbol;
       
   480                 break;
       
   481                 
       
   482             }
       
   483             
       
   484             
       
   485             ERROR;
       
   486         }
       
   487         
       
   488     }/*function_real_to_lword*/
       
   489     break;
       
   490 
       
   491 /****
       
   492  *REAL_TO_UINT
       
   493  */
       
   494     case function_real_to_uint :
       
   495     {
       
   496         symbol_c *last_type_symbol = NULL;
       
   497 
       
   498         {
       
   499             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   500             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   501             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   502             symbol_c *IN_type_symbol = NULL;
       
   503             
       
   504             /* Get the value from a foo(<param_value>) style call */
       
   505             if (IN_param_value == NULL)
       
   506               IN_param_value = function_call_param_iterator.next_nf();
       
   507             if (IN_param_value != NULL) {
       
   508               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   509               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   510             }
       
   511             
       
   512             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   513             {
       
   514         
       
   515                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   516                 
       
   517                 if (IN_type_symbol == NULL)
       
   518                   IN_type_symbol = last_type_symbol;
       
   519                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   520                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   521                 function_type_prefix = return_type_symbol;
       
   522                 break;
       
   523                 
       
   524             }
       
   525             
       
   526             
       
   527             ERROR;
       
   528         }
       
   529         
       
   530     }/*function_real_to_uint*/
       
   531     break;
       
   532 
       
   533 /****
       
   534  *REAL_TO_LREAL
       
   535  */
       
   536     case function_real_to_lreal :
       
   537     {
       
   538         symbol_c *last_type_symbol = NULL;
       
   539 
       
   540         {
       
   541             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   542             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   543             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   544             symbol_c *IN_type_symbol = NULL;
       
   545             
       
   546             /* Get the value from a foo(<param_value>) style call */
       
   547             if (IN_param_value == NULL)
       
   548               IN_param_value = function_call_param_iterator.next_nf();
       
   549             if (IN_param_value != NULL) {
       
   550               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   551               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   552             }
       
   553             
       
   554             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   555             {
 15523             {
   556         
 15524         
   557                 function_name = (symbol_c*)(new pragma_c("__move_"));
 15525                 function_name = (symbol_c*)(new pragma_c("__move_"));
   558                 
       
   559                 if (IN_type_symbol == NULL)
       
   560                   IN_type_symbol = last_type_symbol;
       
   561                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   562                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   563                 function_type_prefix = return_type_symbol;
       
   564                 function_type_suffix = IN_type_symbol;
       
   565                 break;
       
   566                 
       
   567             }
       
   568             
       
   569             
       
   570             ERROR;
       
   571         }
       
   572         
       
   573     }/*function_real_to_lreal*/
       
   574     break;
       
   575 
       
   576 /****
       
   577  *REAL_TO_BYTE
       
   578  */
       
   579     case function_real_to_byte :
       
   580     {
       
   581         symbol_c *last_type_symbol = NULL;
       
   582 
       
   583         {
       
   584             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   585             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   586             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   587             symbol_c *IN_type_symbol = NULL;
       
   588             
       
   589             /* Get the value from a foo(<param_value>) style call */
       
   590             if (IN_param_value == NULL)
       
   591               IN_param_value = function_call_param_iterator.next_nf();
       
   592             if (IN_param_value != NULL) {
       
   593               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   594               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   595             }
       
   596             
       
   597             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   598             {
       
   599         
       
   600                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   601                 
       
   602                 if (IN_type_symbol == NULL)
       
   603                   IN_type_symbol = last_type_symbol;
       
   604                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   605                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   606                 function_type_prefix = return_type_symbol;
       
   607                 break;
       
   608                 
       
   609             }
       
   610             
       
   611             
       
   612             ERROR;
       
   613         }
       
   614         
       
   615     }/*function_real_to_byte*/
       
   616     break;
       
   617 
       
   618 /****
       
   619  *REAL_TO_USINT
       
   620  */
       
   621     case function_real_to_usint :
       
   622     {
       
   623         symbol_c *last_type_symbol = NULL;
       
   624 
       
   625         {
       
   626             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   627             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   628             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   629             symbol_c *IN_type_symbol = NULL;
       
   630             
       
   631             /* Get the value from a foo(<param_value>) style call */
       
   632             if (IN_param_value == NULL)
       
   633               IN_param_value = function_call_param_iterator.next_nf();
       
   634             if (IN_param_value != NULL) {
       
   635               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   636               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   637             }
       
   638             
       
   639             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   640             {
       
   641         
       
   642                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   643                 
       
   644                 if (IN_type_symbol == NULL)
       
   645                   IN_type_symbol = last_type_symbol;
       
   646                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   647                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   648                 function_type_prefix = return_type_symbol;
       
   649                 break;
       
   650                 
       
   651             }
       
   652             
       
   653             
       
   654             ERROR;
       
   655         }
       
   656         
       
   657     }/*function_real_to_usint*/
       
   658     break;
       
   659 
       
   660 /****
       
   661  *REAL_TO_ULINT
       
   662  */
       
   663     case function_real_to_ulint :
       
   664     {
       
   665         symbol_c *last_type_symbol = NULL;
       
   666 
       
   667         {
       
   668             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   669             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   670             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   671             symbol_c *IN_type_symbol = NULL;
       
   672             
       
   673             /* Get the value from a foo(<param_value>) style call */
       
   674             if (IN_param_value == NULL)
       
   675               IN_param_value = function_call_param_iterator.next_nf();
       
   676             if (IN_param_value != NULL) {
       
   677               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   678               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   679             }
       
   680             
       
   681             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   682             {
       
   683         
       
   684                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
   685                 
       
   686                 if (IN_type_symbol == NULL)
       
   687                   IN_type_symbol = last_type_symbol;
       
   688                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   689                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   690                 function_type_prefix = return_type_symbol;
       
   691                 break;
       
   692                 
       
   693             }
       
   694             
       
   695             
       
   696             ERROR;
       
   697         }
       
   698         
       
   699     }/*function_real_to_ulint*/
       
   700     break;
       
   701 
       
   702 /****
       
   703  *REAL_TO_BOOL
       
   704  */
       
   705     case function_real_to_bool :
       
   706     {
       
   707         symbol_c *last_type_symbol = NULL;
       
   708 
       
   709         {
       
   710             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   711             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   712             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   713             symbol_c *IN_type_symbol = NULL;
       
   714             
       
   715             /* Get the value from a foo(<param_value>) style call */
       
   716             if (IN_param_value == NULL)
       
   717               IN_param_value = function_call_param_iterator.next_nf();
       
   718             if (IN_param_value != NULL) {
       
   719               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   720               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   721             }
       
   722             
       
   723             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   724             {
       
   725         
       
   726                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
   727                 
       
   728                 if (IN_type_symbol == NULL)
       
   729                   IN_type_symbol = last_type_symbol;
       
   730                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   731                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   732                 function_type_prefix = return_type_symbol;
       
   733                 break;
       
   734                 
       
   735             }
       
   736             
       
   737             
       
   738             ERROR;
       
   739         }
       
   740         
       
   741     }/*function_real_to_bool*/
       
   742     break;
       
   743 
       
   744 /****
       
   745  *REAL_TO_TIME
       
   746  */
       
   747     case function_real_to_time :
       
   748     {
       
   749         symbol_c *last_type_symbol = NULL;
       
   750 
       
   751         {
       
   752             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   753             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   754             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   755             symbol_c *IN_type_symbol = NULL;
       
   756             
       
   757             /* Get the value from a foo(<param_value>) style call */
       
   758             if (IN_param_value == NULL)
       
   759               IN_param_value = function_call_param_iterator.next_nf();
       
   760             if (IN_param_value != NULL) {
       
   761               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   762               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   763             }
       
   764             
       
   765             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   766             {
       
   767         
       
   768                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
   769                 
       
   770                 if (IN_type_symbol == NULL)
       
   771                   IN_type_symbol = last_type_symbol;
       
   772                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   773                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   774                 function_type_prefix = return_type_symbol;
       
   775                 break;
       
   776                 
       
   777             }
       
   778             
       
   779             
       
   780             ERROR;
       
   781         }
       
   782         
       
   783     }/*function_real_to_time*/
       
   784     break;
       
   785 
       
   786 /****
       
   787  *REAL_TO_INT
       
   788  */
       
   789     case function_real_to_int :
       
   790     {
       
   791         symbol_c *last_type_symbol = NULL;
       
   792 
       
   793         {
       
   794             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   796             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   797             symbol_c *IN_type_symbol = NULL;
       
   798             
       
   799             /* Get the value from a foo(<param_value>) style call */
       
   800             if (IN_param_value == NULL)
       
   801               IN_param_value = function_call_param_iterator.next_nf();
       
   802             if (IN_param_value != NULL) {
       
   803               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   804               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   805             }
       
   806             
       
   807             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   808             {
       
   809         
       
   810                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
   811                 
       
   812                 if (IN_type_symbol == NULL)
       
   813                   IN_type_symbol = last_type_symbol;
       
   814                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   815                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   816                 function_type_prefix = return_type_symbol;
       
   817                 break;
       
   818                 
       
   819             }
       
   820             
       
   821             
       
   822             ERROR;
       
   823         }
       
   824         
       
   825     }/*function_real_to_int*/
       
   826     break;
       
   827 
       
   828 /****
       
   829  *SINT_TO_REAL
       
   830  */
       
   831     case function_sint_to_real :
       
   832     {
       
   833         symbol_c *last_type_symbol = NULL;
       
   834 
       
   835         {
       
   836             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   837             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   838             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   839             symbol_c *IN_type_symbol = NULL;
       
   840             
       
   841             /* Get the value from a foo(<param_value>) style call */
       
   842             if (IN_param_value == NULL)
       
   843               IN_param_value = function_call_param_iterator.next_nf();
       
   844             if (IN_param_value != NULL) {
       
   845               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   846               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   847             }
       
   848             
       
   849             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   850             {
       
   851         
       
   852                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   853                 
       
   854                 if (IN_type_symbol == NULL)
       
   855                   IN_type_symbol = last_type_symbol;
       
   856                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   857                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   858                 function_type_prefix = return_type_symbol;
       
   859                 function_type_suffix = IN_type_symbol;
       
   860                 break;
       
   861                 
       
   862             }
       
   863             
       
   864             
       
   865             ERROR;
       
   866         }
       
   867         
       
   868     }/*function_sint_to_real*/
       
   869     break;
       
   870 
       
   871 /****
       
   872  *SINT_TO_LINT
       
   873  */
       
   874     case function_sint_to_lint :
       
   875     {
       
   876         symbol_c *last_type_symbol = NULL;
       
   877 
       
   878         {
       
   879             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   881             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   882             symbol_c *IN_type_symbol = NULL;
       
   883             
       
   884             /* Get the value from a foo(<param_value>) style call */
       
   885             if (IN_param_value == NULL)
       
   886               IN_param_value = function_call_param_iterator.next_nf();
       
   887             if (IN_param_value != NULL) {
       
   888               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   889               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   890             }
       
   891             
       
   892             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   893             {
       
   894         
       
   895                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   896                 
       
   897                 if (IN_type_symbol == NULL)
       
   898                   IN_type_symbol = last_type_symbol;
       
   899                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   900                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   901                 function_type_prefix = return_type_symbol;
       
   902                 function_type_suffix = IN_type_symbol;
       
   903                 break;
       
   904                 
       
   905             }
       
   906             
       
   907             
       
   908             ERROR;
       
   909         }
       
   910         
       
   911     }/*function_sint_to_lint*/
       
   912     break;
       
   913 
       
   914 /****
       
   915  *SINT_TO_DINT
       
   916  */
       
   917     case function_sint_to_dint :
       
   918     {
       
   919         symbol_c *last_type_symbol = NULL;
       
   920 
       
   921         {
       
   922             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   923             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   924             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   925             symbol_c *IN_type_symbol = NULL;
       
   926             
       
   927             /* Get the value from a foo(<param_value>) style call */
       
   928             if (IN_param_value == NULL)
       
   929               IN_param_value = function_call_param_iterator.next_nf();
       
   930             if (IN_param_value != NULL) {
       
   931               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   932               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   933             }
       
   934             
       
   935             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   936             {
       
   937         
       
   938                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   939                 
       
   940                 if (IN_type_symbol == NULL)
       
   941                   IN_type_symbol = last_type_symbol;
       
   942                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   943                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   944                 function_type_prefix = return_type_symbol;
       
   945                 function_type_suffix = IN_type_symbol;
       
   946                 break;
       
   947                 
       
   948             }
       
   949             
       
   950             
       
   951             ERROR;
       
   952         }
       
   953         
       
   954     }/*function_sint_to_dint*/
       
   955     break;
       
   956 
       
   957 /****
       
   958  *SINT_TO_DATE
       
   959  */
       
   960     case function_sint_to_date :
       
   961     {
       
   962         symbol_c *last_type_symbol = NULL;
       
   963 
       
   964         {
       
   965             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   966             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   967             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   968             symbol_c *IN_type_symbol = NULL;
       
   969             
       
   970             /* Get the value from a foo(<param_value>) style call */
       
   971             if (IN_param_value == NULL)
       
   972               IN_param_value = function_call_param_iterator.next_nf();
       
   973             if (IN_param_value != NULL) {
       
   974               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   975               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   976             }
       
   977             
       
   978             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   979             {
       
   980         
       
   981                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
   982                 
       
   983                 if (IN_type_symbol == NULL)
       
   984                   IN_type_symbol = last_type_symbol;
       
   985                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   986                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   987                 function_type_prefix = return_type_symbol;
       
   988                 break;
       
   989                 
       
   990             }
       
   991             
       
   992             
       
   993             ERROR;
       
   994         }
       
   995         
       
   996     }/*function_sint_to_date*/
       
   997     break;
       
   998 
       
   999 /****
       
  1000  *SINT_TO_DWORD
       
  1001  */
       
  1002     case function_sint_to_dword :
       
  1003     {
       
  1004         symbol_c *last_type_symbol = NULL;
       
  1005 
       
  1006         {
       
  1007             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1009             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1010             symbol_c *IN_type_symbol = NULL;
       
  1011             
       
  1012             /* Get the value from a foo(<param_value>) style call */
       
  1013             if (IN_param_value == NULL)
       
  1014               IN_param_value = function_call_param_iterator.next_nf();
       
  1015             if (IN_param_value != NULL) {
       
  1016               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1017               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1018             }
       
  1019             
       
  1020             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1021             {
       
  1022         
       
  1023                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1024                 
       
  1025                 if (IN_type_symbol == NULL)
       
  1026                   IN_type_symbol = last_type_symbol;
       
  1027                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1029                 function_type_prefix = return_type_symbol;
       
  1030                 function_type_suffix = IN_type_symbol;
       
  1031                 break;
       
  1032                 
       
  1033             }
       
  1034             
       
  1035             
       
  1036             ERROR;
       
  1037         }
       
  1038         
       
  1039     }/*function_sint_to_dword*/
       
  1040     break;
       
  1041 
       
  1042 /****
       
  1043  *SINT_TO_DT
       
  1044  */
       
  1045     case function_sint_to_dt :
       
  1046     {
       
  1047         symbol_c *last_type_symbol = NULL;
       
  1048 
       
  1049         {
       
  1050             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1052             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1053             symbol_c *IN_type_symbol = NULL;
       
  1054             
       
  1055             /* Get the value from a foo(<param_value>) style call */
       
  1056             if (IN_param_value == NULL)
       
  1057               IN_param_value = function_call_param_iterator.next_nf();
       
  1058             if (IN_param_value != NULL) {
       
  1059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1061             }
       
  1062             
       
  1063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1064             {
       
  1065         
       
  1066                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1067                 
       
  1068                 if (IN_type_symbol == NULL)
       
  1069                   IN_type_symbol = last_type_symbol;
       
  1070                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1071                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1072                 function_type_prefix = return_type_symbol;
       
  1073                 break;
       
  1074                 
       
  1075             }
       
  1076             
       
  1077             
       
  1078             ERROR;
       
  1079         }
       
  1080         
       
  1081     }/*function_sint_to_dt*/
       
  1082     break;
       
  1083 
       
  1084 /****
       
  1085  *SINT_TO_TOD
       
  1086  */
       
  1087     case function_sint_to_tod :
       
  1088     {
       
  1089         symbol_c *last_type_symbol = NULL;
       
  1090 
       
  1091         {
       
  1092             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1094             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1095             symbol_c *IN_type_symbol = NULL;
       
  1096             
       
  1097             /* Get the value from a foo(<param_value>) style call */
       
  1098             if (IN_param_value == NULL)
       
  1099               IN_param_value = function_call_param_iterator.next_nf();
       
  1100             if (IN_param_value != NULL) {
       
  1101               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1102               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1103             }
       
  1104             
       
  1105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1106             {
       
  1107         
       
  1108                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1109                 
       
  1110                 if (IN_type_symbol == NULL)
       
  1111                   IN_type_symbol = last_type_symbol;
       
  1112                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1113                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1114                 function_type_prefix = return_type_symbol;
       
  1115                 break;
       
  1116                 
       
  1117             }
       
  1118             
       
  1119             
       
  1120             ERROR;
       
  1121         }
       
  1122         
       
  1123     }/*function_sint_to_tod*/
       
  1124     break;
       
  1125 
       
  1126 /****
       
  1127  *SINT_TO_UDINT
       
  1128  */
       
  1129     case function_sint_to_udint :
       
  1130     {
       
  1131         symbol_c *last_type_symbol = NULL;
       
  1132 
       
  1133         {
       
  1134             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1135             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1136             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1137             symbol_c *IN_type_symbol = NULL;
       
  1138             
       
  1139             /* Get the value from a foo(<param_value>) style call */
       
  1140             if (IN_param_value == NULL)
       
  1141               IN_param_value = function_call_param_iterator.next_nf();
       
  1142             if (IN_param_value != NULL) {
       
  1143               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1144               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1145             }
       
  1146             
       
  1147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1148             {
       
  1149         
       
  1150                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1151                 
       
  1152                 if (IN_type_symbol == NULL)
       
  1153                   IN_type_symbol = last_type_symbol;
       
  1154                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1155                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1156                 function_type_prefix = return_type_symbol;
       
  1157                 function_type_suffix = IN_type_symbol;
       
  1158                 break;
       
  1159                 
       
  1160             }
       
  1161             
       
  1162             
       
  1163             ERROR;
       
  1164         }
       
  1165         
       
  1166     }/*function_sint_to_udint*/
       
  1167     break;
       
  1168 
       
  1169 /****
       
  1170  *SINT_TO_WORD
       
  1171  */
       
  1172     case function_sint_to_word :
       
  1173     {
       
  1174         symbol_c *last_type_symbol = NULL;
       
  1175 
       
  1176         {
       
  1177             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1178             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1179             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1180             symbol_c *IN_type_symbol = NULL;
       
  1181             
       
  1182             /* Get the value from a foo(<param_value>) style call */
       
  1183             if (IN_param_value == NULL)
       
  1184               IN_param_value = function_call_param_iterator.next_nf();
       
  1185             if (IN_param_value != NULL) {
       
  1186               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1187               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1188             }
       
  1189             
       
  1190             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1191             {
       
  1192         
       
  1193                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1194                 
       
  1195                 if (IN_type_symbol == NULL)
       
  1196                   IN_type_symbol = last_type_symbol;
       
  1197                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1198                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1199                 function_type_prefix = return_type_symbol;
       
  1200                 function_type_suffix = IN_type_symbol;
       
  1201                 break;
       
  1202                 
       
  1203             }
       
  1204             
       
  1205             
       
  1206             ERROR;
       
  1207         }
       
  1208         
       
  1209     }/*function_sint_to_word*/
       
  1210     break;
       
  1211 
       
  1212 /****
       
  1213  *SINT_TO_STRING
       
  1214  */
       
  1215     case function_sint_to_string :
       
  1216     {
       
  1217         symbol_c *last_type_symbol = NULL;
       
  1218 
       
  1219         {
       
  1220             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1221             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1222             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1223             symbol_c *IN_type_symbol = NULL;
       
  1224             
       
  1225             /* Get the value from a foo(<param_value>) style call */
       
  1226             if (IN_param_value == NULL)
       
  1227               IN_param_value = function_call_param_iterator.next_nf();
       
  1228             if (IN_param_value != NULL) {
       
  1229               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1230               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1231             }
       
  1232             
       
  1233             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1234             {
       
  1235         
       
  1236                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  1237                 
       
  1238                 if (IN_type_symbol == NULL)
       
  1239                   IN_type_symbol = last_type_symbol;
       
  1240                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1241                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1242                 function_type_prefix = return_type_symbol;
       
  1243                 break;
       
  1244                 
       
  1245             }
       
  1246             
       
  1247             
       
  1248             ERROR;
       
  1249         }
       
  1250         
       
  1251     }/*function_sint_to_string*/
       
  1252     break;
       
  1253 
       
  1254 /****
       
  1255  *SINT_TO_LWORD
       
  1256  */
       
  1257     case function_sint_to_lword :
       
  1258     {
       
  1259         symbol_c *last_type_symbol = NULL;
       
  1260 
       
  1261         {
       
  1262             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1263             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1264             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1265             symbol_c *IN_type_symbol = NULL;
       
  1266             
       
  1267             /* Get the value from a foo(<param_value>) style call */
       
  1268             if (IN_param_value == NULL)
       
  1269               IN_param_value = function_call_param_iterator.next_nf();
       
  1270             if (IN_param_value != NULL) {
       
  1271               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1272               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1273             }
       
  1274             
       
  1275             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1276             {
       
  1277         
       
  1278                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1279                 
       
  1280                 if (IN_type_symbol == NULL)
       
  1281                   IN_type_symbol = last_type_symbol;
       
  1282                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1283                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1284                 function_type_prefix = return_type_symbol;
       
  1285                 function_type_suffix = IN_type_symbol;
       
  1286                 break;
       
  1287                 
       
  1288             }
       
  1289             
       
  1290             
       
  1291             ERROR;
       
  1292         }
       
  1293         
       
  1294     }/*function_sint_to_lword*/
       
  1295     break;
       
  1296 
       
  1297 /****
       
  1298  *SINT_TO_UINT
       
  1299  */
       
  1300     case function_sint_to_uint :
       
  1301     {
       
  1302         symbol_c *last_type_symbol = NULL;
       
  1303 
       
  1304         {
       
  1305             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1306             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1307             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1308             symbol_c *IN_type_symbol = NULL;
       
  1309             
       
  1310             /* Get the value from a foo(<param_value>) style call */
       
  1311             if (IN_param_value == NULL)
       
  1312               IN_param_value = function_call_param_iterator.next_nf();
       
  1313             if (IN_param_value != NULL) {
       
  1314               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1315               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1316             }
       
  1317             
       
  1318             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1319             {
       
  1320         
       
  1321                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1322                 
       
  1323                 if (IN_type_symbol == NULL)
       
  1324                   IN_type_symbol = last_type_symbol;
       
  1325                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1326                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1327                 function_type_prefix = return_type_symbol;
       
  1328                 function_type_suffix = IN_type_symbol;
       
  1329                 break;
       
  1330                 
       
  1331             }
       
  1332             
       
  1333             
       
  1334             ERROR;
       
  1335         }
       
  1336         
       
  1337     }/*function_sint_to_uint*/
       
  1338     break;
       
  1339 
       
  1340 /****
       
  1341  *SINT_TO_LREAL
       
  1342  */
       
  1343     case function_sint_to_lreal :
       
  1344     {
       
  1345         symbol_c *last_type_symbol = NULL;
       
  1346 
       
  1347         {
       
  1348             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1349             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1350             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1351             symbol_c *IN_type_symbol = NULL;
       
  1352             
       
  1353             /* Get the value from a foo(<param_value>) style call */
       
  1354             if (IN_param_value == NULL)
       
  1355               IN_param_value = function_call_param_iterator.next_nf();
       
  1356             if (IN_param_value != NULL) {
       
  1357               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1358               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1359             }
       
  1360             
       
  1361             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1362             {
       
  1363         
       
  1364                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1365                 
       
  1366                 if (IN_type_symbol == NULL)
       
  1367                   IN_type_symbol = last_type_symbol;
       
  1368                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1369                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1370                 function_type_prefix = return_type_symbol;
       
  1371                 function_type_suffix = IN_type_symbol;
       
  1372                 break;
       
  1373                 
       
  1374             }
       
  1375             
       
  1376             
       
  1377             ERROR;
       
  1378         }
       
  1379         
       
  1380     }/*function_sint_to_lreal*/
       
  1381     break;
       
  1382 
       
  1383 /****
       
  1384  *SINT_TO_BYTE
       
  1385  */
       
  1386     case function_sint_to_byte :
       
  1387     {
       
  1388         symbol_c *last_type_symbol = NULL;
       
  1389 
       
  1390         {
       
  1391             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1393             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1394             symbol_c *IN_type_symbol = NULL;
       
  1395             
       
  1396             /* Get the value from a foo(<param_value>) style call */
       
  1397             if (IN_param_value == NULL)
       
  1398               IN_param_value = function_call_param_iterator.next_nf();
       
  1399             if (IN_param_value != NULL) {
       
  1400               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1401               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1402             }
       
  1403             
       
  1404             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1405             {
       
  1406         
       
  1407                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1408                 
       
  1409                 if (IN_type_symbol == NULL)
       
  1410                   IN_type_symbol = last_type_symbol;
       
  1411                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1413                 function_type_prefix = return_type_symbol;
       
  1414                 function_type_suffix = IN_type_symbol;
       
  1415                 break;
       
  1416                 
       
  1417             }
       
  1418             
       
  1419             
       
  1420             ERROR;
       
  1421         }
       
  1422         
       
  1423     }/*function_sint_to_byte*/
       
  1424     break;
       
  1425 
       
  1426 /****
       
  1427  *SINT_TO_USINT
       
  1428  */
       
  1429     case function_sint_to_usint :
       
  1430     {
       
  1431         symbol_c *last_type_symbol = NULL;
       
  1432 
       
  1433         {
       
  1434             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1436             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1437             symbol_c *IN_type_symbol = NULL;
       
  1438             
       
  1439             /* Get the value from a foo(<param_value>) style call */
       
  1440             if (IN_param_value == NULL)
       
  1441               IN_param_value = function_call_param_iterator.next_nf();
       
  1442             if (IN_param_value != NULL) {
       
  1443               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1444               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1445             }
       
  1446             
       
  1447             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1448             {
       
  1449         
       
  1450                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1451                 
       
  1452                 if (IN_type_symbol == NULL)
       
  1453                   IN_type_symbol = last_type_symbol;
       
  1454                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1455                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1456                 function_type_prefix = return_type_symbol;
       
  1457                 function_type_suffix = IN_type_symbol;
       
  1458                 break;
       
  1459                 
       
  1460             }
       
  1461             
       
  1462             
       
  1463             ERROR;
       
  1464         }
       
  1465         
       
  1466     }/*function_sint_to_usint*/
       
  1467     break;
       
  1468 
       
  1469 /****
       
  1470  *SINT_TO_ULINT
       
  1471  */
       
  1472     case function_sint_to_ulint :
       
  1473     {
       
  1474         symbol_c *last_type_symbol = NULL;
       
  1475 
       
  1476         {
       
  1477             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1479             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1480             symbol_c *IN_type_symbol = NULL;
       
  1481             
       
  1482             /* Get the value from a foo(<param_value>) style call */
       
  1483             if (IN_param_value == NULL)
       
  1484               IN_param_value = function_call_param_iterator.next_nf();
       
  1485             if (IN_param_value != NULL) {
       
  1486               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1487               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1488             }
       
  1489             
       
  1490             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1491             {
       
  1492         
       
  1493                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1494                 
       
  1495                 if (IN_type_symbol == NULL)
       
  1496                   IN_type_symbol = last_type_symbol;
       
  1497                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1498                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1499                 function_type_prefix = return_type_symbol;
       
  1500                 function_type_suffix = IN_type_symbol;
       
  1501                 break;
       
  1502                 
       
  1503             }
       
  1504             
       
  1505             
       
  1506             ERROR;
       
  1507         }
       
  1508         
       
  1509     }/*function_sint_to_ulint*/
       
  1510     break;
       
  1511 
       
  1512 /****
       
  1513  *SINT_TO_BOOL
       
  1514  */
       
  1515     case function_sint_to_bool :
       
  1516     {
       
  1517         symbol_c *last_type_symbol = NULL;
       
  1518 
       
  1519         {
       
  1520             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1522             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1523             symbol_c *IN_type_symbol = NULL;
       
  1524             
       
  1525             /* Get the value from a foo(<param_value>) style call */
       
  1526             if (IN_param_value == NULL)
       
  1527               IN_param_value = function_call_param_iterator.next_nf();
       
  1528             if (IN_param_value != NULL) {
       
  1529               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1530               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1531             }
       
  1532             
       
  1533             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1534             {
       
  1535         
       
  1536                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1537                 
       
  1538                 if (IN_type_symbol == NULL)
       
  1539                   IN_type_symbol = last_type_symbol;
       
  1540                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1541                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1542                 function_type_prefix = return_type_symbol;
       
  1543                 function_type_suffix = IN_type_symbol;
       
  1544                 break;
       
  1545                 
       
  1546             }
       
  1547             
       
  1548             
       
  1549             ERROR;
       
  1550         }
       
  1551         
       
  1552     }/*function_sint_to_bool*/
       
  1553     break;
       
  1554 
       
  1555 /****
       
  1556  *SINT_TO_TIME
       
  1557  */
       
  1558     case function_sint_to_time :
       
  1559     {
       
  1560         symbol_c *last_type_symbol = NULL;
       
  1561 
       
  1562         {
       
  1563             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1564             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1565             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1566             symbol_c *IN_type_symbol = NULL;
       
  1567             
       
  1568             /* Get the value from a foo(<param_value>) style call */
       
  1569             if (IN_param_value == NULL)
       
  1570               IN_param_value = function_call_param_iterator.next_nf();
       
  1571             if (IN_param_value != NULL) {
       
  1572               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1573               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1574             }
       
  1575             
       
  1576             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1577             {
       
  1578         
       
  1579                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1580                 
       
  1581                 if (IN_type_symbol == NULL)
       
  1582                   IN_type_symbol = last_type_symbol;
       
  1583                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1584                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1585                 function_type_prefix = return_type_symbol;
       
  1586                 break;
       
  1587                 
       
  1588             }
       
  1589             
       
  1590             
       
  1591             ERROR;
       
  1592         }
       
  1593         
       
  1594     }/*function_sint_to_time*/
       
  1595     break;
       
  1596 
       
  1597 /****
       
  1598  *SINT_TO_INT
       
  1599  */
       
  1600     case function_sint_to_int :
       
  1601     {
       
  1602         symbol_c *last_type_symbol = NULL;
       
  1603 
       
  1604         {
       
  1605             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1607             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1608             symbol_c *IN_type_symbol = NULL;
       
  1609             
       
  1610             /* Get the value from a foo(<param_value>) style call */
       
  1611             if (IN_param_value == NULL)
       
  1612               IN_param_value = function_call_param_iterator.next_nf();
       
  1613             if (IN_param_value != NULL) {
       
  1614               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1615               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1616             }
       
  1617             
       
  1618             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1619             {
       
  1620         
       
  1621                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1622                 
       
  1623                 if (IN_type_symbol == NULL)
       
  1624                   IN_type_symbol = last_type_symbol;
       
  1625                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1626                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1627                 function_type_prefix = return_type_symbol;
       
  1628                 function_type_suffix = IN_type_symbol;
       
  1629                 break;
       
  1630                 
       
  1631             }
       
  1632             
       
  1633             
       
  1634             ERROR;
       
  1635         }
       
  1636         
       
  1637     }/*function_sint_to_int*/
       
  1638     break;
       
  1639 
       
  1640 /****
       
  1641  *LINT_TO_REAL
       
  1642  */
       
  1643     case function_lint_to_real :
       
  1644     {
       
  1645         symbol_c *last_type_symbol = NULL;
       
  1646 
       
  1647         {
       
  1648             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1649             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1650             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1651             symbol_c *IN_type_symbol = NULL;
       
  1652             
       
  1653             /* Get the value from a foo(<param_value>) style call */
       
  1654             if (IN_param_value == NULL)
       
  1655               IN_param_value = function_call_param_iterator.next_nf();
       
  1656             if (IN_param_value != NULL) {
       
  1657               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1658               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1659             }
       
  1660             
       
  1661             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1662             {
       
  1663         
       
  1664                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1665                 
       
  1666                 if (IN_type_symbol == NULL)
       
  1667                   IN_type_symbol = last_type_symbol;
       
  1668                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1669                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1670                 function_type_prefix = return_type_symbol;
       
  1671                 function_type_suffix = IN_type_symbol;
       
  1672                 break;
       
  1673                 
       
  1674             }
       
  1675             
       
  1676             
       
  1677             ERROR;
       
  1678         }
       
  1679         
       
  1680     }/*function_lint_to_real*/
       
  1681     break;
       
  1682 
       
  1683 /****
       
  1684  *LINT_TO_SINT
       
  1685  */
       
  1686     case function_lint_to_sint :
       
  1687     {
       
  1688         symbol_c *last_type_symbol = NULL;
       
  1689 
       
  1690         {
       
  1691             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1692             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1693             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1694             symbol_c *IN_type_symbol = NULL;
       
  1695             
       
  1696             /* Get the value from a foo(<param_value>) style call */
       
  1697             if (IN_param_value == NULL)
       
  1698               IN_param_value = function_call_param_iterator.next_nf();
       
  1699             if (IN_param_value != NULL) {
       
  1700               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1701               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1702             }
       
  1703             
       
  1704             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1705             {
       
  1706         
       
  1707                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1708                 
       
  1709                 if (IN_type_symbol == NULL)
       
  1710                   IN_type_symbol = last_type_symbol;
       
  1711                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1712                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1713                 function_type_prefix = return_type_symbol;
       
  1714                 function_type_suffix = IN_type_symbol;
       
  1715                 break;
       
  1716                 
       
  1717             }
       
  1718             
       
  1719             
       
  1720             ERROR;
       
  1721         }
       
  1722         
       
  1723     }/*function_lint_to_sint*/
       
  1724     break;
       
  1725 
       
  1726 /****
       
  1727  *LINT_TO_DINT
       
  1728  */
       
  1729     case function_lint_to_dint :
       
  1730     {
       
  1731         symbol_c *last_type_symbol = NULL;
       
  1732 
       
  1733         {
       
  1734             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1736             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1737             symbol_c *IN_type_symbol = NULL;
       
  1738             
       
  1739             /* Get the value from a foo(<param_value>) style call */
       
  1740             if (IN_param_value == NULL)
       
  1741               IN_param_value = function_call_param_iterator.next_nf();
       
  1742             if (IN_param_value != NULL) {
       
  1743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1744               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1745             }
       
  1746             
       
  1747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1748             {
       
  1749         
       
  1750                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1751                 
       
  1752                 if (IN_type_symbol == NULL)
       
  1753                   IN_type_symbol = last_type_symbol;
       
  1754                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1755                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1756                 function_type_prefix = return_type_symbol;
       
  1757                 function_type_suffix = IN_type_symbol;
       
  1758                 break;
       
  1759                 
       
  1760             }
       
  1761             
       
  1762             
       
  1763             ERROR;
       
  1764         }
       
  1765         
       
  1766     }/*function_lint_to_dint*/
       
  1767     break;
       
  1768 
       
  1769 /****
       
  1770  *LINT_TO_DATE
       
  1771  */
       
  1772     case function_lint_to_date :
       
  1773     {
       
  1774         symbol_c *last_type_symbol = NULL;
       
  1775 
       
  1776         {
       
  1777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1780             symbol_c *IN_type_symbol = NULL;
       
  1781             
       
  1782             /* Get the value from a foo(<param_value>) style call */
       
  1783             if (IN_param_value == NULL)
       
  1784               IN_param_value = function_call_param_iterator.next_nf();
       
  1785             if (IN_param_value != NULL) {
       
  1786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1787               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1788             }
       
  1789             
       
  1790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1791             {
       
  1792         
       
  1793                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1794                 
       
  1795                 if (IN_type_symbol == NULL)
       
  1796                   IN_type_symbol = last_type_symbol;
       
  1797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1798                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1799                 function_type_prefix = return_type_symbol;
       
  1800                 break;
       
  1801                 
       
  1802             }
       
  1803             
       
  1804             
       
  1805             ERROR;
       
  1806         }
       
  1807         
       
  1808     }/*function_lint_to_date*/
       
  1809     break;
       
  1810 
       
  1811 /****
       
  1812  *LINT_TO_DWORD
       
  1813  */
       
  1814     case function_lint_to_dword :
       
  1815     {
       
  1816         symbol_c *last_type_symbol = NULL;
       
  1817 
       
  1818         {
       
  1819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1822             symbol_c *IN_type_symbol = NULL;
       
  1823             
       
  1824             /* Get the value from a foo(<param_value>) style call */
       
  1825             if (IN_param_value == NULL)
       
  1826               IN_param_value = function_call_param_iterator.next_nf();
       
  1827             if (IN_param_value != NULL) {
       
  1828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1830             }
       
  1831             
       
  1832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1833             {
       
  1834         
       
  1835                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1836                 
       
  1837                 if (IN_type_symbol == NULL)
       
  1838                   IN_type_symbol = last_type_symbol;
       
  1839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1840                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1841                 function_type_prefix = return_type_symbol;
       
  1842                 function_type_suffix = IN_type_symbol;
       
  1843                 break;
       
  1844                 
       
  1845             }
       
  1846             
       
  1847             
       
  1848             ERROR;
       
  1849         }
       
  1850         
       
  1851     }/*function_lint_to_dword*/
       
  1852     break;
       
  1853 
       
  1854 /****
       
  1855  *LINT_TO_DT
       
  1856  */
       
  1857     case function_lint_to_dt :
       
  1858     {
       
  1859         symbol_c *last_type_symbol = NULL;
       
  1860 
       
  1861         {
       
  1862             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1864             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1865             symbol_c *IN_type_symbol = NULL;
       
  1866             
       
  1867             /* Get the value from a foo(<param_value>) style call */
       
  1868             if (IN_param_value == NULL)
       
  1869               IN_param_value = function_call_param_iterator.next_nf();
       
  1870             if (IN_param_value != NULL) {
       
  1871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1873             }
       
  1874             
       
  1875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1876             {
       
  1877         
       
  1878                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1879                 
       
  1880                 if (IN_type_symbol == NULL)
       
  1881                   IN_type_symbol = last_type_symbol;
       
  1882                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1883                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1884                 function_type_prefix = return_type_symbol;
       
  1885                 break;
       
  1886                 
       
  1887             }
       
  1888             
       
  1889             
       
  1890             ERROR;
       
  1891         }
       
  1892         
       
  1893     }/*function_lint_to_dt*/
       
  1894     break;
       
  1895 
       
  1896 /****
       
  1897  *LINT_TO_TOD
       
  1898  */
       
  1899     case function_lint_to_tod :
       
  1900     {
       
  1901         symbol_c *last_type_symbol = NULL;
       
  1902 
       
  1903         {
       
  1904             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1905             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1906             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1907             symbol_c *IN_type_symbol = NULL;
       
  1908             
       
  1909             /* Get the value from a foo(<param_value>) style call */
       
  1910             if (IN_param_value == NULL)
       
  1911               IN_param_value = function_call_param_iterator.next_nf();
       
  1912             if (IN_param_value != NULL) {
       
  1913               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1914               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1915             }
       
  1916             
       
  1917             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1918             {
       
  1919         
       
  1920                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1921                 
       
  1922                 if (IN_type_symbol == NULL)
       
  1923                   IN_type_symbol = last_type_symbol;
       
  1924                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1925                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1926                 function_type_prefix = return_type_symbol;
       
  1927                 break;
       
  1928                 
       
  1929             }
       
  1930             
       
  1931             
       
  1932             ERROR;
       
  1933         }
       
  1934         
       
  1935     }/*function_lint_to_tod*/
       
  1936     break;
       
  1937 
       
  1938 /****
       
  1939  *LINT_TO_UDINT
       
  1940  */
       
  1941     case function_lint_to_udint :
       
  1942     {
       
  1943         symbol_c *last_type_symbol = NULL;
       
  1944 
       
  1945         {
       
  1946             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1947             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1948             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1949             symbol_c *IN_type_symbol = NULL;
       
  1950             
       
  1951             /* Get the value from a foo(<param_value>) style call */
       
  1952             if (IN_param_value == NULL)
       
  1953               IN_param_value = function_call_param_iterator.next_nf();
       
  1954             if (IN_param_value != NULL) {
       
  1955               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1956               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1957             }
       
  1958             
       
  1959             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1960             {
       
  1961         
       
  1962                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1963                 
       
  1964                 if (IN_type_symbol == NULL)
       
  1965                   IN_type_symbol = last_type_symbol;
       
  1966                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1967                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1968                 function_type_prefix = return_type_symbol;
       
  1969                 function_type_suffix = IN_type_symbol;
       
  1970                 break;
       
  1971                 
       
  1972             }
       
  1973             
       
  1974             
       
  1975             ERROR;
       
  1976         }
       
  1977         
       
  1978     }/*function_lint_to_udint*/
       
  1979     break;
       
  1980 
       
  1981 /****
       
  1982  *LINT_TO_WORD
       
  1983  */
       
  1984     case function_lint_to_word :
       
  1985     {
       
  1986         symbol_c *last_type_symbol = NULL;
       
  1987 
       
  1988         {
       
  1989             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1990             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1991             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1992             symbol_c *IN_type_symbol = NULL;
       
  1993             
       
  1994             /* Get the value from a foo(<param_value>) style call */
       
  1995             if (IN_param_value == NULL)
       
  1996               IN_param_value = function_call_param_iterator.next_nf();
       
  1997             if (IN_param_value != NULL) {
       
  1998               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1999               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2000             }
       
  2001             
       
  2002             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2003             {
       
  2004         
       
  2005                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2006                 
       
  2007                 if (IN_type_symbol == NULL)
       
  2008                   IN_type_symbol = last_type_symbol;
       
  2009                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2010                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2011                 function_type_prefix = return_type_symbol;
       
  2012                 function_type_suffix = IN_type_symbol;
       
  2013                 break;
       
  2014                 
       
  2015             }
       
  2016             
       
  2017             
       
  2018             ERROR;
       
  2019         }
       
  2020         
       
  2021     }/*function_lint_to_word*/
       
  2022     break;
       
  2023 
       
  2024 /****
       
  2025  *LINT_TO_STRING
       
  2026  */
       
  2027     case function_lint_to_string :
       
  2028     {
       
  2029         symbol_c *last_type_symbol = NULL;
       
  2030 
       
  2031         {
       
  2032             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2033             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2034             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2035             symbol_c *IN_type_symbol = NULL;
       
  2036             
       
  2037             /* Get the value from a foo(<param_value>) style call */
       
  2038             if (IN_param_value == NULL)
       
  2039               IN_param_value = function_call_param_iterator.next_nf();
       
  2040             if (IN_param_value != NULL) {
       
  2041               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2042               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2043             }
       
  2044             
       
  2045             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2046             {
       
  2047         
       
  2048                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2049                 
       
  2050                 if (IN_type_symbol == NULL)
       
  2051                   IN_type_symbol = last_type_symbol;
       
  2052                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2053                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2054                 function_type_prefix = return_type_symbol;
       
  2055                 break;
       
  2056                 
       
  2057             }
       
  2058             
       
  2059             
       
  2060             ERROR;
       
  2061         }
       
  2062         
       
  2063     }/*function_lint_to_string*/
       
  2064     break;
       
  2065 
       
  2066 /****
       
  2067  *LINT_TO_LWORD
       
  2068  */
       
  2069     case function_lint_to_lword :
       
  2070     {
       
  2071         symbol_c *last_type_symbol = NULL;
       
  2072 
       
  2073         {
       
  2074             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2076             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2077             symbol_c *IN_type_symbol = NULL;
       
  2078             
       
  2079             /* Get the value from a foo(<param_value>) style call */
       
  2080             if (IN_param_value == NULL)
       
  2081               IN_param_value = function_call_param_iterator.next_nf();
       
  2082             if (IN_param_value != NULL) {
       
  2083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2085             }
       
  2086             
       
  2087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2088             {
       
  2089         
       
  2090                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2091                 
       
  2092                 if (IN_type_symbol == NULL)
       
  2093                   IN_type_symbol = last_type_symbol;
       
  2094                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2095                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2096                 function_type_prefix = return_type_symbol;
       
  2097                 function_type_suffix = IN_type_symbol;
       
  2098                 break;
       
  2099                 
       
  2100             }
       
  2101             
       
  2102             
       
  2103             ERROR;
       
  2104         }
       
  2105         
       
  2106     }/*function_lint_to_lword*/
       
  2107     break;
       
  2108 
       
  2109 /****
       
  2110  *LINT_TO_UINT
       
  2111  */
       
  2112     case function_lint_to_uint :
       
  2113     {
       
  2114         symbol_c *last_type_symbol = NULL;
       
  2115 
       
  2116         {
       
  2117             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2118             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2119             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2120             symbol_c *IN_type_symbol = NULL;
       
  2121             
       
  2122             /* Get the value from a foo(<param_value>) style call */
       
  2123             if (IN_param_value == NULL)
       
  2124               IN_param_value = function_call_param_iterator.next_nf();
       
  2125             if (IN_param_value != NULL) {
       
  2126               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2127               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2128             }
       
  2129             
       
  2130             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2131             {
       
  2132         
       
  2133                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2134                 
       
  2135                 if (IN_type_symbol == NULL)
       
  2136                   IN_type_symbol = last_type_symbol;
       
  2137                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2138                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2139                 function_type_prefix = return_type_symbol;
       
  2140                 function_type_suffix = IN_type_symbol;
       
  2141                 break;
       
  2142                 
       
  2143             }
       
  2144             
       
  2145             
       
  2146             ERROR;
       
  2147         }
       
  2148         
       
  2149     }/*function_lint_to_uint*/
       
  2150     break;
       
  2151 
       
  2152 /****
       
  2153  *LINT_TO_LREAL
       
  2154  */
       
  2155     case function_lint_to_lreal :
       
  2156     {
       
  2157         symbol_c *last_type_symbol = NULL;
       
  2158 
       
  2159         {
       
  2160             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2162             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2163             symbol_c *IN_type_symbol = NULL;
       
  2164             
       
  2165             /* Get the value from a foo(<param_value>) style call */
       
  2166             if (IN_param_value == NULL)
       
  2167               IN_param_value = function_call_param_iterator.next_nf();
       
  2168             if (IN_param_value != NULL) {
       
  2169               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2170               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2171             }
       
  2172             
       
  2173             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2174             {
       
  2175         
       
  2176                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2177                 
       
  2178                 if (IN_type_symbol == NULL)
       
  2179                   IN_type_symbol = last_type_symbol;
       
  2180                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2181                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2182                 function_type_prefix = return_type_symbol;
       
  2183                 function_type_suffix = IN_type_symbol;
       
  2184                 break;
       
  2185                 
       
  2186             }
       
  2187             
       
  2188             
       
  2189             ERROR;
       
  2190         }
       
  2191         
       
  2192     }/*function_lint_to_lreal*/
       
  2193     break;
       
  2194 
       
  2195 /****
       
  2196  *LINT_TO_BYTE
       
  2197  */
       
  2198     case function_lint_to_byte :
       
  2199     {
       
  2200         symbol_c *last_type_symbol = NULL;
       
  2201 
       
  2202         {
       
  2203             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2205             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2206             symbol_c *IN_type_symbol = NULL;
       
  2207             
       
  2208             /* Get the value from a foo(<param_value>) style call */
       
  2209             if (IN_param_value == NULL)
       
  2210               IN_param_value = function_call_param_iterator.next_nf();
       
  2211             if (IN_param_value != NULL) {
       
  2212               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2213               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2214             }
       
  2215             
       
  2216             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2217             {
       
  2218         
       
  2219                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2220                 
       
  2221                 if (IN_type_symbol == NULL)
       
  2222                   IN_type_symbol = last_type_symbol;
       
  2223                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2224                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2225                 function_type_prefix = return_type_symbol;
       
  2226                 function_type_suffix = IN_type_symbol;
       
  2227                 break;
       
  2228                 
       
  2229             }
       
  2230             
       
  2231             
       
  2232             ERROR;
       
  2233         }
       
  2234         
       
  2235     }/*function_lint_to_byte*/
       
  2236     break;
       
  2237 
       
  2238 /****
       
  2239  *LINT_TO_USINT
       
  2240  */
       
  2241     case function_lint_to_usint :
       
  2242     {
       
  2243         symbol_c *last_type_symbol = NULL;
       
  2244 
       
  2245         {
       
  2246             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2248             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2249             symbol_c *IN_type_symbol = NULL;
       
  2250             
       
  2251             /* Get the value from a foo(<param_value>) style call */
       
  2252             if (IN_param_value == NULL)
       
  2253               IN_param_value = function_call_param_iterator.next_nf();
       
  2254             if (IN_param_value != NULL) {
       
  2255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2257             }
       
  2258             
       
  2259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2260             {
       
  2261         
       
  2262                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2263                 
       
  2264                 if (IN_type_symbol == NULL)
       
  2265                   IN_type_symbol = last_type_symbol;
       
  2266                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2267                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2268                 function_type_prefix = return_type_symbol;
       
  2269                 function_type_suffix = IN_type_symbol;
       
  2270                 break;
       
  2271                 
       
  2272             }
       
  2273             
       
  2274             
       
  2275             ERROR;
       
  2276         }
       
  2277         
       
  2278     }/*function_lint_to_usint*/
       
  2279     break;
       
  2280 
       
  2281 /****
       
  2282  *LINT_TO_ULINT
       
  2283  */
       
  2284     case function_lint_to_ulint :
       
  2285     {
       
  2286         symbol_c *last_type_symbol = NULL;
       
  2287 
       
  2288         {
       
  2289             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2291             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2292             symbol_c *IN_type_symbol = NULL;
       
  2293             
       
  2294             /* Get the value from a foo(<param_value>) style call */
       
  2295             if (IN_param_value == NULL)
       
  2296               IN_param_value = function_call_param_iterator.next_nf();
       
  2297             if (IN_param_value != NULL) {
       
  2298               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2299               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2300             }
       
  2301             
       
  2302             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2303             {
       
  2304         
       
  2305                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2306                 
       
  2307                 if (IN_type_symbol == NULL)
       
  2308                   IN_type_symbol = last_type_symbol;
       
  2309                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2310                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2311                 function_type_prefix = return_type_symbol;
       
  2312                 function_type_suffix = IN_type_symbol;
       
  2313                 break;
       
  2314                 
       
  2315             }
       
  2316             
       
  2317             
       
  2318             ERROR;
       
  2319         }
       
  2320         
       
  2321     }/*function_lint_to_ulint*/
       
  2322     break;
       
  2323 
       
  2324 /****
       
  2325  *LINT_TO_BOOL
       
  2326  */
       
  2327     case function_lint_to_bool :
       
  2328     {
       
  2329         symbol_c *last_type_symbol = NULL;
       
  2330 
       
  2331         {
       
  2332             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2333             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2334             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2335             symbol_c *IN_type_symbol = NULL;
       
  2336             
       
  2337             /* Get the value from a foo(<param_value>) style call */
       
  2338             if (IN_param_value == NULL)
       
  2339               IN_param_value = function_call_param_iterator.next_nf();
       
  2340             if (IN_param_value != NULL) {
       
  2341               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2342               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2343             }
       
  2344             
       
  2345             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2346             {
       
  2347         
       
  2348                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2349                 
       
  2350                 if (IN_type_symbol == NULL)
       
  2351                   IN_type_symbol = last_type_symbol;
       
  2352                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2353                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2354                 function_type_prefix = return_type_symbol;
       
  2355                 function_type_suffix = IN_type_symbol;
       
  2356                 break;
       
  2357                 
       
  2358             }
       
  2359             
       
  2360             
       
  2361             ERROR;
       
  2362         }
       
  2363         
       
  2364     }/*function_lint_to_bool*/
       
  2365     break;
       
  2366 
       
  2367 /****
       
  2368  *LINT_TO_TIME
       
  2369  */
       
  2370     case function_lint_to_time :
       
  2371     {
       
  2372         symbol_c *last_type_symbol = NULL;
       
  2373 
       
  2374         {
       
  2375             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2377             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2378             symbol_c *IN_type_symbol = NULL;
       
  2379             
       
  2380             /* Get the value from a foo(<param_value>) style call */
       
  2381             if (IN_param_value == NULL)
       
  2382               IN_param_value = function_call_param_iterator.next_nf();
       
  2383             if (IN_param_value != NULL) {
       
  2384               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2385               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2386             }
       
  2387             
       
  2388             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2389             {
       
  2390         
       
  2391                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2392                 
       
  2393                 if (IN_type_symbol == NULL)
       
  2394                   IN_type_symbol = last_type_symbol;
       
  2395                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2396                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2397                 function_type_prefix = return_type_symbol;
       
  2398                 break;
       
  2399                 
       
  2400             }
       
  2401             
       
  2402             
       
  2403             ERROR;
       
  2404         }
       
  2405         
       
  2406     }/*function_lint_to_time*/
       
  2407     break;
       
  2408 
       
  2409 /****
       
  2410  *LINT_TO_INT
       
  2411  */
       
  2412     case function_lint_to_int :
       
  2413     {
       
  2414         symbol_c *last_type_symbol = NULL;
       
  2415 
       
  2416         {
       
  2417             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2419             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2420             symbol_c *IN_type_symbol = NULL;
       
  2421             
       
  2422             /* Get the value from a foo(<param_value>) style call */
       
  2423             if (IN_param_value == NULL)
       
  2424               IN_param_value = function_call_param_iterator.next_nf();
       
  2425             if (IN_param_value != NULL) {
       
  2426               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2427               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2428             }
       
  2429             
       
  2430             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2431             {
       
  2432         
       
  2433                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2434                 
       
  2435                 if (IN_type_symbol == NULL)
       
  2436                   IN_type_symbol = last_type_symbol;
       
  2437                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2438                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2439                 function_type_prefix = return_type_symbol;
       
  2440                 function_type_suffix = IN_type_symbol;
       
  2441                 break;
       
  2442                 
       
  2443             }
       
  2444             
       
  2445             
       
  2446             ERROR;
       
  2447         }
       
  2448         
       
  2449     }/*function_lint_to_int*/
       
  2450     break;
       
  2451 
       
  2452 /****
       
  2453  *DINT_TO_REAL
       
  2454  */
       
  2455     case function_dint_to_real :
       
  2456     {
       
  2457         symbol_c *last_type_symbol = NULL;
       
  2458 
       
  2459         {
       
  2460             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2462             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2463             symbol_c *IN_type_symbol = NULL;
       
  2464             
       
  2465             /* Get the value from a foo(<param_value>) style call */
       
  2466             if (IN_param_value == NULL)
       
  2467               IN_param_value = function_call_param_iterator.next_nf();
       
  2468             if (IN_param_value != NULL) {
       
  2469               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2470               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2471             }
       
  2472             
       
  2473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2474             {
       
  2475         
       
  2476                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2477                 
       
  2478                 if (IN_type_symbol == NULL)
       
  2479                   IN_type_symbol = last_type_symbol;
       
  2480                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2481                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2482                 function_type_prefix = return_type_symbol;
       
  2483                 function_type_suffix = IN_type_symbol;
       
  2484                 break;
       
  2485                 
       
  2486             }
       
  2487             
       
  2488             
       
  2489             ERROR;
       
  2490         }
       
  2491         
       
  2492     }/*function_dint_to_real*/
       
  2493     break;
       
  2494 
       
  2495 /****
       
  2496  *DINT_TO_SINT
       
  2497  */
       
  2498     case function_dint_to_sint :
       
  2499     {
       
  2500         symbol_c *last_type_symbol = NULL;
       
  2501 
       
  2502         {
       
  2503             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2505             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2506             symbol_c *IN_type_symbol = NULL;
       
  2507             
       
  2508             /* Get the value from a foo(<param_value>) style call */
       
  2509             if (IN_param_value == NULL)
       
  2510               IN_param_value = function_call_param_iterator.next_nf();
       
  2511             if (IN_param_value != NULL) {
       
  2512               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2513               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2514             }
       
  2515             
       
  2516             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2517             {
       
  2518         
       
  2519                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2520                 
       
  2521                 if (IN_type_symbol == NULL)
       
  2522                   IN_type_symbol = last_type_symbol;
       
  2523                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2524                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2525                 function_type_prefix = return_type_symbol;
       
  2526                 function_type_suffix = IN_type_symbol;
       
  2527                 break;
       
  2528                 
       
  2529             }
       
  2530             
       
  2531             
       
  2532             ERROR;
       
  2533         }
       
  2534         
       
  2535     }/*function_dint_to_sint*/
       
  2536     break;
       
  2537 
       
  2538 /****
       
  2539  *DINT_TO_LINT
       
  2540  */
       
  2541     case function_dint_to_lint :
       
  2542     {
       
  2543         symbol_c *last_type_symbol = NULL;
       
  2544 
       
  2545         {
       
  2546             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2548             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2549             symbol_c *IN_type_symbol = NULL;
       
  2550             
       
  2551             /* Get the value from a foo(<param_value>) style call */
       
  2552             if (IN_param_value == NULL)
       
  2553               IN_param_value = function_call_param_iterator.next_nf();
       
  2554             if (IN_param_value != NULL) {
       
  2555               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2556               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2557             }
       
  2558             
       
  2559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2560             {
       
  2561         
       
  2562                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2563                 
       
  2564                 if (IN_type_symbol == NULL)
       
  2565                   IN_type_symbol = last_type_symbol;
       
  2566                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2568                 function_type_prefix = return_type_symbol;
       
  2569                 function_type_suffix = IN_type_symbol;
       
  2570                 break;
       
  2571                 
       
  2572             }
       
  2573             
       
  2574             
       
  2575             ERROR;
       
  2576         }
       
  2577         
       
  2578     }/*function_dint_to_lint*/
       
  2579     break;
       
  2580 
       
  2581 /****
       
  2582  *DINT_TO_DATE
       
  2583  */
       
  2584     case function_dint_to_date :
       
  2585     {
       
  2586         symbol_c *last_type_symbol = NULL;
       
  2587 
       
  2588         {
       
  2589             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2590             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2591             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2592             symbol_c *IN_type_symbol = NULL;
       
  2593             
       
  2594             /* Get the value from a foo(<param_value>) style call */
       
  2595             if (IN_param_value == NULL)
       
  2596               IN_param_value = function_call_param_iterator.next_nf();
       
  2597             if (IN_param_value != NULL) {
       
  2598               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2599               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2600             }
       
  2601             
       
  2602             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2603             {
       
  2604         
       
  2605                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2606                 
       
  2607                 if (IN_type_symbol == NULL)
       
  2608                   IN_type_symbol = last_type_symbol;
       
  2609                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2610                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2611                 function_type_prefix = return_type_symbol;
       
  2612                 break;
       
  2613                 
       
  2614             }
       
  2615             
       
  2616             
       
  2617             ERROR;
       
  2618         }
       
  2619         
       
  2620     }/*function_dint_to_date*/
       
  2621     break;
       
  2622 
       
  2623 /****
       
  2624  *DINT_TO_DWORD
       
  2625  */
       
  2626     case function_dint_to_dword :
       
  2627     {
       
  2628         symbol_c *last_type_symbol = NULL;
       
  2629 
       
  2630         {
       
  2631             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2633             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2634             symbol_c *IN_type_symbol = NULL;
       
  2635             
       
  2636             /* Get the value from a foo(<param_value>) style call */
       
  2637             if (IN_param_value == NULL)
       
  2638               IN_param_value = function_call_param_iterator.next_nf();
       
  2639             if (IN_param_value != NULL) {
       
  2640               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2641               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2642             }
       
  2643             
       
  2644             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2645             {
       
  2646         
       
  2647                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2648                 
       
  2649                 if (IN_type_symbol == NULL)
       
  2650                   IN_type_symbol = last_type_symbol;
       
  2651                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2653                 function_type_prefix = return_type_symbol;
       
  2654                 function_type_suffix = IN_type_symbol;
       
  2655                 break;
       
  2656                 
       
  2657             }
       
  2658             
       
  2659             
       
  2660             ERROR;
       
  2661         }
       
  2662         
       
  2663     }/*function_dint_to_dword*/
       
  2664     break;
       
  2665 
       
  2666 /****
       
  2667  *DINT_TO_DT
       
  2668  */
       
  2669     case function_dint_to_dt :
       
  2670     {
       
  2671         symbol_c *last_type_symbol = NULL;
       
  2672 
       
  2673         {
       
  2674             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2676             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2677             symbol_c *IN_type_symbol = NULL;
       
  2678             
       
  2679             /* Get the value from a foo(<param_value>) style call */
       
  2680             if (IN_param_value == NULL)
       
  2681               IN_param_value = function_call_param_iterator.next_nf();
       
  2682             if (IN_param_value != NULL) {
       
  2683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2685             }
       
  2686             
       
  2687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2688             {
       
  2689         
       
  2690                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2691                 
       
  2692                 if (IN_type_symbol == NULL)
       
  2693                   IN_type_symbol = last_type_symbol;
       
  2694                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2695                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2696                 function_type_prefix = return_type_symbol;
       
  2697                 break;
       
  2698                 
       
  2699             }
       
  2700             
       
  2701             
       
  2702             ERROR;
       
  2703         }
       
  2704         
       
  2705     }/*function_dint_to_dt*/
       
  2706     break;
       
  2707 
       
  2708 /****
       
  2709  *DINT_TO_TOD
       
  2710  */
       
  2711     case function_dint_to_tod :
       
  2712     {
       
  2713         symbol_c *last_type_symbol = NULL;
       
  2714 
       
  2715         {
       
  2716             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2717             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2718             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2719             symbol_c *IN_type_symbol = NULL;
       
  2720             
       
  2721             /* Get the value from a foo(<param_value>) style call */
       
  2722             if (IN_param_value == NULL)
       
  2723               IN_param_value = function_call_param_iterator.next_nf();
       
  2724             if (IN_param_value != NULL) {
       
  2725               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2726               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2727             }
       
  2728             
       
  2729             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2730             {
       
  2731         
       
  2732                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2733                 
       
  2734                 if (IN_type_symbol == NULL)
       
  2735                   IN_type_symbol = last_type_symbol;
       
  2736                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2737                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2738                 function_type_prefix = return_type_symbol;
       
  2739                 break;
       
  2740                 
       
  2741             }
       
  2742             
       
  2743             
       
  2744             ERROR;
       
  2745         }
       
  2746         
       
  2747     }/*function_dint_to_tod*/
       
  2748     break;
       
  2749 
       
  2750 /****
       
  2751  *DINT_TO_UDINT
       
  2752  */
       
  2753     case function_dint_to_udint :
       
  2754     {
       
  2755         symbol_c *last_type_symbol = NULL;
       
  2756 
       
  2757         {
       
  2758             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2759             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2760             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2761             symbol_c *IN_type_symbol = NULL;
       
  2762             
       
  2763             /* Get the value from a foo(<param_value>) style call */
       
  2764             if (IN_param_value == NULL)
       
  2765               IN_param_value = function_call_param_iterator.next_nf();
       
  2766             if (IN_param_value != NULL) {
       
  2767               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2768               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2769             }
       
  2770             
       
  2771             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2772             {
       
  2773         
       
  2774                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2775                 
       
  2776                 if (IN_type_symbol == NULL)
       
  2777                   IN_type_symbol = last_type_symbol;
       
  2778                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2779                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2780                 function_type_prefix = return_type_symbol;
       
  2781                 function_type_suffix = IN_type_symbol;
       
  2782                 break;
       
  2783                 
       
  2784             }
       
  2785             
       
  2786             
       
  2787             ERROR;
       
  2788         }
       
  2789         
       
  2790     }/*function_dint_to_udint*/
       
  2791     break;
       
  2792 
       
  2793 /****
       
  2794  *DINT_TO_WORD
       
  2795  */
       
  2796     case function_dint_to_word :
       
  2797     {
       
  2798         symbol_c *last_type_symbol = NULL;
       
  2799 
       
  2800         {
       
  2801             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2802             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2803             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2804             symbol_c *IN_type_symbol = NULL;
       
  2805             
       
  2806             /* Get the value from a foo(<param_value>) style call */
       
  2807             if (IN_param_value == NULL)
       
  2808               IN_param_value = function_call_param_iterator.next_nf();
       
  2809             if (IN_param_value != NULL) {
       
  2810               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2811               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2812             }
       
  2813             
       
  2814             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2815             {
       
  2816         
       
  2817                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2818                 
       
  2819                 if (IN_type_symbol == NULL)
       
  2820                   IN_type_symbol = last_type_symbol;
       
  2821                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2822                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2823                 function_type_prefix = return_type_symbol;
       
  2824                 function_type_suffix = IN_type_symbol;
       
  2825                 break;
       
  2826                 
       
  2827             }
       
  2828             
       
  2829             
       
  2830             ERROR;
       
  2831         }
       
  2832         
       
  2833     }/*function_dint_to_word*/
       
  2834     break;
       
  2835 
       
  2836 /****
       
  2837  *DINT_TO_STRING
       
  2838  */
       
  2839     case function_dint_to_string :
       
  2840     {
       
  2841         symbol_c *last_type_symbol = NULL;
       
  2842 
       
  2843         {
       
  2844             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2845             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2846             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2847             symbol_c *IN_type_symbol = NULL;
       
  2848             
       
  2849             /* Get the value from a foo(<param_value>) style call */
       
  2850             if (IN_param_value == NULL)
       
  2851               IN_param_value = function_call_param_iterator.next_nf();
       
  2852             if (IN_param_value != NULL) {
       
  2853               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2854               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2855             }
       
  2856             
       
  2857             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2858             {
       
  2859         
       
  2860                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2861                 
       
  2862                 if (IN_type_symbol == NULL)
       
  2863                   IN_type_symbol = last_type_symbol;
       
  2864                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2865                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2866                 function_type_prefix = return_type_symbol;
       
  2867                 break;
       
  2868                 
       
  2869             }
       
  2870             
       
  2871             
       
  2872             ERROR;
       
  2873         }
       
  2874         
       
  2875     }/*function_dint_to_string*/
       
  2876     break;
       
  2877 
       
  2878 /****
       
  2879  *DINT_TO_LWORD
       
  2880  */
       
  2881     case function_dint_to_lword :
       
  2882     {
       
  2883         symbol_c *last_type_symbol = NULL;
       
  2884 
       
  2885         {
       
  2886             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2887             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2888             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2889             symbol_c *IN_type_symbol = NULL;
       
  2890             
       
  2891             /* Get the value from a foo(<param_value>) style call */
       
  2892             if (IN_param_value == NULL)
       
  2893               IN_param_value = function_call_param_iterator.next_nf();
       
  2894             if (IN_param_value != NULL) {
       
  2895               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2896               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2897             }
       
  2898             
       
  2899             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2900             {
       
  2901         
       
  2902                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2903                 
       
  2904                 if (IN_type_symbol == NULL)
       
  2905                   IN_type_symbol = last_type_symbol;
       
  2906                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2907                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2908                 function_type_prefix = return_type_symbol;
       
  2909                 function_type_suffix = IN_type_symbol;
       
  2910                 break;
       
  2911                 
       
  2912             }
       
  2913             
       
  2914             
       
  2915             ERROR;
       
  2916         }
       
  2917         
       
  2918     }/*function_dint_to_lword*/
       
  2919     break;
       
  2920 
       
  2921 /****
       
  2922  *DINT_TO_UINT
       
  2923  */
       
  2924     case function_dint_to_uint :
       
  2925     {
       
  2926         symbol_c *last_type_symbol = NULL;
       
  2927 
       
  2928         {
       
  2929             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2930             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2931             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2932             symbol_c *IN_type_symbol = NULL;
       
  2933             
       
  2934             /* Get the value from a foo(<param_value>) style call */
       
  2935             if (IN_param_value == NULL)
       
  2936               IN_param_value = function_call_param_iterator.next_nf();
       
  2937             if (IN_param_value != NULL) {
       
  2938               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2939               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2940             }
       
  2941             
       
  2942             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2943             {
       
  2944         
       
  2945                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2946                 
       
  2947                 if (IN_type_symbol == NULL)
       
  2948                   IN_type_symbol = last_type_symbol;
       
  2949                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2950                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2951                 function_type_prefix = return_type_symbol;
       
  2952                 function_type_suffix = IN_type_symbol;
       
  2953                 break;
       
  2954                 
       
  2955             }
       
  2956             
       
  2957             
       
  2958             ERROR;
       
  2959         }
       
  2960         
       
  2961     }/*function_dint_to_uint*/
       
  2962     break;
       
  2963 
       
  2964 /****
       
  2965  *DINT_TO_LREAL
       
  2966  */
       
  2967     case function_dint_to_lreal :
       
  2968     {
       
  2969         symbol_c *last_type_symbol = NULL;
       
  2970 
       
  2971         {
       
  2972             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2974             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2975             symbol_c *IN_type_symbol = NULL;
       
  2976             
       
  2977             /* Get the value from a foo(<param_value>) style call */
       
  2978             if (IN_param_value == NULL)
       
  2979               IN_param_value = function_call_param_iterator.next_nf();
       
  2980             if (IN_param_value != NULL) {
       
  2981               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2982               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2983             }
       
  2984             
       
  2985             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2986             {
       
  2987         
       
  2988                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2989                 
       
  2990                 if (IN_type_symbol == NULL)
       
  2991                   IN_type_symbol = last_type_symbol;
       
  2992                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2993                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2994                 function_type_prefix = return_type_symbol;
       
  2995                 function_type_suffix = IN_type_symbol;
       
  2996                 break;
       
  2997                 
       
  2998             }
       
  2999             
       
  3000             
       
  3001             ERROR;
       
  3002         }
       
  3003         
       
  3004     }/*function_dint_to_lreal*/
       
  3005     break;
       
  3006 
       
  3007 /****
       
  3008  *DINT_TO_BYTE
       
  3009  */
       
  3010     case function_dint_to_byte :
       
  3011     {
       
  3012         symbol_c *last_type_symbol = NULL;
       
  3013 
       
  3014         {
       
  3015             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3017             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3018             symbol_c *IN_type_symbol = NULL;
       
  3019             
       
  3020             /* Get the value from a foo(<param_value>) style call */
       
  3021             if (IN_param_value == NULL)
       
  3022               IN_param_value = function_call_param_iterator.next_nf();
       
  3023             if (IN_param_value != NULL) {
       
  3024               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3025               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3026             }
       
  3027             
       
  3028             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3029             {
       
  3030         
       
  3031                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3032                 
       
  3033                 if (IN_type_symbol == NULL)
       
  3034                   IN_type_symbol = last_type_symbol;
       
  3035                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3036                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3037                 function_type_prefix = return_type_symbol;
       
  3038                 function_type_suffix = IN_type_symbol;
       
  3039                 break;
       
  3040                 
       
  3041             }
       
  3042             
       
  3043             
       
  3044             ERROR;
       
  3045         }
       
  3046         
       
  3047     }/*function_dint_to_byte*/
       
  3048     break;
       
  3049 
       
  3050 /****
       
  3051  *DINT_TO_USINT
       
  3052  */
       
  3053     case function_dint_to_usint :
       
  3054     {
       
  3055         symbol_c *last_type_symbol = NULL;
       
  3056 
       
  3057         {
       
  3058             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3059             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3060             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3061             symbol_c *IN_type_symbol = NULL;
       
  3062             
       
  3063             /* Get the value from a foo(<param_value>) style call */
       
  3064             if (IN_param_value == NULL)
       
  3065               IN_param_value = function_call_param_iterator.next_nf();
       
  3066             if (IN_param_value != NULL) {
       
  3067               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3068               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3069             }
       
  3070             
       
  3071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3072             {
       
  3073         
       
  3074                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3075                 
       
  3076                 if (IN_type_symbol == NULL)
       
  3077                   IN_type_symbol = last_type_symbol;
       
  3078                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3079                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3080                 function_type_prefix = return_type_symbol;
       
  3081                 function_type_suffix = IN_type_symbol;
       
  3082                 break;
       
  3083                 
       
  3084             }
       
  3085             
       
  3086             
       
  3087             ERROR;
       
  3088         }
       
  3089         
       
  3090     }/*function_dint_to_usint*/
       
  3091     break;
       
  3092 
       
  3093 /****
       
  3094  *DINT_TO_ULINT
       
  3095  */
       
  3096     case function_dint_to_ulint :
       
  3097     {
       
  3098         symbol_c *last_type_symbol = NULL;
       
  3099 
       
  3100         {
       
  3101             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3102             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3103             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3104             symbol_c *IN_type_symbol = NULL;
       
  3105             
       
  3106             /* Get the value from a foo(<param_value>) style call */
       
  3107             if (IN_param_value == NULL)
       
  3108               IN_param_value = function_call_param_iterator.next_nf();
       
  3109             if (IN_param_value != NULL) {
       
  3110               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3111               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3112             }
       
  3113             
       
  3114             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3115             {
       
  3116         
       
  3117                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3118                 
       
  3119                 if (IN_type_symbol == NULL)
       
  3120                   IN_type_symbol = last_type_symbol;
       
  3121                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3122                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3123                 function_type_prefix = return_type_symbol;
       
  3124                 function_type_suffix = IN_type_symbol;
       
  3125                 break;
       
  3126                 
       
  3127             }
       
  3128             
       
  3129             
       
  3130             ERROR;
       
  3131         }
       
  3132         
       
  3133     }/*function_dint_to_ulint*/
       
  3134     break;
       
  3135 
       
  3136 /****
       
  3137  *DINT_TO_BOOL
       
  3138  */
       
  3139     case function_dint_to_bool :
       
  3140     {
       
  3141         symbol_c *last_type_symbol = NULL;
       
  3142 
       
  3143         {
       
  3144             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3145             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3146             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3147             symbol_c *IN_type_symbol = NULL;
       
  3148             
       
  3149             /* Get the value from a foo(<param_value>) style call */
       
  3150             if (IN_param_value == NULL)
       
  3151               IN_param_value = function_call_param_iterator.next_nf();
       
  3152             if (IN_param_value != NULL) {
       
  3153               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3154               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3155             }
       
  3156             
       
  3157             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3158             {
       
  3159         
       
  3160                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3161                 
       
  3162                 if (IN_type_symbol == NULL)
       
  3163                   IN_type_symbol = last_type_symbol;
       
  3164                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3165                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3166                 function_type_prefix = return_type_symbol;
       
  3167                 function_type_suffix = IN_type_symbol;
       
  3168                 break;
       
  3169                 
       
  3170             }
       
  3171             
       
  3172             
       
  3173             ERROR;
       
  3174         }
       
  3175         
       
  3176     }/*function_dint_to_bool*/
       
  3177     break;
       
  3178 
       
  3179 /****
       
  3180  *DINT_TO_TIME
       
  3181  */
       
  3182     case function_dint_to_time :
       
  3183     {
       
  3184         symbol_c *last_type_symbol = NULL;
       
  3185 
       
  3186         {
       
  3187             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3188             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3189             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3190             symbol_c *IN_type_symbol = NULL;
       
  3191             
       
  3192             /* Get the value from a foo(<param_value>) style call */
       
  3193             if (IN_param_value == NULL)
       
  3194               IN_param_value = function_call_param_iterator.next_nf();
       
  3195             if (IN_param_value != NULL) {
       
  3196               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3197               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3198             }
       
  3199             
       
  3200             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3201             {
       
  3202         
       
  3203                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  3204                 
       
  3205                 if (IN_type_symbol == NULL)
       
  3206                   IN_type_symbol = last_type_symbol;
       
  3207                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3208                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3209                 function_type_prefix = return_type_symbol;
       
  3210                 break;
       
  3211                 
       
  3212             }
       
  3213             
       
  3214             
       
  3215             ERROR;
       
  3216         }
       
  3217         
       
  3218     }/*function_dint_to_time*/
       
  3219     break;
       
  3220 
       
  3221 /****
       
  3222  *DINT_TO_INT
       
  3223  */
       
  3224     case function_dint_to_int :
       
  3225     {
       
  3226         symbol_c *last_type_symbol = NULL;
       
  3227 
       
  3228         {
       
  3229             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3231             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3232             symbol_c *IN_type_symbol = NULL;
       
  3233             
       
  3234             /* Get the value from a foo(<param_value>) style call */
       
  3235             if (IN_param_value == NULL)
       
  3236               IN_param_value = function_call_param_iterator.next_nf();
       
  3237             if (IN_param_value != NULL) {
       
  3238               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3239               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3240             }
       
  3241             
       
  3242             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3243             {
       
  3244         
       
  3245                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3246                 
       
  3247                 if (IN_type_symbol == NULL)
       
  3248                   IN_type_symbol = last_type_symbol;
       
  3249                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3250                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3251                 function_type_prefix = return_type_symbol;
       
  3252                 function_type_suffix = IN_type_symbol;
       
  3253                 break;
       
  3254                 
       
  3255             }
       
  3256             
       
  3257             
       
  3258             ERROR;
       
  3259         }
       
  3260         
       
  3261     }/*function_dint_to_int*/
       
  3262     break;
       
  3263 
       
  3264 /****
       
  3265  *DATE_TO_REAL
       
  3266  */
       
  3267     case function_date_to_real :
       
  3268     {
       
  3269         symbol_c *last_type_symbol = NULL;
       
  3270 
       
  3271         {
       
  3272             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3274             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3275             symbol_c *IN_type_symbol = NULL;
       
  3276             
       
  3277             /* Get the value from a foo(<param_value>) style call */
       
  3278             if (IN_param_value == NULL)
       
  3279               IN_param_value = function_call_param_iterator.next_nf();
       
  3280             if (IN_param_value != NULL) {
       
  3281               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3282               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3283             }
       
  3284             
       
  3285             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3286             {
       
  3287         
       
  3288                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3289                 
       
  3290                 if (IN_type_symbol == NULL)
       
  3291                   IN_type_symbol = last_type_symbol;
       
  3292                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3293                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3294                 function_type_prefix = return_type_symbol;
       
  3295                 break;
       
  3296                 
       
  3297             }
       
  3298             
       
  3299             
       
  3300             ERROR;
       
  3301         }
       
  3302         
       
  3303     }/*function_date_to_real*/
       
  3304     break;
       
  3305 
       
  3306 /****
       
  3307  *DATE_TO_SINT
       
  3308  */
       
  3309     case function_date_to_sint :
       
  3310     {
       
  3311         symbol_c *last_type_symbol = NULL;
       
  3312 
       
  3313         {
       
  3314             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3315             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3316             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3317             symbol_c *IN_type_symbol = NULL;
       
  3318             
       
  3319             /* Get the value from a foo(<param_value>) style call */
       
  3320             if (IN_param_value == NULL)
       
  3321               IN_param_value = function_call_param_iterator.next_nf();
       
  3322             if (IN_param_value != NULL) {
       
  3323               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3324               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3325             }
       
  3326             
       
  3327             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3328             {
       
  3329         
       
  3330                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3331                 
       
  3332                 if (IN_type_symbol == NULL)
       
  3333                   IN_type_symbol = last_type_symbol;
       
  3334                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3335                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3336                 function_type_prefix = return_type_symbol;
       
  3337                 break;
       
  3338                 
       
  3339             }
       
  3340             
       
  3341             
       
  3342             ERROR;
       
  3343         }
       
  3344         
       
  3345     }/*function_date_to_sint*/
       
  3346     break;
       
  3347 
       
  3348 /****
       
  3349  *DATE_TO_LINT
       
  3350  */
       
  3351     case function_date_to_lint :
       
  3352     {
       
  3353         symbol_c *last_type_symbol = NULL;
       
  3354 
       
  3355         {
       
  3356             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3357             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3358             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3359             symbol_c *IN_type_symbol = NULL;
       
  3360             
       
  3361             /* Get the value from a foo(<param_value>) style call */
       
  3362             if (IN_param_value == NULL)
       
  3363               IN_param_value = function_call_param_iterator.next_nf();
       
  3364             if (IN_param_value != NULL) {
       
  3365               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3366               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3367             }
       
  3368             
       
  3369             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3370             {
       
  3371         
       
  3372                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3373                 
       
  3374                 if (IN_type_symbol == NULL)
       
  3375                   IN_type_symbol = last_type_symbol;
       
  3376                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3377                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3378                 function_type_prefix = return_type_symbol;
       
  3379                 break;
       
  3380                 
       
  3381             }
       
  3382             
       
  3383             
       
  3384             ERROR;
       
  3385         }
       
  3386         
       
  3387     }/*function_date_to_lint*/
       
  3388     break;
       
  3389 
       
  3390 /****
       
  3391  *DATE_TO_DINT
       
  3392  */
       
  3393     case function_date_to_dint :
       
  3394     {
       
  3395         symbol_c *last_type_symbol = NULL;
       
  3396 
       
  3397         {
       
  3398             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3399             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3400             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3401             symbol_c *IN_type_symbol = NULL;
       
  3402             
       
  3403             /* Get the value from a foo(<param_value>) style call */
       
  3404             if (IN_param_value == NULL)
       
  3405               IN_param_value = function_call_param_iterator.next_nf();
       
  3406             if (IN_param_value != NULL) {
       
  3407               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3408               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3409             }
       
  3410             
       
  3411             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3412             {
       
  3413         
       
  3414                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3415                 
       
  3416                 if (IN_type_symbol == NULL)
       
  3417                   IN_type_symbol = last_type_symbol;
       
  3418                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3419                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3420                 function_type_prefix = return_type_symbol;
       
  3421                 break;
       
  3422                 
       
  3423             }
       
  3424             
       
  3425             
       
  3426             ERROR;
       
  3427         }
       
  3428         
       
  3429     }/*function_date_to_dint*/
       
  3430     break;
       
  3431 
       
  3432 /****
       
  3433  *DATE_TO_DWORD
       
  3434  */
       
  3435     case function_date_to_dword :
       
  3436     {
       
  3437         symbol_c *last_type_symbol = NULL;
       
  3438 
       
  3439         {
       
  3440             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3442             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3443             symbol_c *IN_type_symbol = NULL;
       
  3444             
       
  3445             /* Get the value from a foo(<param_value>) style call */
       
  3446             if (IN_param_value == NULL)
       
  3447               IN_param_value = function_call_param_iterator.next_nf();
       
  3448             if (IN_param_value != NULL) {
       
  3449               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3450               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3451             }
       
  3452             
       
  3453             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3454             {
       
  3455         
       
  3456                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3457                 
       
  3458                 if (IN_type_symbol == NULL)
       
  3459                   IN_type_symbol = last_type_symbol;
       
  3460                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3461                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3462                 function_type_prefix = return_type_symbol;
       
  3463                 break;
       
  3464                 
       
  3465             }
       
  3466             
       
  3467             
       
  3468             ERROR;
       
  3469         }
       
  3470         
       
  3471     }/*function_date_to_dword*/
       
  3472     break;
       
  3473 
       
  3474 /****
       
  3475  *DATE_TO_UDINT
       
  3476  */
       
  3477     case function_date_to_udint :
       
  3478     {
       
  3479         symbol_c *last_type_symbol = NULL;
       
  3480 
       
  3481         {
       
  3482             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3484             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3485             symbol_c *IN_type_symbol = NULL;
       
  3486             
       
  3487             /* Get the value from a foo(<param_value>) style call */
       
  3488             if (IN_param_value == NULL)
       
  3489               IN_param_value = function_call_param_iterator.next_nf();
       
  3490             if (IN_param_value != NULL) {
       
  3491               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3492               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3493             }
       
  3494             
       
  3495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3496             {
       
  3497         
       
  3498                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3499                 
       
  3500                 if (IN_type_symbol == NULL)
       
  3501                   IN_type_symbol = last_type_symbol;
       
  3502                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3503                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3504                 function_type_prefix = return_type_symbol;
       
  3505                 break;
       
  3506                 
       
  3507             }
       
  3508             
       
  3509             
       
  3510             ERROR;
       
  3511         }
       
  3512         
       
  3513     }/*function_date_to_udint*/
       
  3514     break;
       
  3515 
       
  3516 /****
       
  3517  *DATE_TO_WORD
       
  3518  */
       
  3519     case function_date_to_word :
       
  3520     {
       
  3521         symbol_c *last_type_symbol = NULL;
       
  3522 
       
  3523         {
       
  3524             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3525             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3526             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3527             symbol_c *IN_type_symbol = NULL;
       
  3528             
       
  3529             /* Get the value from a foo(<param_value>) style call */
       
  3530             if (IN_param_value == NULL)
       
  3531               IN_param_value = function_call_param_iterator.next_nf();
       
  3532             if (IN_param_value != NULL) {
       
  3533               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3534               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3535             }
       
  3536             
       
  3537             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3538             {
       
  3539         
       
  3540                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3541                 
       
  3542                 if (IN_type_symbol == NULL)
       
  3543                   IN_type_symbol = last_type_symbol;
       
  3544                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3545                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3546                 function_type_prefix = return_type_symbol;
       
  3547                 break;
       
  3548                 
       
  3549             }
       
  3550             
       
  3551             
       
  3552             ERROR;
       
  3553         }
       
  3554         
       
  3555     }/*function_date_to_word*/
       
  3556     break;
       
  3557 
       
  3558 /****
       
  3559  *DATE_TO_STRING
       
  3560  */
       
  3561     case function_date_to_string :
       
  3562     {
       
  3563         symbol_c *last_type_symbol = NULL;
       
  3564 
       
  3565         {
       
  3566             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3567             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3568             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3569             symbol_c *IN_type_symbol = NULL;
       
  3570             
       
  3571             /* Get the value from a foo(<param_value>) style call */
       
  3572             if (IN_param_value == NULL)
       
  3573               IN_param_value = function_call_param_iterator.next_nf();
       
  3574             if (IN_param_value != NULL) {
       
  3575               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3576               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3577             }
       
  3578             
       
  3579             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3580             {
       
  3581         
       
  3582                 function_name = (symbol_c*)(new pragma_c("__date_to_string"));
       
  3583                 
       
  3584                 if (IN_type_symbol == NULL)
       
  3585                   IN_type_symbol = last_type_symbol;
       
  3586                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3587                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3588                 function_type_prefix = return_type_symbol;
       
  3589                 break;
       
  3590                 
       
  3591             }
       
  3592             
       
  3593             
       
  3594             ERROR;
       
  3595         }
       
  3596         
       
  3597     }/*function_date_to_string*/
       
  3598     break;
       
  3599 
       
  3600 /****
       
  3601  *DATE_TO_LWORD
       
  3602  */
       
  3603     case function_date_to_lword :
       
  3604     {
       
  3605         symbol_c *last_type_symbol = NULL;
       
  3606 
       
  3607         {
       
  3608             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3609             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3610             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3611             symbol_c *IN_type_symbol = NULL;
       
  3612             
       
  3613             /* Get the value from a foo(<param_value>) style call */
       
  3614             if (IN_param_value == NULL)
       
  3615               IN_param_value = function_call_param_iterator.next_nf();
       
  3616             if (IN_param_value != NULL) {
       
  3617               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3618               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3619             }
       
  3620             
       
  3621             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3622             {
       
  3623         
       
  3624                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3625                 
       
  3626                 if (IN_type_symbol == NULL)
       
  3627                   IN_type_symbol = last_type_symbol;
       
  3628                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3629                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3630                 function_type_prefix = return_type_symbol;
       
  3631                 break;
       
  3632                 
       
  3633             }
       
  3634             
       
  3635             
       
  3636             ERROR;
       
  3637         }
       
  3638         
       
  3639     }/*function_date_to_lword*/
       
  3640     break;
       
  3641 
       
  3642 /****
       
  3643  *DATE_TO_UINT
       
  3644  */
       
  3645     case function_date_to_uint :
       
  3646     {
       
  3647         symbol_c *last_type_symbol = NULL;
       
  3648 
       
  3649         {
       
  3650             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3651             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3652             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3653             symbol_c *IN_type_symbol = NULL;
       
  3654             
       
  3655             /* Get the value from a foo(<param_value>) style call */
       
  3656             if (IN_param_value == NULL)
       
  3657               IN_param_value = function_call_param_iterator.next_nf();
       
  3658             if (IN_param_value != NULL) {
       
  3659               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3660               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3661             }
       
  3662             
       
  3663             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3664             {
       
  3665         
       
  3666                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3667                 
       
  3668                 if (IN_type_symbol == NULL)
       
  3669                   IN_type_symbol = last_type_symbol;
       
  3670                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3671                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3672                 function_type_prefix = return_type_symbol;
       
  3673                 break;
       
  3674                 
       
  3675             }
       
  3676             
       
  3677             
       
  3678             ERROR;
       
  3679         }
       
  3680         
       
  3681     }/*function_date_to_uint*/
       
  3682     break;
       
  3683 
       
  3684 /****
       
  3685  *DATE_TO_LREAL
       
  3686  */
       
  3687     case function_date_to_lreal :
       
  3688     {
       
  3689         symbol_c *last_type_symbol = NULL;
       
  3690 
       
  3691         {
       
  3692             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3693             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3694             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3695             symbol_c *IN_type_symbol = NULL;
       
  3696             
       
  3697             /* Get the value from a foo(<param_value>) style call */
       
  3698             if (IN_param_value == NULL)
       
  3699               IN_param_value = function_call_param_iterator.next_nf();
       
  3700             if (IN_param_value != NULL) {
       
  3701               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3702               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3703             }
       
  3704             
       
  3705             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3706             {
       
  3707         
       
  3708                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3709                 
       
  3710                 if (IN_type_symbol == NULL)
       
  3711                   IN_type_symbol = last_type_symbol;
       
  3712                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3713                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3714                 function_type_prefix = return_type_symbol;
       
  3715                 break;
       
  3716                 
       
  3717             }
       
  3718             
       
  3719             
       
  3720             ERROR;
       
  3721         }
       
  3722         
       
  3723     }/*function_date_to_lreal*/
       
  3724     break;
       
  3725 
       
  3726 /****
       
  3727  *DATE_TO_BYTE
       
  3728  */
       
  3729     case function_date_to_byte :
       
  3730     {
       
  3731         symbol_c *last_type_symbol = NULL;
       
  3732 
       
  3733         {
       
  3734             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3736             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3737             symbol_c *IN_type_symbol = NULL;
       
  3738             
       
  3739             /* Get the value from a foo(<param_value>) style call */
       
  3740             if (IN_param_value == NULL)
       
  3741               IN_param_value = function_call_param_iterator.next_nf();
       
  3742             if (IN_param_value != NULL) {
       
  3743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3744               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3745             }
       
  3746             
       
  3747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3748             {
       
  3749         
       
  3750                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3751                 
       
  3752                 if (IN_type_symbol == NULL)
       
  3753                   IN_type_symbol = last_type_symbol;
       
  3754                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3755                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3756                 function_type_prefix = return_type_symbol;
       
  3757                 break;
       
  3758                 
       
  3759             }
       
  3760             
       
  3761             
       
  3762             ERROR;
       
  3763         }
       
  3764         
       
  3765     }/*function_date_to_byte*/
       
  3766     break;
       
  3767 
       
  3768 /****
       
  3769  *DATE_TO_USINT
       
  3770  */
       
  3771     case function_date_to_usint :
       
  3772     {
       
  3773         symbol_c *last_type_symbol = NULL;
       
  3774 
       
  3775         {
       
  3776             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3777             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3778             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3779             symbol_c *IN_type_symbol = NULL;
       
  3780             
       
  3781             /* Get the value from a foo(<param_value>) style call */
       
  3782             if (IN_param_value == NULL)
       
  3783               IN_param_value = function_call_param_iterator.next_nf();
       
  3784             if (IN_param_value != NULL) {
       
  3785               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3786               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3787             }
       
  3788             
       
  3789             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3790             {
       
  3791         
       
  3792                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3793                 
       
  3794                 if (IN_type_symbol == NULL)
       
  3795                   IN_type_symbol = last_type_symbol;
       
  3796                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3797                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3798                 function_type_prefix = return_type_symbol;
       
  3799                 break;
       
  3800                 
       
  3801             }
       
  3802             
       
  3803             
       
  3804             ERROR;
       
  3805         }
       
  3806         
       
  3807     }/*function_date_to_usint*/
       
  3808     break;
       
  3809 
       
  3810 /****
       
  3811  *DATE_TO_ULINT
       
  3812  */
       
  3813     case function_date_to_ulint :
       
  3814     {
       
  3815         symbol_c *last_type_symbol = NULL;
       
  3816 
       
  3817         {
       
  3818             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3819             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3820             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3821             symbol_c *IN_type_symbol = NULL;
       
  3822             
       
  3823             /* Get the value from a foo(<param_value>) style call */
       
  3824             if (IN_param_value == NULL)
       
  3825               IN_param_value = function_call_param_iterator.next_nf();
       
  3826             if (IN_param_value != NULL) {
       
  3827               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3828               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3829             }
       
  3830             
       
  3831             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3832             {
       
  3833         
       
  3834                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3835                 
       
  3836                 if (IN_type_symbol == NULL)
       
  3837                   IN_type_symbol = last_type_symbol;
       
  3838                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3839                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3840                 function_type_prefix = return_type_symbol;
       
  3841                 break;
       
  3842                 
       
  3843             }
       
  3844             
       
  3845             
       
  3846             ERROR;
       
  3847         }
       
  3848         
       
  3849     }/*function_date_to_ulint*/
       
  3850     break;
       
  3851 
       
  3852 /****
       
  3853  *DATE_TO_INT
       
  3854  */
       
  3855     case function_date_to_int :
       
  3856     {
       
  3857         symbol_c *last_type_symbol = NULL;
       
  3858 
       
  3859         {
       
  3860             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3861             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3862             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3863             symbol_c *IN_type_symbol = NULL;
       
  3864             
       
  3865             /* Get the value from a foo(<param_value>) style call */
       
  3866             if (IN_param_value == NULL)
       
  3867               IN_param_value = function_call_param_iterator.next_nf();
       
  3868             if (IN_param_value != NULL) {
       
  3869               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3870               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3871             }
       
  3872             
       
  3873             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3874             {
       
  3875         
       
  3876                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3877                 
       
  3878                 if (IN_type_symbol == NULL)
       
  3879                   IN_type_symbol = last_type_symbol;
       
  3880                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3881                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3882                 function_type_prefix = return_type_symbol;
       
  3883                 break;
       
  3884                 
       
  3885             }
       
  3886             
       
  3887             
       
  3888             ERROR;
       
  3889         }
       
  3890         
       
  3891     }/*function_date_to_int*/
       
  3892     break;
       
  3893 
       
  3894 /****
       
  3895  *DWORD_TO_REAL
       
  3896  */
       
  3897     case function_dword_to_real :
       
  3898     {
       
  3899         symbol_c *last_type_symbol = NULL;
       
  3900 
       
  3901         {
       
  3902             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3904             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3905             symbol_c *IN_type_symbol = NULL;
       
  3906             
       
  3907             /* Get the value from a foo(<param_value>) style call */
       
  3908             if (IN_param_value == NULL)
       
  3909               IN_param_value = function_call_param_iterator.next_nf();
       
  3910             if (IN_param_value != NULL) {
       
  3911               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3912               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3913             }
       
  3914             
       
  3915             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3916             {
       
  3917         
       
  3918                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3919                 
       
  3920                 if (IN_type_symbol == NULL)
       
  3921                   IN_type_symbol = last_type_symbol;
       
  3922                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3923                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3924                 function_type_prefix = return_type_symbol;
       
  3925                 function_type_suffix = IN_type_symbol;
       
  3926                 break;
       
  3927                 
       
  3928             }
       
  3929             
       
  3930             
       
  3931             ERROR;
       
  3932         }
       
  3933         
       
  3934     }/*function_dword_to_real*/
       
  3935     break;
       
  3936 
       
  3937 /****
       
  3938  *DWORD_TO_SINT
       
  3939  */
       
  3940     case function_dword_to_sint :
       
  3941     {
       
  3942         symbol_c *last_type_symbol = NULL;
       
  3943 
       
  3944         {
       
  3945             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3946             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3947             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3948             symbol_c *IN_type_symbol = NULL;
       
  3949             
       
  3950             /* Get the value from a foo(<param_value>) style call */
       
  3951             if (IN_param_value == NULL)
       
  3952               IN_param_value = function_call_param_iterator.next_nf();
       
  3953             if (IN_param_value != NULL) {
       
  3954               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3955               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3956             }
       
  3957             
       
  3958             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3959             {
       
  3960         
       
  3961                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3962                 
       
  3963                 if (IN_type_symbol == NULL)
       
  3964                   IN_type_symbol = last_type_symbol;
       
  3965                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3966                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3967                 function_type_prefix = return_type_symbol;
       
  3968                 function_type_suffix = IN_type_symbol;
       
  3969                 break;
       
  3970                 
       
  3971             }
       
  3972             
       
  3973             
       
  3974             ERROR;
       
  3975         }
       
  3976         
       
  3977     }/*function_dword_to_sint*/
       
  3978     break;
       
  3979 
       
  3980 /****
       
  3981  *DWORD_TO_LINT
       
  3982  */
       
  3983     case function_dword_to_lint :
       
  3984     {
       
  3985         symbol_c *last_type_symbol = NULL;
       
  3986 
       
  3987         {
       
  3988             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3990             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3991             symbol_c *IN_type_symbol = NULL;
       
  3992             
       
  3993             /* Get the value from a foo(<param_value>) style call */
       
  3994             if (IN_param_value == NULL)
       
  3995               IN_param_value = function_call_param_iterator.next_nf();
       
  3996             if (IN_param_value != NULL) {
       
  3997               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3998               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3999             }
       
  4000             
       
  4001             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4002             {
       
  4003         
       
  4004                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4005                 
       
  4006                 if (IN_type_symbol == NULL)
       
  4007                   IN_type_symbol = last_type_symbol;
       
  4008                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4009                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4010                 function_type_prefix = return_type_symbol;
       
  4011                 function_type_suffix = IN_type_symbol;
       
  4012                 break;
       
  4013                 
       
  4014             }
       
  4015             
       
  4016             
       
  4017             ERROR;
       
  4018         }
       
  4019         
       
  4020     }/*function_dword_to_lint*/
       
  4021     break;
       
  4022 
       
  4023 /****
       
  4024  *DWORD_TO_DINT
       
  4025  */
       
  4026     case function_dword_to_dint :
       
  4027     {
       
  4028         symbol_c *last_type_symbol = NULL;
       
  4029 
       
  4030         {
       
  4031             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4033             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4034             symbol_c *IN_type_symbol = NULL;
       
  4035             
       
  4036             /* Get the value from a foo(<param_value>) style call */
       
  4037             if (IN_param_value == NULL)
       
  4038               IN_param_value = function_call_param_iterator.next_nf();
       
  4039             if (IN_param_value != NULL) {
       
  4040               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4041               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4042             }
       
  4043             
       
  4044             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4045             {
       
  4046         
       
  4047                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4048                 
       
  4049                 if (IN_type_symbol == NULL)
       
  4050                   IN_type_symbol = last_type_symbol;
       
  4051                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4052                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4053                 function_type_prefix = return_type_symbol;
       
  4054                 function_type_suffix = IN_type_symbol;
       
  4055                 break;
       
  4056                 
       
  4057             }
       
  4058             
       
  4059             
       
  4060             ERROR;
       
  4061         }
       
  4062         
       
  4063     }/*function_dword_to_dint*/
       
  4064     break;
       
  4065 
       
  4066 /****
       
  4067  *DWORD_TO_DATE
       
  4068  */
       
  4069     case function_dword_to_date :
       
  4070     {
       
  4071         symbol_c *last_type_symbol = NULL;
       
  4072 
       
  4073         {
       
  4074             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4076             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4077             symbol_c *IN_type_symbol = NULL;
       
  4078             
       
  4079             /* Get the value from a foo(<param_value>) style call */
       
  4080             if (IN_param_value == NULL)
       
  4081               IN_param_value = function_call_param_iterator.next_nf();
       
  4082             if (IN_param_value != NULL) {
       
  4083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4085             }
       
  4086             
       
  4087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4088             {
       
  4089         
       
  4090                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4091                 
       
  4092                 if (IN_type_symbol == NULL)
       
  4093                   IN_type_symbol = last_type_symbol;
       
  4094                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4095                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4096                 function_type_prefix = return_type_symbol;
       
  4097                 break;
       
  4098                 
       
  4099             }
       
  4100             
       
  4101             
       
  4102             ERROR;
       
  4103         }
       
  4104         
       
  4105     }/*function_dword_to_date*/
       
  4106     break;
       
  4107 
       
  4108 /****
       
  4109  *DWORD_TO_DT
       
  4110  */
       
  4111     case function_dword_to_dt :
       
  4112     {
       
  4113         symbol_c *last_type_symbol = NULL;
       
  4114 
       
  4115         {
       
  4116             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4117             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4118             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4119             symbol_c *IN_type_symbol = NULL;
       
  4120             
       
  4121             /* Get the value from a foo(<param_value>) style call */
       
  4122             if (IN_param_value == NULL)
       
  4123               IN_param_value = function_call_param_iterator.next_nf();
       
  4124             if (IN_param_value != NULL) {
       
  4125               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4126               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4127             }
       
  4128             
       
  4129             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4130             {
       
  4131         
       
  4132                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4133                 
       
  4134                 if (IN_type_symbol == NULL)
       
  4135                   IN_type_symbol = last_type_symbol;
       
  4136                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4137                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4138                 function_type_prefix = return_type_symbol;
       
  4139                 break;
       
  4140                 
       
  4141             }
       
  4142             
       
  4143             
       
  4144             ERROR;
       
  4145         }
       
  4146         
       
  4147     }/*function_dword_to_dt*/
       
  4148     break;
       
  4149 
       
  4150 /****
       
  4151  *DWORD_TO_TOD
       
  4152  */
       
  4153     case function_dword_to_tod :
       
  4154     {
       
  4155         symbol_c *last_type_symbol = NULL;
       
  4156 
       
  4157         {
       
  4158             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4159             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4160             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4161             symbol_c *IN_type_symbol = NULL;
       
  4162             
       
  4163             /* Get the value from a foo(<param_value>) style call */
       
  4164             if (IN_param_value == NULL)
       
  4165               IN_param_value = function_call_param_iterator.next_nf();
       
  4166             if (IN_param_value != NULL) {
       
  4167               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4168               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4169             }
       
  4170             
       
  4171             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4172             {
       
  4173         
       
  4174                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4175                 
       
  4176                 if (IN_type_symbol == NULL)
       
  4177                   IN_type_symbol = last_type_symbol;
       
  4178                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4179                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4180                 function_type_prefix = return_type_symbol;
       
  4181                 break;
       
  4182                 
       
  4183             }
       
  4184             
       
  4185             
       
  4186             ERROR;
       
  4187         }
       
  4188         
       
  4189     }/*function_dword_to_tod*/
       
  4190     break;
       
  4191 
       
  4192 /****
       
  4193  *DWORD_TO_UDINT
       
  4194  */
       
  4195     case function_dword_to_udint :
       
  4196     {
       
  4197         symbol_c *last_type_symbol = NULL;
       
  4198 
       
  4199         {
       
  4200             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4202             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4203             symbol_c *IN_type_symbol = NULL;
       
  4204             
       
  4205             /* Get the value from a foo(<param_value>) style call */
       
  4206             if (IN_param_value == NULL)
       
  4207               IN_param_value = function_call_param_iterator.next_nf();
       
  4208             if (IN_param_value != NULL) {
       
  4209               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4210               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4211             }
       
  4212             
       
  4213             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4214             {
       
  4215         
       
  4216                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4217                 
       
  4218                 if (IN_type_symbol == NULL)
       
  4219                   IN_type_symbol = last_type_symbol;
       
  4220                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4221                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4222                 function_type_prefix = return_type_symbol;
       
  4223                 function_type_suffix = IN_type_symbol;
       
  4224                 break;
       
  4225                 
       
  4226             }
       
  4227             
       
  4228             
       
  4229             ERROR;
       
  4230         }
       
  4231         
       
  4232     }/*function_dword_to_udint*/
       
  4233     break;
       
  4234 
       
  4235 /****
       
  4236  *DWORD_TO_WORD
       
  4237  */
       
  4238     case function_dword_to_word :
       
  4239     {
       
  4240         symbol_c *last_type_symbol = NULL;
       
  4241 
       
  4242         {
       
  4243             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4244             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4245             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4246             symbol_c *IN_type_symbol = NULL;
       
  4247             
       
  4248             /* Get the value from a foo(<param_value>) style call */
       
  4249             if (IN_param_value == NULL)
       
  4250               IN_param_value = function_call_param_iterator.next_nf();
       
  4251             if (IN_param_value != NULL) {
       
  4252               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4253               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4254             }
       
  4255             
       
  4256             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4257             {
       
  4258         
       
  4259                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4260                 
       
  4261                 if (IN_type_symbol == NULL)
       
  4262                   IN_type_symbol = last_type_symbol;
       
  4263                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4264                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4265                 function_type_prefix = return_type_symbol;
       
  4266                 function_type_suffix = IN_type_symbol;
       
  4267                 break;
       
  4268                 
       
  4269             }
       
  4270             
       
  4271             
       
  4272             ERROR;
       
  4273         }
       
  4274         
       
  4275     }/*function_dword_to_word*/
       
  4276     break;
       
  4277 
       
  4278 /****
       
  4279  *DWORD_TO_STRING
       
  4280  */
       
  4281     case function_dword_to_string :
       
  4282     {
       
  4283         symbol_c *last_type_symbol = NULL;
       
  4284 
       
  4285         {
       
  4286             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4287             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4288             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4289             symbol_c *IN_type_symbol = NULL;
       
  4290             
       
  4291             /* Get the value from a foo(<param_value>) style call */
       
  4292             if (IN_param_value == NULL)
       
  4293               IN_param_value = function_call_param_iterator.next_nf();
       
  4294             if (IN_param_value != NULL) {
       
  4295               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4296               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4297             }
       
  4298             
       
  4299             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4300             {
       
  4301         
       
  4302                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  4303                 
       
  4304                 if (IN_type_symbol == NULL)
       
  4305                   IN_type_symbol = last_type_symbol;
       
  4306                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4308                 function_type_prefix = return_type_symbol;
       
  4309                 break;
       
  4310                 
       
  4311             }
       
  4312             
       
  4313             
       
  4314             ERROR;
       
  4315         }
       
  4316         
       
  4317     }/*function_dword_to_string*/
       
  4318     break;
       
  4319 
       
  4320 /****
       
  4321  *DWORD_TO_LWORD
       
  4322  */
       
  4323     case function_dword_to_lword :
       
  4324     {
       
  4325         symbol_c *last_type_symbol = NULL;
       
  4326 
       
  4327         {
       
  4328             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4329             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4330             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4331             symbol_c *IN_type_symbol = NULL;
       
  4332             
       
  4333             /* Get the value from a foo(<param_value>) style call */
       
  4334             if (IN_param_value == NULL)
       
  4335               IN_param_value = function_call_param_iterator.next_nf();
       
  4336             if (IN_param_value != NULL) {
       
  4337               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4338               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4339             }
       
  4340             
       
  4341             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4342             {
       
  4343         
       
  4344                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4345                 
       
  4346                 if (IN_type_symbol == NULL)
       
  4347                   IN_type_symbol = last_type_symbol;
       
  4348                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4349                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4350                 function_type_prefix = return_type_symbol;
       
  4351                 function_type_suffix = IN_type_symbol;
       
  4352                 break;
       
  4353                 
       
  4354             }
       
  4355             
       
  4356             
       
  4357             ERROR;
       
  4358         }
       
  4359         
       
  4360     }/*function_dword_to_lword*/
       
  4361     break;
       
  4362 
       
  4363 /****
       
  4364  *DWORD_TO_UINT
       
  4365  */
       
  4366     case function_dword_to_uint :
       
  4367     {
       
  4368         symbol_c *last_type_symbol = NULL;
       
  4369 
       
  4370         {
       
  4371             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4373             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4374             symbol_c *IN_type_symbol = NULL;
       
  4375             
       
  4376             /* Get the value from a foo(<param_value>) style call */
       
  4377             if (IN_param_value == NULL)
       
  4378               IN_param_value = function_call_param_iterator.next_nf();
       
  4379             if (IN_param_value != NULL) {
       
  4380               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4381               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4382             }
       
  4383             
       
  4384             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4385             {
       
  4386         
       
  4387                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4388                 
       
  4389                 if (IN_type_symbol == NULL)
       
  4390                   IN_type_symbol = last_type_symbol;
       
  4391                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4392                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4393                 function_type_prefix = return_type_symbol;
       
  4394                 function_type_suffix = IN_type_symbol;
       
  4395                 break;
       
  4396                 
       
  4397             }
       
  4398             
       
  4399             
       
  4400             ERROR;
       
  4401         }
       
  4402         
       
  4403     }/*function_dword_to_uint*/
       
  4404     break;
       
  4405 
       
  4406 /****
       
  4407  *DWORD_TO_LREAL
       
  4408  */
       
  4409     case function_dword_to_lreal :
       
  4410     {
       
  4411         symbol_c *last_type_symbol = NULL;
       
  4412 
       
  4413         {
       
  4414             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4416             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4417             symbol_c *IN_type_symbol = NULL;
       
  4418             
       
  4419             /* Get the value from a foo(<param_value>) style call */
       
  4420             if (IN_param_value == NULL)
       
  4421               IN_param_value = function_call_param_iterator.next_nf();
       
  4422             if (IN_param_value != NULL) {
       
  4423               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4424               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4425             }
       
  4426             
       
  4427             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4428             {
       
  4429         
       
  4430                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4431                 
       
  4432                 if (IN_type_symbol == NULL)
       
  4433                   IN_type_symbol = last_type_symbol;
       
  4434                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4435                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4436                 function_type_prefix = return_type_symbol;
       
  4437                 function_type_suffix = IN_type_symbol;
       
  4438                 break;
       
  4439                 
       
  4440             }
       
  4441             
       
  4442             
       
  4443             ERROR;
       
  4444         }
       
  4445         
       
  4446     }/*function_dword_to_lreal*/
       
  4447     break;
       
  4448 
       
  4449 /****
       
  4450  *DWORD_TO_BYTE
       
  4451  */
       
  4452     case function_dword_to_byte :
       
  4453     {
       
  4454         symbol_c *last_type_symbol = NULL;
       
  4455 
       
  4456         {
       
  4457             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4458             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4459             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4460             symbol_c *IN_type_symbol = NULL;
       
  4461             
       
  4462             /* Get the value from a foo(<param_value>) style call */
       
  4463             if (IN_param_value == NULL)
       
  4464               IN_param_value = function_call_param_iterator.next_nf();
       
  4465             if (IN_param_value != NULL) {
       
  4466               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4467               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4468             }
       
  4469             
       
  4470             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4471             {
       
  4472         
       
  4473                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4474                 
       
  4475                 if (IN_type_symbol == NULL)
       
  4476                   IN_type_symbol = last_type_symbol;
       
  4477                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4478                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4479                 function_type_prefix = return_type_symbol;
       
  4480                 function_type_suffix = IN_type_symbol;
       
  4481                 break;
       
  4482                 
       
  4483             }
       
  4484             
       
  4485             
       
  4486             ERROR;
       
  4487         }
       
  4488         
       
  4489     }/*function_dword_to_byte*/
       
  4490     break;
       
  4491 
       
  4492 /****
       
  4493  *DWORD_TO_USINT
       
  4494  */
       
  4495     case function_dword_to_usint :
       
  4496     {
       
  4497         symbol_c *last_type_symbol = NULL;
       
  4498 
       
  4499         {
       
  4500             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4501             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4502             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4503             symbol_c *IN_type_symbol = NULL;
       
  4504             
       
  4505             /* Get the value from a foo(<param_value>) style call */
       
  4506             if (IN_param_value == NULL)
       
  4507               IN_param_value = function_call_param_iterator.next_nf();
       
  4508             if (IN_param_value != NULL) {
       
  4509               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4510               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4511             }
       
  4512             
       
  4513             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4514             {
       
  4515         
       
  4516                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4517                 
       
  4518                 if (IN_type_symbol == NULL)
       
  4519                   IN_type_symbol = last_type_symbol;
       
  4520                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4521                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4522                 function_type_prefix = return_type_symbol;
       
  4523                 function_type_suffix = IN_type_symbol;
       
  4524                 break;
       
  4525                 
       
  4526             }
       
  4527             
       
  4528             
       
  4529             ERROR;
       
  4530         }
       
  4531         
       
  4532     }/*function_dword_to_usint*/
       
  4533     break;
       
  4534 
       
  4535 /****
       
  4536  *DWORD_TO_ULINT
       
  4537  */
       
  4538     case function_dword_to_ulint :
       
  4539     {
       
  4540         symbol_c *last_type_symbol = NULL;
       
  4541 
       
  4542         {
       
  4543             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4545             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4546             symbol_c *IN_type_symbol = NULL;
       
  4547             
       
  4548             /* Get the value from a foo(<param_value>) style call */
       
  4549             if (IN_param_value == NULL)
       
  4550               IN_param_value = function_call_param_iterator.next_nf();
       
  4551             if (IN_param_value != NULL) {
       
  4552               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4553               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4554             }
       
  4555             
       
  4556             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4557             {
       
  4558         
       
  4559                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4560                 
       
  4561                 if (IN_type_symbol == NULL)
       
  4562                   IN_type_symbol = last_type_symbol;
       
  4563                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4564                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4565                 function_type_prefix = return_type_symbol;
       
  4566                 function_type_suffix = IN_type_symbol;
       
  4567                 break;
       
  4568                 
       
  4569             }
       
  4570             
       
  4571             
       
  4572             ERROR;
       
  4573         }
       
  4574         
       
  4575     }/*function_dword_to_ulint*/
       
  4576     break;
       
  4577 
       
  4578 /****
       
  4579  *DWORD_TO_BOOL
       
  4580  */
       
  4581     case function_dword_to_bool :
       
  4582     {
       
  4583         symbol_c *last_type_symbol = NULL;
       
  4584 
       
  4585         {
       
  4586             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4588             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4589             symbol_c *IN_type_symbol = NULL;
       
  4590             
       
  4591             /* Get the value from a foo(<param_value>) style call */
       
  4592             if (IN_param_value == NULL)
       
  4593               IN_param_value = function_call_param_iterator.next_nf();
       
  4594             if (IN_param_value != NULL) {
       
  4595               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4596               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4597             }
       
  4598             
       
  4599             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4600             {
       
  4601         
       
  4602                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4603                 
       
  4604                 if (IN_type_symbol == NULL)
       
  4605                   IN_type_symbol = last_type_symbol;
       
  4606                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4607                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4608                 function_type_prefix = return_type_symbol;
       
  4609                 function_type_suffix = IN_type_symbol;
       
  4610                 break;
       
  4611                 
       
  4612             }
       
  4613             
       
  4614             
       
  4615             ERROR;
       
  4616         }
       
  4617         
       
  4618     }/*function_dword_to_bool*/
       
  4619     break;
       
  4620 
       
  4621 /****
       
  4622  *DWORD_TO_TIME
       
  4623  */
       
  4624     case function_dword_to_time :
       
  4625     {
       
  4626         symbol_c *last_type_symbol = NULL;
       
  4627 
       
  4628         {
       
  4629             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4630             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4631             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4632             symbol_c *IN_type_symbol = NULL;
       
  4633             
       
  4634             /* Get the value from a foo(<param_value>) style call */
       
  4635             if (IN_param_value == NULL)
       
  4636               IN_param_value = function_call_param_iterator.next_nf();
       
  4637             if (IN_param_value != NULL) {
       
  4638               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4639               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4640             }
       
  4641             
       
  4642             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4643             {
       
  4644         
       
  4645                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4646                 
       
  4647                 if (IN_type_symbol == NULL)
       
  4648                   IN_type_symbol = last_type_symbol;
       
  4649                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4650                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4651                 function_type_prefix = return_type_symbol;
       
  4652                 break;
       
  4653                 
       
  4654             }
       
  4655             
       
  4656             
       
  4657             ERROR;
       
  4658         }
       
  4659         
       
  4660     }/*function_dword_to_time*/
       
  4661     break;
       
  4662 
       
  4663 /****
       
  4664  *DWORD_TO_INT
       
  4665  */
       
  4666     case function_dword_to_int :
       
  4667     {
       
  4668         symbol_c *last_type_symbol = NULL;
       
  4669 
       
  4670         {
       
  4671             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4673             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4674             symbol_c *IN_type_symbol = NULL;
       
  4675             
       
  4676             /* Get the value from a foo(<param_value>) style call */
       
  4677             if (IN_param_value == NULL)
       
  4678               IN_param_value = function_call_param_iterator.next_nf();
       
  4679             if (IN_param_value != NULL) {
       
  4680               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4681               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4682             }
       
  4683             
       
  4684             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4685             {
       
  4686         
       
  4687                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4688                 
       
  4689                 if (IN_type_symbol == NULL)
       
  4690                   IN_type_symbol = last_type_symbol;
       
  4691                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4692                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4693                 function_type_prefix = return_type_symbol;
       
  4694                 function_type_suffix = IN_type_symbol;
       
  4695                 break;
       
  4696                 
       
  4697             }
       
  4698             
       
  4699             
       
  4700             ERROR;
       
  4701         }
       
  4702         
       
  4703     }/*function_dword_to_int*/
       
  4704     break;
       
  4705 
       
  4706 /****
       
  4707  *DT_TO_REAL
       
  4708  */
       
  4709     case function_dt_to_real :
       
  4710     {
       
  4711         symbol_c *last_type_symbol = NULL;
       
  4712 
       
  4713         {
       
  4714             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4716             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4717             symbol_c *IN_type_symbol = NULL;
       
  4718             
       
  4719             /* Get the value from a foo(<param_value>) style call */
       
  4720             if (IN_param_value == NULL)
       
  4721               IN_param_value = function_call_param_iterator.next_nf();
       
  4722             if (IN_param_value != NULL) {
       
  4723               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4724               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4725             }
       
  4726             
       
  4727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4728             {
       
  4729         
       
  4730                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  4731                 
       
  4732                 if (IN_type_symbol == NULL)
       
  4733                   IN_type_symbol = last_type_symbol;
       
  4734                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4735                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4736                 function_type_prefix = return_type_symbol;
       
  4737                 break;
       
  4738                 
       
  4739             }
       
  4740             
       
  4741             
       
  4742             ERROR;
       
  4743         }
       
  4744         
       
  4745     }/*function_dt_to_real*/
       
  4746     break;
       
  4747 
       
  4748 /****
       
  4749  *DT_TO_SINT
       
  4750  */
       
  4751     case function_dt_to_sint :
       
  4752     {
       
  4753         symbol_c *last_type_symbol = NULL;
       
  4754 
       
  4755         {
       
  4756             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4758             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4759             symbol_c *IN_type_symbol = NULL;
       
  4760             
       
  4761             /* Get the value from a foo(<param_value>) style call */
       
  4762             if (IN_param_value == NULL)
       
  4763               IN_param_value = function_call_param_iterator.next_nf();
       
  4764             if (IN_param_value != NULL) {
       
  4765               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4766               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4767             }
       
  4768             
       
  4769             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4770             {
       
  4771         
       
  4772                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4773                 
       
  4774                 if (IN_type_symbol == NULL)
       
  4775                   IN_type_symbol = last_type_symbol;
       
  4776                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4777                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4778                 function_type_prefix = return_type_symbol;
       
  4779                 break;
       
  4780                 
       
  4781             }
       
  4782             
       
  4783             
       
  4784             ERROR;
       
  4785         }
       
  4786         
       
  4787     }/*function_dt_to_sint*/
       
  4788     break;
       
  4789 
       
  4790 /****
       
  4791  *DT_TO_LINT
       
  4792  */
       
  4793     case function_dt_to_lint :
       
  4794     {
       
  4795         symbol_c *last_type_symbol = NULL;
       
  4796 
       
  4797         {
       
  4798             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4799             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4800             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4801             symbol_c *IN_type_symbol = NULL;
       
  4802             
       
  4803             /* Get the value from a foo(<param_value>) style call */
       
  4804             if (IN_param_value == NULL)
       
  4805               IN_param_value = function_call_param_iterator.next_nf();
       
  4806             if (IN_param_value != NULL) {
       
  4807               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4808               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4809             }
       
  4810             
       
  4811             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4812             {
       
  4813         
       
  4814                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4815                 
       
  4816                 if (IN_type_symbol == NULL)
       
  4817                   IN_type_symbol = last_type_symbol;
       
  4818                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4819                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4820                 function_type_prefix = return_type_symbol;
       
  4821                 break;
       
  4822                 
       
  4823             }
       
  4824             
       
  4825             
       
  4826             ERROR;
       
  4827         }
       
  4828         
       
  4829     }/*function_dt_to_lint*/
       
  4830     break;
       
  4831 
       
  4832 /****
       
  4833  *DT_TO_DINT
       
  4834  */
       
  4835     case function_dt_to_dint :
       
  4836     {
       
  4837         symbol_c *last_type_symbol = NULL;
       
  4838 
       
  4839         {
       
  4840             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4841             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4842             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4843             symbol_c *IN_type_symbol = NULL;
       
  4844             
       
  4845             /* Get the value from a foo(<param_value>) style call */
       
  4846             if (IN_param_value == NULL)
       
  4847               IN_param_value = function_call_param_iterator.next_nf();
       
  4848             if (IN_param_value != NULL) {
       
  4849               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4850               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4851             }
       
  4852             
       
  4853             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4854             {
       
  4855         
       
  4856                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4857                 
       
  4858                 if (IN_type_symbol == NULL)
       
  4859                   IN_type_symbol = last_type_symbol;
       
  4860                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4861                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4862                 function_type_prefix = return_type_symbol;
       
  4863                 break;
       
  4864                 
       
  4865             }
       
  4866             
       
  4867             
       
  4868             ERROR;
       
  4869         }
       
  4870         
       
  4871     }/*function_dt_to_dint*/
       
  4872     break;
       
  4873 
       
  4874 /****
       
  4875  *DT_TO_DWORD
       
  4876  */
       
  4877     case function_dt_to_dword :
       
  4878     {
       
  4879         symbol_c *last_type_symbol = NULL;
       
  4880 
       
  4881         {
       
  4882             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4884             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4885             symbol_c *IN_type_symbol = NULL;
       
  4886             
       
  4887             /* Get the value from a foo(<param_value>) style call */
       
  4888             if (IN_param_value == NULL)
       
  4889               IN_param_value = function_call_param_iterator.next_nf();
       
  4890             if (IN_param_value != NULL) {
       
  4891               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4892               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4893             }
       
  4894             
       
  4895             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4896             {
       
  4897         
       
  4898                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4899                 
       
  4900                 if (IN_type_symbol == NULL)
       
  4901                   IN_type_symbol = last_type_symbol;
       
  4902                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4903                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4904                 function_type_prefix = return_type_symbol;
       
  4905                 break;
       
  4906                 
       
  4907             }
       
  4908             
       
  4909             
       
  4910             ERROR;
       
  4911         }
       
  4912         
       
  4913     }/*function_dt_to_dword*/
       
  4914     break;
       
  4915 
       
  4916 /****
       
  4917  *DT_TO_UDINT
       
  4918  */
       
  4919     case function_dt_to_udint :
       
  4920     {
       
  4921         symbol_c *last_type_symbol = NULL;
       
  4922 
       
  4923         {
       
  4924             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4925             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4926             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4927             symbol_c *IN_type_symbol = NULL;
       
  4928             
       
  4929             /* Get the value from a foo(<param_value>) style call */
       
  4930             if (IN_param_value == NULL)
       
  4931               IN_param_value = function_call_param_iterator.next_nf();
       
  4932             if (IN_param_value != NULL) {
       
  4933               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4934               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4935             }
       
  4936             
       
  4937             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4938             {
       
  4939         
       
  4940                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4941                 
       
  4942                 if (IN_type_symbol == NULL)
       
  4943                   IN_type_symbol = last_type_symbol;
       
  4944                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4945                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4946                 function_type_prefix = return_type_symbol;
       
  4947                 break;
       
  4948                 
       
  4949             }
       
  4950             
       
  4951             
       
  4952             ERROR;
       
  4953         }
       
  4954         
       
  4955     }/*function_dt_to_udint*/
       
  4956     break;
       
  4957 
       
  4958 /****
       
  4959  *DT_TO_WORD
       
  4960  */
       
  4961     case function_dt_to_word :
       
  4962     {
       
  4963         symbol_c *last_type_symbol = NULL;
       
  4964 
       
  4965         {
       
  4966             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4967             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4968             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4969             symbol_c *IN_type_symbol = NULL;
       
  4970             
       
  4971             /* Get the value from a foo(<param_value>) style call */
       
  4972             if (IN_param_value == NULL)
       
  4973               IN_param_value = function_call_param_iterator.next_nf();
       
  4974             if (IN_param_value != NULL) {
       
  4975               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4976               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4977             }
       
  4978             
       
  4979             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4980             {
       
  4981         
       
  4982                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4983                 
       
  4984                 if (IN_type_symbol == NULL)
       
  4985                   IN_type_symbol = last_type_symbol;
       
  4986                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4987                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4988                 function_type_prefix = return_type_symbol;
       
  4989                 break;
       
  4990                 
       
  4991             }
       
  4992             
       
  4993             
       
  4994             ERROR;
       
  4995         }
       
  4996         
       
  4997     }/*function_dt_to_word*/
       
  4998     break;
       
  4999 
       
  5000 /****
       
  5001  *DT_TO_STRING
       
  5002  */
       
  5003     case function_dt_to_string :
       
  5004     {
       
  5005         symbol_c *last_type_symbol = NULL;
       
  5006 
       
  5007         {
       
  5008             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5009             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5010             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5011             symbol_c *IN_type_symbol = NULL;
       
  5012             
       
  5013             /* Get the value from a foo(<param_value>) style call */
       
  5014             if (IN_param_value == NULL)
       
  5015               IN_param_value = function_call_param_iterator.next_nf();
       
  5016             if (IN_param_value != NULL) {
       
  5017               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5018               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5019             }
       
  5020             
       
  5021             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5022             {
       
  5023         
       
  5024                 function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
       
  5025                 
       
  5026                 if (IN_type_symbol == NULL)
       
  5027                   IN_type_symbol = last_type_symbol;
       
  5028                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5029                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5030                 function_type_prefix = return_type_symbol;
       
  5031                 break;
       
  5032                 
       
  5033             }
       
  5034             
       
  5035             
       
  5036             ERROR;
       
  5037         }
       
  5038         
       
  5039     }/*function_dt_to_string*/
       
  5040     break;
       
  5041 
       
  5042 /****
       
  5043  *DT_TO_LWORD
       
  5044  */
       
  5045     case function_dt_to_lword :
       
  5046     {
       
  5047         symbol_c *last_type_symbol = NULL;
       
  5048 
       
  5049         {
       
  5050             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5052             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5053             symbol_c *IN_type_symbol = NULL;
       
  5054             
       
  5055             /* Get the value from a foo(<param_value>) style call */
       
  5056             if (IN_param_value == NULL)
       
  5057               IN_param_value = function_call_param_iterator.next_nf();
       
  5058             if (IN_param_value != NULL) {
       
  5059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5061             }
       
  5062             
       
  5063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5064             {
       
  5065         
       
  5066                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5067                 
       
  5068                 if (IN_type_symbol == NULL)
       
  5069                   IN_type_symbol = last_type_symbol;
       
  5070                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5071                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5072                 function_type_prefix = return_type_symbol;
       
  5073                 break;
       
  5074                 
       
  5075             }
       
  5076             
       
  5077             
       
  5078             ERROR;
       
  5079         }
       
  5080         
       
  5081     }/*function_dt_to_lword*/
       
  5082     break;
       
  5083 
       
  5084 /****
       
  5085  *DT_TO_UINT
       
  5086  */
       
  5087     case function_dt_to_uint :
       
  5088     {
       
  5089         symbol_c *last_type_symbol = NULL;
       
  5090 
       
  5091         {
       
  5092             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5094             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5095             symbol_c *IN_type_symbol = NULL;
       
  5096             
       
  5097             /* Get the value from a foo(<param_value>) style call */
       
  5098             if (IN_param_value == NULL)
       
  5099               IN_param_value = function_call_param_iterator.next_nf();
       
  5100             if (IN_param_value != NULL) {
       
  5101               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5102               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5103             }
       
  5104             
       
  5105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5106             {
       
  5107         
       
  5108                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5109                 
       
  5110                 if (IN_type_symbol == NULL)
       
  5111                   IN_type_symbol = last_type_symbol;
       
  5112                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5113                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5114                 function_type_prefix = return_type_symbol;
       
  5115                 break;
       
  5116                 
       
  5117             }
       
  5118             
       
  5119             
       
  5120             ERROR;
       
  5121         }
       
  5122         
       
  5123     }/*function_dt_to_uint*/
       
  5124     break;
       
  5125 
       
  5126 /****
       
  5127  *DT_TO_LREAL
       
  5128  */
       
  5129     case function_dt_to_lreal :
       
  5130     {
       
  5131         symbol_c *last_type_symbol = NULL;
       
  5132 
       
  5133         {
       
  5134             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5135             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5136             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5137             symbol_c *IN_type_symbol = NULL;
       
  5138             
       
  5139             /* Get the value from a foo(<param_value>) style call */
       
  5140             if (IN_param_value == NULL)
       
  5141               IN_param_value = function_call_param_iterator.next_nf();
       
  5142             if (IN_param_value != NULL) {
       
  5143               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5144               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5145             }
       
  5146             
       
  5147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5148             {
       
  5149         
       
  5150                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5151                 
       
  5152                 if (IN_type_symbol == NULL)
       
  5153                   IN_type_symbol = last_type_symbol;
       
  5154                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5155                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5156                 function_type_prefix = return_type_symbol;
       
  5157                 break;
       
  5158                 
       
  5159             }
       
  5160             
       
  5161             
       
  5162             ERROR;
       
  5163         }
       
  5164         
       
  5165     }/*function_dt_to_lreal*/
       
  5166     break;
       
  5167 
       
  5168 /****
       
  5169  *DT_TO_BYTE
       
  5170  */
       
  5171     case function_dt_to_byte :
       
  5172     {
       
  5173         symbol_c *last_type_symbol = NULL;
       
  5174 
       
  5175         {
       
  5176             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5177             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5178             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5179             symbol_c *IN_type_symbol = NULL;
       
  5180             
       
  5181             /* Get the value from a foo(<param_value>) style call */
       
  5182             if (IN_param_value == NULL)
       
  5183               IN_param_value = function_call_param_iterator.next_nf();
       
  5184             if (IN_param_value != NULL) {
       
  5185               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5186               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5187             }
       
  5188             
       
  5189             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5190             {
       
  5191         
       
  5192                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5193                 
       
  5194                 if (IN_type_symbol == NULL)
       
  5195                   IN_type_symbol = last_type_symbol;
       
  5196                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5197                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5198                 function_type_prefix = return_type_symbol;
       
  5199                 break;
       
  5200                 
       
  5201             }
       
  5202             
       
  5203             
       
  5204             ERROR;
       
  5205         }
       
  5206         
       
  5207     }/*function_dt_to_byte*/
       
  5208     break;
       
  5209 
       
  5210 /****
       
  5211  *DT_TO_USINT
       
  5212  */
       
  5213     case function_dt_to_usint :
       
  5214     {
       
  5215         symbol_c *last_type_symbol = NULL;
       
  5216 
       
  5217         {
       
  5218             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5219             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5220             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5221             symbol_c *IN_type_symbol = NULL;
       
  5222             
       
  5223             /* Get the value from a foo(<param_value>) style call */
       
  5224             if (IN_param_value == NULL)
       
  5225               IN_param_value = function_call_param_iterator.next_nf();
       
  5226             if (IN_param_value != NULL) {
       
  5227               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5228               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5229             }
       
  5230             
       
  5231             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5232             {
       
  5233         
       
  5234                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5235                 
       
  5236                 if (IN_type_symbol == NULL)
       
  5237                   IN_type_symbol = last_type_symbol;
       
  5238                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5240                 function_type_prefix = return_type_symbol;
       
  5241                 break;
       
  5242                 
       
  5243             }
       
  5244             
       
  5245             
       
  5246             ERROR;
       
  5247         }
       
  5248         
       
  5249     }/*function_dt_to_usint*/
       
  5250     break;
       
  5251 
       
  5252 /****
       
  5253  *DT_TO_ULINT
       
  5254  */
       
  5255     case function_dt_to_ulint :
       
  5256     {
       
  5257         symbol_c *last_type_symbol = NULL;
       
  5258 
       
  5259         {
       
  5260             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5261             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5262             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5263             symbol_c *IN_type_symbol = NULL;
       
  5264             
       
  5265             /* Get the value from a foo(<param_value>) style call */
       
  5266             if (IN_param_value == NULL)
       
  5267               IN_param_value = function_call_param_iterator.next_nf();
       
  5268             if (IN_param_value != NULL) {
       
  5269               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5270               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5271             }
       
  5272             
       
  5273             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5274             {
       
  5275         
       
  5276                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5277                 
       
  5278                 if (IN_type_symbol == NULL)
       
  5279                   IN_type_symbol = last_type_symbol;
       
  5280                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5281                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5282                 function_type_prefix = return_type_symbol;
       
  5283                 break;
       
  5284                 
       
  5285             }
       
  5286             
       
  5287             
       
  5288             ERROR;
       
  5289         }
       
  5290         
       
  5291     }/*function_dt_to_ulint*/
       
  5292     break;
       
  5293 
       
  5294 /****
       
  5295  *DT_TO_INT
       
  5296  */
       
  5297     case function_dt_to_int :
       
  5298     {
       
  5299         symbol_c *last_type_symbol = NULL;
       
  5300 
       
  5301         {
       
  5302             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5304             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5305             symbol_c *IN_type_symbol = NULL;
       
  5306             
       
  5307             /* Get the value from a foo(<param_value>) style call */
       
  5308             if (IN_param_value == NULL)
       
  5309               IN_param_value = function_call_param_iterator.next_nf();
       
  5310             if (IN_param_value != NULL) {
       
  5311               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5312               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5313             }
       
  5314             
       
  5315             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5316             {
       
  5317         
       
  5318                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5319                 
       
  5320                 if (IN_type_symbol == NULL)
       
  5321                   IN_type_symbol = last_type_symbol;
       
  5322                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5323                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5324                 function_type_prefix = return_type_symbol;
       
  5325                 break;
       
  5326                 
       
  5327             }
       
  5328             
       
  5329             
       
  5330             ERROR;
       
  5331         }
       
  5332         
       
  5333     }/*function_dt_to_int*/
       
  5334     break;
       
  5335 
       
  5336 /****
       
  5337  *TOD_TO_REAL
       
  5338  */
       
  5339     case function_tod_to_real :
       
  5340     {
       
  5341         symbol_c *last_type_symbol = NULL;
       
  5342 
       
  5343         {
       
  5344             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5345             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5346             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5347             symbol_c *IN_type_symbol = NULL;
       
  5348             
       
  5349             /* Get the value from a foo(<param_value>) style call */
       
  5350             if (IN_param_value == NULL)
       
  5351               IN_param_value = function_call_param_iterator.next_nf();
       
  5352             if (IN_param_value != NULL) {
       
  5353               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5354               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5355             }
       
  5356             
       
  5357             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5358             {
       
  5359         
       
  5360                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5361                 
       
  5362                 if (IN_type_symbol == NULL)
       
  5363                   IN_type_symbol = last_type_symbol;
       
  5364                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5365                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5366                 function_type_prefix = return_type_symbol;
       
  5367                 break;
       
  5368                 
       
  5369             }
       
  5370             
       
  5371             
       
  5372             ERROR;
       
  5373         }
       
  5374         
       
  5375     }/*function_tod_to_real*/
       
  5376     break;
       
  5377 
       
  5378 /****
       
  5379  *TOD_TO_SINT
       
  5380  */
       
  5381     case function_tod_to_sint :
       
  5382     {
       
  5383         symbol_c *last_type_symbol = NULL;
       
  5384 
       
  5385         {
       
  5386             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5388             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5389             symbol_c *IN_type_symbol = NULL;
       
  5390             
       
  5391             /* Get the value from a foo(<param_value>) style call */
       
  5392             if (IN_param_value == NULL)
       
  5393               IN_param_value = function_call_param_iterator.next_nf();
       
  5394             if (IN_param_value != NULL) {
       
  5395               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5396               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5397             }
       
  5398             
       
  5399             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5400             {
       
  5401         
       
  5402                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5403                 
       
  5404                 if (IN_type_symbol == NULL)
       
  5405                   IN_type_symbol = last_type_symbol;
       
  5406                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5407                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5408                 function_type_prefix = return_type_symbol;
       
  5409                 break;
       
  5410                 
       
  5411             }
       
  5412             
       
  5413             
       
  5414             ERROR;
       
  5415         }
       
  5416         
       
  5417     }/*function_tod_to_sint*/
       
  5418     break;
       
  5419 
       
  5420 /****
       
  5421  *TOD_TO_LINT
       
  5422  */
       
  5423     case function_tod_to_lint :
       
  5424     {
       
  5425         symbol_c *last_type_symbol = NULL;
       
  5426 
       
  5427         {
       
  5428             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5429             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5430             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5431             symbol_c *IN_type_symbol = NULL;
       
  5432             
       
  5433             /* Get the value from a foo(<param_value>) style call */
       
  5434             if (IN_param_value == NULL)
       
  5435               IN_param_value = function_call_param_iterator.next_nf();
       
  5436             if (IN_param_value != NULL) {
       
  5437               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5438               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5439             }
       
  5440             
       
  5441             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5442             {
       
  5443         
       
  5444                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5445                 
       
  5446                 if (IN_type_symbol == NULL)
       
  5447                   IN_type_symbol = last_type_symbol;
       
  5448                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5449                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5450                 function_type_prefix = return_type_symbol;
       
  5451                 break;
       
  5452                 
       
  5453             }
       
  5454             
       
  5455             
       
  5456             ERROR;
       
  5457         }
       
  5458         
       
  5459     }/*function_tod_to_lint*/
       
  5460     break;
       
  5461 
       
  5462 /****
       
  5463  *TOD_TO_DINT
       
  5464  */
       
  5465     case function_tod_to_dint :
       
  5466     {
       
  5467         symbol_c *last_type_symbol = NULL;
       
  5468 
       
  5469         {
       
  5470             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5472             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5473             symbol_c *IN_type_symbol = NULL;
       
  5474             
       
  5475             /* Get the value from a foo(<param_value>) style call */
       
  5476             if (IN_param_value == NULL)
       
  5477               IN_param_value = function_call_param_iterator.next_nf();
       
  5478             if (IN_param_value != NULL) {
       
  5479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5481             }
       
  5482             
       
  5483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5484             {
       
  5485         
       
  5486                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5487                 
       
  5488                 if (IN_type_symbol == NULL)
       
  5489                   IN_type_symbol = last_type_symbol;
       
  5490                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5491                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5492                 function_type_prefix = return_type_symbol;
       
  5493                 break;
       
  5494                 
       
  5495             }
       
  5496             
       
  5497             
       
  5498             ERROR;
       
  5499         }
       
  5500         
       
  5501     }/*function_tod_to_dint*/
       
  5502     break;
       
  5503 
       
  5504 /****
       
  5505  *TOD_TO_DWORD
       
  5506  */
       
  5507     case function_tod_to_dword :
       
  5508     {
       
  5509         symbol_c *last_type_symbol = NULL;
       
  5510 
       
  5511         {
       
  5512             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5513             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5514             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5515             symbol_c *IN_type_symbol = NULL;
       
  5516             
       
  5517             /* Get the value from a foo(<param_value>) style call */
       
  5518             if (IN_param_value == NULL)
       
  5519               IN_param_value = function_call_param_iterator.next_nf();
       
  5520             if (IN_param_value != NULL) {
       
  5521               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5522               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5523             }
       
  5524             
       
  5525             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5526             {
       
  5527         
       
  5528                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5529                 
       
  5530                 if (IN_type_symbol == NULL)
       
  5531                   IN_type_symbol = last_type_symbol;
       
  5532                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5533                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5534                 function_type_prefix = return_type_symbol;
       
  5535                 break;
       
  5536                 
       
  5537             }
       
  5538             
       
  5539             
       
  5540             ERROR;
       
  5541         }
       
  5542         
       
  5543     }/*function_tod_to_dword*/
       
  5544     break;
       
  5545 
       
  5546 /****
       
  5547  *TOD_TO_UDINT
       
  5548  */
       
  5549     case function_tod_to_udint :
       
  5550     {
       
  5551         symbol_c *last_type_symbol = NULL;
       
  5552 
       
  5553         {
       
  5554             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5556             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5557             symbol_c *IN_type_symbol = NULL;
       
  5558             
       
  5559             /* Get the value from a foo(<param_value>) style call */
       
  5560             if (IN_param_value == NULL)
       
  5561               IN_param_value = function_call_param_iterator.next_nf();
       
  5562             if (IN_param_value != NULL) {
       
  5563               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5564               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5565             }
       
  5566             
       
  5567             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5568             {
       
  5569         
       
  5570                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5571                 
       
  5572                 if (IN_type_symbol == NULL)
       
  5573                   IN_type_symbol = last_type_symbol;
       
  5574                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5575                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5576                 function_type_prefix = return_type_symbol;
       
  5577                 break;
       
  5578                 
       
  5579             }
       
  5580             
       
  5581             
       
  5582             ERROR;
       
  5583         }
       
  5584         
       
  5585     }/*function_tod_to_udint*/
       
  5586     break;
       
  5587 
       
  5588 /****
       
  5589  *TOD_TO_WORD
       
  5590  */
       
  5591     case function_tod_to_word :
       
  5592     {
       
  5593         symbol_c *last_type_symbol = NULL;
       
  5594 
       
  5595         {
       
  5596             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5597             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5598             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5599             symbol_c *IN_type_symbol = NULL;
       
  5600             
       
  5601             /* Get the value from a foo(<param_value>) style call */
       
  5602             if (IN_param_value == NULL)
       
  5603               IN_param_value = function_call_param_iterator.next_nf();
       
  5604             if (IN_param_value != NULL) {
       
  5605               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5606               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5607             }
       
  5608             
       
  5609             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5610             {
       
  5611         
       
  5612                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5613                 
       
  5614                 if (IN_type_symbol == NULL)
       
  5615                   IN_type_symbol = last_type_symbol;
       
  5616                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5617                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5618                 function_type_prefix = return_type_symbol;
       
  5619                 break;
       
  5620                 
       
  5621             }
       
  5622             
       
  5623             
       
  5624             ERROR;
       
  5625         }
       
  5626         
       
  5627     }/*function_tod_to_word*/
       
  5628     break;
       
  5629 
       
  5630 /****
       
  5631  *TOD_TO_STRING
       
  5632  */
       
  5633     case function_tod_to_string :
       
  5634     {
       
  5635         symbol_c *last_type_symbol = NULL;
       
  5636 
       
  5637         {
       
  5638             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5639             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5640             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5641             symbol_c *IN_type_symbol = NULL;
       
  5642             
       
  5643             /* Get the value from a foo(<param_value>) style call */
       
  5644             if (IN_param_value == NULL)
       
  5645               IN_param_value = function_call_param_iterator.next_nf();
       
  5646             if (IN_param_value != NULL) {
       
  5647               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5648               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5649             }
       
  5650             
       
  5651             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5652             {
       
  5653         
       
  5654                 function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
       
  5655                 
       
  5656                 if (IN_type_symbol == NULL)
       
  5657                   IN_type_symbol = last_type_symbol;
       
  5658                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5659                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5660                 function_type_prefix = return_type_symbol;
       
  5661                 break;
       
  5662                 
       
  5663             }
       
  5664             
       
  5665             
       
  5666             ERROR;
       
  5667         }
       
  5668         
       
  5669     }/*function_tod_to_string*/
       
  5670     break;
       
  5671 
       
  5672 /****
       
  5673  *TOD_TO_LWORD
       
  5674  */
       
  5675     case function_tod_to_lword :
       
  5676     {
       
  5677         symbol_c *last_type_symbol = NULL;
       
  5678 
       
  5679         {
       
  5680             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5681             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5682             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5683             symbol_c *IN_type_symbol = NULL;
       
  5684             
       
  5685             /* Get the value from a foo(<param_value>) style call */
       
  5686             if (IN_param_value == NULL)
       
  5687               IN_param_value = function_call_param_iterator.next_nf();
       
  5688             if (IN_param_value != NULL) {
       
  5689               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5690               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5691             }
       
  5692             
       
  5693             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5694             {
       
  5695         
       
  5696                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5697                 
       
  5698                 if (IN_type_symbol == NULL)
       
  5699                   IN_type_symbol = last_type_symbol;
       
  5700                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5701                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5702                 function_type_prefix = return_type_symbol;
       
  5703                 break;
       
  5704                 
       
  5705             }
       
  5706             
       
  5707             
       
  5708             ERROR;
       
  5709         }
       
  5710         
       
  5711     }/*function_tod_to_lword*/
       
  5712     break;
       
  5713 
       
  5714 /****
       
  5715  *TOD_TO_UINT
       
  5716  */
       
  5717     case function_tod_to_uint :
       
  5718     {
       
  5719         symbol_c *last_type_symbol = NULL;
       
  5720 
       
  5721         {
       
  5722             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5723             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5724             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5725             symbol_c *IN_type_symbol = NULL;
       
  5726             
       
  5727             /* Get the value from a foo(<param_value>) style call */
       
  5728             if (IN_param_value == NULL)
       
  5729               IN_param_value = function_call_param_iterator.next_nf();
       
  5730             if (IN_param_value != NULL) {
       
  5731               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5732               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5733             }
       
  5734             
       
  5735             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5736             {
       
  5737         
       
  5738                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5739                 
       
  5740                 if (IN_type_symbol == NULL)
       
  5741                   IN_type_symbol = last_type_symbol;
       
  5742                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5743                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5744                 function_type_prefix = return_type_symbol;
       
  5745                 break;
       
  5746                 
       
  5747             }
       
  5748             
       
  5749             
       
  5750             ERROR;
       
  5751         }
       
  5752         
       
  5753     }/*function_tod_to_uint*/
       
  5754     break;
       
  5755 
       
  5756 /****
       
  5757  *TOD_TO_LREAL
       
  5758  */
       
  5759     case function_tod_to_lreal :
       
  5760     {
       
  5761         symbol_c *last_type_symbol = NULL;
       
  5762 
       
  5763         {
       
  5764             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5765             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5766             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5767             symbol_c *IN_type_symbol = NULL;
       
  5768             
       
  5769             /* Get the value from a foo(<param_value>) style call */
       
  5770             if (IN_param_value == NULL)
       
  5771               IN_param_value = function_call_param_iterator.next_nf();
       
  5772             if (IN_param_value != NULL) {
       
  5773               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5774               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5775             }
       
  5776             
       
  5777             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5778             {
       
  5779         
       
  5780                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5781                 
       
  5782                 if (IN_type_symbol == NULL)
       
  5783                   IN_type_symbol = last_type_symbol;
       
  5784                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5785                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5786                 function_type_prefix = return_type_symbol;
       
  5787                 break;
       
  5788                 
       
  5789             }
       
  5790             
       
  5791             
       
  5792             ERROR;
       
  5793         }
       
  5794         
       
  5795     }/*function_tod_to_lreal*/
       
  5796     break;
       
  5797 
       
  5798 /****
       
  5799  *TOD_TO_BYTE
       
  5800  */
       
  5801     case function_tod_to_byte :
       
  5802     {
       
  5803         symbol_c *last_type_symbol = NULL;
       
  5804 
       
  5805         {
       
  5806             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5808             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5809             symbol_c *IN_type_symbol = NULL;
       
  5810             
       
  5811             /* Get the value from a foo(<param_value>) style call */
       
  5812             if (IN_param_value == NULL)
       
  5813               IN_param_value = function_call_param_iterator.next_nf();
       
  5814             if (IN_param_value != NULL) {
       
  5815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5817             }
       
  5818             
       
  5819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5820             {
       
  5821         
       
  5822                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5823                 
       
  5824                 if (IN_type_symbol == NULL)
       
  5825                   IN_type_symbol = last_type_symbol;
       
  5826                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5827                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5828                 function_type_prefix = return_type_symbol;
       
  5829                 break;
       
  5830                 
       
  5831             }
       
  5832             
       
  5833             
       
  5834             ERROR;
       
  5835         }
       
  5836         
       
  5837     }/*function_tod_to_byte*/
       
  5838     break;
       
  5839 
       
  5840 /****
       
  5841  *TOD_TO_USINT
       
  5842  */
       
  5843     case function_tod_to_usint :
       
  5844     {
       
  5845         symbol_c *last_type_symbol = NULL;
       
  5846 
       
  5847         {
       
  5848             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5849             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5850             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5851             symbol_c *IN_type_symbol = NULL;
       
  5852             
       
  5853             /* Get the value from a foo(<param_value>) style call */
       
  5854             if (IN_param_value == NULL)
       
  5855               IN_param_value = function_call_param_iterator.next_nf();
       
  5856             if (IN_param_value != NULL) {
       
  5857               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5858               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5859             }
       
  5860             
       
  5861             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5862             {
       
  5863         
       
  5864                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5865                 
       
  5866                 if (IN_type_symbol == NULL)
       
  5867                   IN_type_symbol = last_type_symbol;
       
  5868                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5869                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5870                 function_type_prefix = return_type_symbol;
       
  5871                 break;
       
  5872                 
       
  5873             }
       
  5874             
       
  5875             
       
  5876             ERROR;
       
  5877         }
       
  5878         
       
  5879     }/*function_tod_to_usint*/
       
  5880     break;
       
  5881 
       
  5882 /****
       
  5883  *TOD_TO_ULINT
       
  5884  */
       
  5885     case function_tod_to_ulint :
       
  5886     {
       
  5887         symbol_c *last_type_symbol = NULL;
       
  5888 
       
  5889         {
       
  5890             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5891             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5892             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5893             symbol_c *IN_type_symbol = NULL;
       
  5894             
       
  5895             /* Get the value from a foo(<param_value>) style call */
       
  5896             if (IN_param_value == NULL)
       
  5897               IN_param_value = function_call_param_iterator.next_nf();
       
  5898             if (IN_param_value != NULL) {
       
  5899               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5900               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5901             }
       
  5902             
       
  5903             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5904             {
       
  5905         
       
  5906                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5907                 
       
  5908                 if (IN_type_symbol == NULL)
       
  5909                   IN_type_symbol = last_type_symbol;
       
  5910                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5911                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5912                 function_type_prefix = return_type_symbol;
       
  5913                 break;
       
  5914                 
       
  5915             }
       
  5916             
       
  5917             
       
  5918             ERROR;
       
  5919         }
       
  5920         
       
  5921     }/*function_tod_to_ulint*/
       
  5922     break;
       
  5923 
       
  5924 /****
       
  5925  *TOD_TO_INT
       
  5926  */
       
  5927     case function_tod_to_int :
       
  5928     {
       
  5929         symbol_c *last_type_symbol = NULL;
       
  5930 
       
  5931         {
       
  5932             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5934             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5935             symbol_c *IN_type_symbol = NULL;
       
  5936             
       
  5937             /* Get the value from a foo(<param_value>) style call */
       
  5938             if (IN_param_value == NULL)
       
  5939               IN_param_value = function_call_param_iterator.next_nf();
       
  5940             if (IN_param_value != NULL) {
       
  5941               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5942               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5943             }
       
  5944             
       
  5945             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5946             {
       
  5947         
       
  5948                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5949                 
       
  5950                 if (IN_type_symbol == NULL)
       
  5951                   IN_type_symbol = last_type_symbol;
       
  5952                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5953                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5954                 function_type_prefix = return_type_symbol;
       
  5955                 break;
       
  5956                 
       
  5957             }
       
  5958             
       
  5959             
       
  5960             ERROR;
       
  5961         }
       
  5962         
       
  5963     }/*function_tod_to_int*/
       
  5964     break;
       
  5965 
       
  5966 /****
       
  5967  *UDINT_TO_REAL
       
  5968  */
       
  5969     case function_udint_to_real :
       
  5970     {
       
  5971         symbol_c *last_type_symbol = NULL;
       
  5972 
       
  5973         {
       
  5974             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5975             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5976             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5977             symbol_c *IN_type_symbol = NULL;
       
  5978             
       
  5979             /* Get the value from a foo(<param_value>) style call */
       
  5980             if (IN_param_value == NULL)
       
  5981               IN_param_value = function_call_param_iterator.next_nf();
       
  5982             if (IN_param_value != NULL) {
       
  5983               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5984               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5985             }
       
  5986             
       
  5987             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5988             {
       
  5989         
       
  5990                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  5991                 
       
  5992                 if (IN_type_symbol == NULL)
       
  5993                   IN_type_symbol = last_type_symbol;
       
  5994                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5995                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5996                 function_type_prefix = return_type_symbol;
       
  5997                 function_type_suffix = IN_type_symbol;
       
  5998                 break;
       
  5999                 
       
  6000             }
       
  6001             
       
  6002             
       
  6003             ERROR;
       
  6004         }
       
  6005         
       
  6006     }/*function_udint_to_real*/
       
  6007     break;
       
  6008 
       
  6009 /****
       
  6010  *UDINT_TO_SINT
       
  6011  */
       
  6012     case function_udint_to_sint :
       
  6013     {
       
  6014         symbol_c *last_type_symbol = NULL;
       
  6015 
       
  6016         {
       
  6017             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6018             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6019             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6020             symbol_c *IN_type_symbol = NULL;
       
  6021             
       
  6022             /* Get the value from a foo(<param_value>) style call */
       
  6023             if (IN_param_value == NULL)
       
  6024               IN_param_value = function_call_param_iterator.next_nf();
       
  6025             if (IN_param_value != NULL) {
       
  6026               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6027               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6028             }
       
  6029             
       
  6030             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6031             {
       
  6032         
       
  6033                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6034                 
       
  6035                 if (IN_type_symbol == NULL)
       
  6036                   IN_type_symbol = last_type_symbol;
       
  6037                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6038                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6039                 function_type_prefix = return_type_symbol;
       
  6040                 function_type_suffix = IN_type_symbol;
       
  6041                 break;
       
  6042                 
       
  6043             }
       
  6044             
       
  6045             
       
  6046             ERROR;
       
  6047         }
       
  6048         
       
  6049     }/*function_udint_to_sint*/
       
  6050     break;
       
  6051 
       
  6052 /****
       
  6053  *UDINT_TO_LINT
       
  6054  */
       
  6055     case function_udint_to_lint :
       
  6056     {
       
  6057         symbol_c *last_type_symbol = NULL;
       
  6058 
       
  6059         {
       
  6060             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6062             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6063             symbol_c *IN_type_symbol = NULL;
       
  6064             
       
  6065             /* Get the value from a foo(<param_value>) style call */
       
  6066             if (IN_param_value == NULL)
       
  6067               IN_param_value = function_call_param_iterator.next_nf();
       
  6068             if (IN_param_value != NULL) {
       
  6069               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6070               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6071             }
       
  6072             
       
  6073             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6074             {
       
  6075         
       
  6076                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6077                 
       
  6078                 if (IN_type_symbol == NULL)
       
  6079                   IN_type_symbol = last_type_symbol;
       
  6080                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6081                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6082                 function_type_prefix = return_type_symbol;
       
  6083                 function_type_suffix = IN_type_symbol;
       
  6084                 break;
       
  6085                 
       
  6086             }
       
  6087             
       
  6088             
       
  6089             ERROR;
       
  6090         }
       
  6091         
       
  6092     }/*function_udint_to_lint*/
       
  6093     break;
       
  6094 
       
  6095 /****
       
  6096  *UDINT_TO_DINT
       
  6097  */
       
  6098     case function_udint_to_dint :
       
  6099     {
       
  6100         symbol_c *last_type_symbol = NULL;
       
  6101 
       
  6102         {
       
  6103             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6105             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6106             symbol_c *IN_type_symbol = NULL;
       
  6107             
       
  6108             /* Get the value from a foo(<param_value>) style call */
       
  6109             if (IN_param_value == NULL)
       
  6110               IN_param_value = function_call_param_iterator.next_nf();
       
  6111             if (IN_param_value != NULL) {
       
  6112               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6113               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6114             }
       
  6115             
       
  6116             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6117             {
       
  6118         
       
  6119                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6120                 
       
  6121                 if (IN_type_symbol == NULL)
       
  6122                   IN_type_symbol = last_type_symbol;
       
  6123                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6125                 function_type_prefix = return_type_symbol;
       
  6126                 function_type_suffix = IN_type_symbol;
       
  6127                 break;
       
  6128                 
       
  6129             }
       
  6130             
       
  6131             
       
  6132             ERROR;
       
  6133         }
       
  6134         
       
  6135     }/*function_udint_to_dint*/
       
  6136     break;
       
  6137 
       
  6138 /****
       
  6139  *UDINT_TO_DATE
       
  6140  */
       
  6141     case function_udint_to_date :
       
  6142     {
       
  6143         symbol_c *last_type_symbol = NULL;
       
  6144 
       
  6145         {
       
  6146             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6147             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6148             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6149             symbol_c *IN_type_symbol = NULL;
       
  6150             
       
  6151             /* Get the value from a foo(<param_value>) style call */
       
  6152             if (IN_param_value == NULL)
       
  6153               IN_param_value = function_call_param_iterator.next_nf();
       
  6154             if (IN_param_value != NULL) {
       
  6155               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6156               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6157             }
       
  6158             
       
  6159             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6160             {
       
  6161         
       
  6162                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6163                 
       
  6164                 if (IN_type_symbol == NULL)
       
  6165                   IN_type_symbol = last_type_symbol;
       
  6166                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6167                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6168                 function_type_prefix = return_type_symbol;
       
  6169                 break;
       
  6170                 
       
  6171             }
       
  6172             
       
  6173             
       
  6174             ERROR;
       
  6175         }
       
  6176         
       
  6177     }/*function_udint_to_date*/
       
  6178     break;
       
  6179 
       
  6180 /****
       
  6181  *UDINT_TO_DWORD
       
  6182  */
       
  6183     case function_udint_to_dword :
       
  6184     {
       
  6185         symbol_c *last_type_symbol = NULL;
       
  6186 
       
  6187         {
       
  6188             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6189             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6190             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6191             symbol_c *IN_type_symbol = NULL;
       
  6192             
       
  6193             /* Get the value from a foo(<param_value>) style call */
       
  6194             if (IN_param_value == NULL)
       
  6195               IN_param_value = function_call_param_iterator.next_nf();
       
  6196             if (IN_param_value != NULL) {
       
  6197               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6198               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6199             }
       
  6200             
       
  6201             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6202             {
       
  6203         
       
  6204                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6205                 
       
  6206                 if (IN_type_symbol == NULL)
       
  6207                   IN_type_symbol = last_type_symbol;
       
  6208                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6209                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6210                 function_type_prefix = return_type_symbol;
       
  6211                 function_type_suffix = IN_type_symbol;
       
  6212                 break;
       
  6213                 
       
  6214             }
       
  6215             
       
  6216             
       
  6217             ERROR;
       
  6218         }
       
  6219         
       
  6220     }/*function_udint_to_dword*/
       
  6221     break;
       
  6222 
       
  6223 /****
       
  6224  *UDINT_TO_DT
       
  6225  */
       
  6226     case function_udint_to_dt :
       
  6227     {
       
  6228         symbol_c *last_type_symbol = NULL;
       
  6229 
       
  6230         {
       
  6231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6234             symbol_c *IN_type_symbol = NULL;
       
  6235             
       
  6236             /* Get the value from a foo(<param_value>) style call */
       
  6237             if (IN_param_value == NULL)
       
  6238               IN_param_value = function_call_param_iterator.next_nf();
       
  6239             if (IN_param_value != NULL) {
       
  6240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6241               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6242             }
       
  6243             
       
  6244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6245             {
       
  6246         
       
  6247                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6248                 
       
  6249                 if (IN_type_symbol == NULL)
       
  6250                   IN_type_symbol = last_type_symbol;
       
  6251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6252                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6253                 function_type_prefix = return_type_symbol;
       
  6254                 break;
       
  6255                 
       
  6256             }
       
  6257             
       
  6258             
       
  6259             ERROR;
       
  6260         }
       
  6261         
       
  6262     }/*function_udint_to_dt*/
       
  6263     break;
       
  6264 
       
  6265 /****
       
  6266  *UDINT_TO_TOD
       
  6267  */
       
  6268     case function_udint_to_tod :
       
  6269     {
       
  6270         symbol_c *last_type_symbol = NULL;
       
  6271 
       
  6272         {
       
  6273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6275             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6276             symbol_c *IN_type_symbol = NULL;
       
  6277             
       
  6278             /* Get the value from a foo(<param_value>) style call */
       
  6279             if (IN_param_value == NULL)
       
  6280               IN_param_value = function_call_param_iterator.next_nf();
       
  6281             if (IN_param_value != NULL) {
       
  6282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6283               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6284             }
       
  6285             
       
  6286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6287             {
       
  6288         
       
  6289                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6290                 
       
  6291                 if (IN_type_symbol == NULL)
       
  6292                   IN_type_symbol = last_type_symbol;
       
  6293                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6294                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6295                 function_type_prefix = return_type_symbol;
       
  6296                 break;
       
  6297                 
       
  6298             }
       
  6299             
       
  6300             
       
  6301             ERROR;
       
  6302         }
       
  6303         
       
  6304     }/*function_udint_to_tod*/
       
  6305     break;
       
  6306 
       
  6307 /****
       
  6308  *UDINT_TO_WORD
       
  6309  */
       
  6310     case function_udint_to_word :
       
  6311     {
       
  6312         symbol_c *last_type_symbol = NULL;
       
  6313 
       
  6314         {
       
  6315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6318             symbol_c *IN_type_symbol = NULL;
       
  6319             
       
  6320             /* Get the value from a foo(<param_value>) style call */
       
  6321             if (IN_param_value == NULL)
       
  6322               IN_param_value = function_call_param_iterator.next_nf();
       
  6323             if (IN_param_value != NULL) {
       
  6324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6326             }
       
  6327             
       
  6328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6329             {
       
  6330         
       
  6331                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6332                 
       
  6333                 if (IN_type_symbol == NULL)
       
  6334                   IN_type_symbol = last_type_symbol;
       
  6335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6336                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6337                 function_type_prefix = return_type_symbol;
       
  6338                 function_type_suffix = IN_type_symbol;
       
  6339                 break;
       
  6340                 
       
  6341             }
       
  6342             
       
  6343             
       
  6344             ERROR;
       
  6345         }
       
  6346         
       
  6347     }/*function_udint_to_word*/
       
  6348     break;
       
  6349 
       
  6350 /****
       
  6351  *UDINT_TO_STRING
       
  6352  */
       
  6353     case function_udint_to_string :
       
  6354     {
       
  6355         symbol_c *last_type_symbol = NULL;
       
  6356 
       
  6357         {
       
  6358             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6360             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6361             symbol_c *IN_type_symbol = NULL;
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next_nf();
       
  6366             if (IN_param_value != NULL) {
       
  6367               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6368               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6369             }
       
  6370             
       
  6371             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6372             {
       
  6373         
       
  6374                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  6375                 
       
  6376                 if (IN_type_symbol == NULL)
       
  6377                   IN_type_symbol = last_type_symbol;
       
  6378                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6379                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6380                 function_type_prefix = return_type_symbol;
       
  6381                 break;
       
  6382                 
       
  6383             }
       
  6384             
       
  6385             
       
  6386             ERROR;
       
  6387         }
       
  6388         
       
  6389     }/*function_udint_to_string*/
       
  6390     break;
       
  6391 
       
  6392 /****
       
  6393  *UDINT_TO_LWORD
       
  6394  */
       
  6395     case function_udint_to_lword :
       
  6396     {
       
  6397         symbol_c *last_type_symbol = NULL;
       
  6398 
       
  6399         {
       
  6400             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6401             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6402             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6403             symbol_c *IN_type_symbol = NULL;
       
  6404             
       
  6405             /* Get the value from a foo(<param_value>) style call */
       
  6406             if (IN_param_value == NULL)
       
  6407               IN_param_value = function_call_param_iterator.next_nf();
       
  6408             if (IN_param_value != NULL) {
       
  6409               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6410               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6411             }
       
  6412             
       
  6413             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6414             {
       
  6415         
       
  6416                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6417                 
       
  6418                 if (IN_type_symbol == NULL)
       
  6419                   IN_type_symbol = last_type_symbol;
       
  6420                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6421                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6422                 function_type_prefix = return_type_symbol;
       
  6423                 function_type_suffix = IN_type_symbol;
       
  6424                 break;
       
  6425                 
       
  6426             }
       
  6427             
       
  6428             
       
  6429             ERROR;
       
  6430         }
       
  6431         
       
  6432     }/*function_udint_to_lword*/
       
  6433     break;
       
  6434 
       
  6435 /****
       
  6436  *UDINT_TO_UINT
       
  6437  */
       
  6438     case function_udint_to_uint :
       
  6439     {
       
  6440         symbol_c *last_type_symbol = NULL;
       
  6441 
       
  6442         {
       
  6443             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6445             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6446             symbol_c *IN_type_symbol = NULL;
       
  6447             
       
  6448             /* Get the value from a foo(<param_value>) style call */
       
  6449             if (IN_param_value == NULL)
       
  6450               IN_param_value = function_call_param_iterator.next_nf();
       
  6451             if (IN_param_value != NULL) {
       
  6452               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6453               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6454             }
       
  6455             
       
  6456             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6457             {
       
  6458         
       
  6459                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6460                 
       
  6461                 if (IN_type_symbol == NULL)
       
  6462                   IN_type_symbol = last_type_symbol;
       
  6463                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6464                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6465                 function_type_prefix = return_type_symbol;
       
  6466                 function_type_suffix = IN_type_symbol;
       
  6467                 break;
       
  6468                 
       
  6469             }
       
  6470             
       
  6471             
       
  6472             ERROR;
       
  6473         }
       
  6474         
       
  6475     }/*function_udint_to_uint*/
       
  6476     break;
       
  6477 
       
  6478 /****
       
  6479  *UDINT_TO_LREAL
       
  6480  */
       
  6481     case function_udint_to_lreal :
       
  6482     {
       
  6483         symbol_c *last_type_symbol = NULL;
       
  6484 
       
  6485         {
       
  6486             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6488             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6489             symbol_c *IN_type_symbol = NULL;
       
  6490             
       
  6491             /* Get the value from a foo(<param_value>) style call */
       
  6492             if (IN_param_value == NULL)
       
  6493               IN_param_value = function_call_param_iterator.next_nf();
       
  6494             if (IN_param_value != NULL) {
       
  6495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6497             }
       
  6498             
       
  6499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6500             {
       
  6501         
       
  6502                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6503                 
       
  6504                 if (IN_type_symbol == NULL)
       
  6505                   IN_type_symbol = last_type_symbol;
       
  6506                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6507                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6508                 function_type_prefix = return_type_symbol;
       
  6509                 function_type_suffix = IN_type_symbol;
       
  6510                 break;
       
  6511                 
       
  6512             }
       
  6513             
       
  6514             
       
  6515             ERROR;
       
  6516         }
       
  6517         
       
  6518     }/*function_udint_to_lreal*/
       
  6519     break;
       
  6520 
       
  6521 /****
       
  6522  *UDINT_TO_BYTE
       
  6523  */
       
  6524     case function_udint_to_byte :
       
  6525     {
       
  6526         symbol_c *last_type_symbol = NULL;
       
  6527 
       
  6528         {
       
  6529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6532             symbol_c *IN_type_symbol = NULL;
       
  6533             
       
  6534             /* Get the value from a foo(<param_value>) style call */
       
  6535             if (IN_param_value == NULL)
       
  6536               IN_param_value = function_call_param_iterator.next_nf();
       
  6537             if (IN_param_value != NULL) {
       
  6538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6540             }
       
  6541             
       
  6542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6543             {
       
  6544         
       
  6545                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6546                 
       
  6547                 if (IN_type_symbol == NULL)
       
  6548                   IN_type_symbol = last_type_symbol;
       
  6549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6550                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6551                 function_type_prefix = return_type_symbol;
       
  6552                 function_type_suffix = IN_type_symbol;
       
  6553                 break;
       
  6554                 
       
  6555             }
       
  6556             
       
  6557             
       
  6558             ERROR;
       
  6559         }
       
  6560         
       
  6561     }/*function_udint_to_byte*/
       
  6562     break;
       
  6563 
       
  6564 /****
       
  6565  *UDINT_TO_USINT
       
  6566  */
       
  6567     case function_udint_to_usint :
       
  6568     {
       
  6569         symbol_c *last_type_symbol = NULL;
       
  6570 
       
  6571         {
       
  6572             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6574             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6575             symbol_c *IN_type_symbol = NULL;
       
  6576             
       
  6577             /* Get the value from a foo(<param_value>) style call */
       
  6578             if (IN_param_value == NULL)
       
  6579               IN_param_value = function_call_param_iterator.next_nf();
       
  6580             if (IN_param_value != NULL) {
       
  6581               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6582               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6583             }
       
  6584             
       
  6585             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6586             {
       
  6587         
       
  6588                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6589                 
       
  6590                 if (IN_type_symbol == NULL)
       
  6591                   IN_type_symbol = last_type_symbol;
       
  6592                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6593                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6594                 function_type_prefix = return_type_symbol;
       
  6595                 function_type_suffix = IN_type_symbol;
       
  6596                 break;
       
  6597                 
       
  6598             }
       
  6599             
       
  6600             
       
  6601             ERROR;
       
  6602         }
       
  6603         
       
  6604     }/*function_udint_to_usint*/
       
  6605     break;
       
  6606 
       
  6607 /****
       
  6608  *UDINT_TO_ULINT
       
  6609  */
       
  6610     case function_udint_to_ulint :
       
  6611     {
       
  6612         symbol_c *last_type_symbol = NULL;
       
  6613 
       
  6614         {
       
  6615             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6617             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6618             symbol_c *IN_type_symbol = NULL;
       
  6619             
       
  6620             /* Get the value from a foo(<param_value>) style call */
       
  6621             if (IN_param_value == NULL)
       
  6622               IN_param_value = function_call_param_iterator.next_nf();
       
  6623             if (IN_param_value != NULL) {
       
  6624               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6625               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6626             }
       
  6627             
       
  6628             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6629             {
       
  6630         
       
  6631                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6632                 
       
  6633                 if (IN_type_symbol == NULL)
       
  6634                   IN_type_symbol = last_type_symbol;
       
  6635                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6636                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6637                 function_type_prefix = return_type_symbol;
       
  6638                 function_type_suffix = IN_type_symbol;
       
  6639                 break;
       
  6640                 
       
  6641             }
       
  6642             
       
  6643             
       
  6644             ERROR;
       
  6645         }
       
  6646         
       
  6647     }/*function_udint_to_ulint*/
       
  6648     break;
       
  6649 
       
  6650 /****
       
  6651  *UDINT_TO_BOOL
       
  6652  */
       
  6653     case function_udint_to_bool :
       
  6654     {
       
  6655         symbol_c *last_type_symbol = NULL;
       
  6656 
       
  6657         {
       
  6658             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6660             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6661             symbol_c *IN_type_symbol = NULL;
       
  6662             
       
  6663             /* Get the value from a foo(<param_value>) style call */
       
  6664             if (IN_param_value == NULL)
       
  6665               IN_param_value = function_call_param_iterator.next_nf();
       
  6666             if (IN_param_value != NULL) {
       
  6667               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6668               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6669             }
       
  6670             
       
  6671             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6672             {
       
  6673         
       
  6674                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6675                 
       
  6676                 if (IN_type_symbol == NULL)
       
  6677                   IN_type_symbol = last_type_symbol;
       
  6678                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6679                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6680                 function_type_prefix = return_type_symbol;
       
  6681                 function_type_suffix = IN_type_symbol;
       
  6682                 break;
       
  6683                 
       
  6684             }
       
  6685             
       
  6686             
       
  6687             ERROR;
       
  6688         }
       
  6689         
       
  6690     }/*function_udint_to_bool*/
       
  6691     break;
       
  6692 
       
  6693 /****
       
  6694  *UDINT_TO_TIME
       
  6695  */
       
  6696     case function_udint_to_time :
       
  6697     {
       
  6698         symbol_c *last_type_symbol = NULL;
       
  6699 
       
  6700         {
       
  6701             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6702             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6703             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6704             symbol_c *IN_type_symbol = NULL;
       
  6705             
       
  6706             /* Get the value from a foo(<param_value>) style call */
       
  6707             if (IN_param_value == NULL)
       
  6708               IN_param_value = function_call_param_iterator.next_nf();
       
  6709             if (IN_param_value != NULL) {
       
  6710               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6711               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6712             }
       
  6713             
       
  6714             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6715             {
       
  6716         
       
  6717                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6718                 
       
  6719                 if (IN_type_symbol == NULL)
       
  6720                   IN_type_symbol = last_type_symbol;
       
  6721                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6722                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6723                 function_type_prefix = return_type_symbol;
       
  6724                 break;
       
  6725                 
       
  6726             }
       
  6727             
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_udint_to_time*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *UDINT_TO_INT
       
  6737  */
       
  6738     case function_udint_to_int :
       
  6739     {
       
  6740         symbol_c *last_type_symbol = NULL;
       
  6741 
       
  6742         {
       
  6743             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6745             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6746             symbol_c *IN_type_symbol = NULL;
       
  6747             
       
  6748             /* Get the value from a foo(<param_value>) style call */
       
  6749             if (IN_param_value == NULL)
       
  6750               IN_param_value = function_call_param_iterator.next_nf();
       
  6751             if (IN_param_value != NULL) {
       
  6752               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6753               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6754             }
       
  6755             
       
  6756             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6757             {
       
  6758         
       
  6759                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6760                 
       
  6761                 if (IN_type_symbol == NULL)
       
  6762                   IN_type_symbol = last_type_symbol;
       
  6763                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6764                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6765                 function_type_prefix = return_type_symbol;
       
  6766                 function_type_suffix = IN_type_symbol;
       
  6767                 break;
       
  6768                 
       
  6769             }
       
  6770             
       
  6771             
       
  6772             ERROR;
       
  6773         }
       
  6774         
       
  6775     }/*function_udint_to_int*/
       
  6776     break;
       
  6777 
       
  6778 /****
       
  6779  *WORD_TO_REAL
       
  6780  */
       
  6781     case function_word_to_real :
       
  6782     {
       
  6783         symbol_c *last_type_symbol = NULL;
       
  6784 
       
  6785         {
       
  6786             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6787             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6788             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6789             symbol_c *IN_type_symbol = NULL;
       
  6790             
       
  6791             /* Get the value from a foo(<param_value>) style call */
       
  6792             if (IN_param_value == NULL)
       
  6793               IN_param_value = function_call_param_iterator.next_nf();
       
  6794             if (IN_param_value != NULL) {
       
  6795               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6796               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6797             }
       
  6798             
       
  6799             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6800             {
       
  6801         
       
  6802                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6803                 
       
  6804                 if (IN_type_symbol == NULL)
       
  6805                   IN_type_symbol = last_type_symbol;
       
  6806                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6807                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6808                 function_type_prefix = return_type_symbol;
       
  6809                 function_type_suffix = IN_type_symbol;
       
  6810                 break;
       
  6811                 
       
  6812             }
       
  6813             
       
  6814             
       
  6815             ERROR;
       
  6816         }
       
  6817         
       
  6818     }/*function_word_to_real*/
       
  6819     break;
       
  6820 
       
  6821 /****
       
  6822  *WORD_TO_SINT
       
  6823  */
       
  6824     case function_word_to_sint :
       
  6825     {
       
  6826         symbol_c *last_type_symbol = NULL;
       
  6827 
       
  6828         {
       
  6829             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6830             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6831             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6832             symbol_c *IN_type_symbol = NULL;
       
  6833             
       
  6834             /* Get the value from a foo(<param_value>) style call */
       
  6835             if (IN_param_value == NULL)
       
  6836               IN_param_value = function_call_param_iterator.next_nf();
       
  6837             if (IN_param_value != NULL) {
       
  6838               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6839               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6840             }
       
  6841             
       
  6842             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6843             {
       
  6844         
       
  6845                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6846                 
       
  6847                 if (IN_type_symbol == NULL)
       
  6848                   IN_type_symbol = last_type_symbol;
       
  6849                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6850                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6851                 function_type_prefix = return_type_symbol;
       
  6852                 function_type_suffix = IN_type_symbol;
       
  6853                 break;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             
       
  6858             ERROR;
       
  6859         }
       
  6860         
       
  6861     }/*function_word_to_sint*/
       
  6862     break;
       
  6863 
       
  6864 /****
       
  6865  *WORD_TO_LINT
       
  6866  */
       
  6867     case function_word_to_lint :
       
  6868     {
       
  6869         symbol_c *last_type_symbol = NULL;
       
  6870 
       
  6871         {
       
  6872             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6873             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6874             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6875             symbol_c *IN_type_symbol = NULL;
       
  6876             
       
  6877             /* Get the value from a foo(<param_value>) style call */
       
  6878             if (IN_param_value == NULL)
       
  6879               IN_param_value = function_call_param_iterator.next_nf();
       
  6880             if (IN_param_value != NULL) {
       
  6881               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6882               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6883             }
       
  6884             
       
  6885             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6886             {
       
  6887         
       
  6888                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6889                 
       
  6890                 if (IN_type_symbol == NULL)
       
  6891                   IN_type_symbol = last_type_symbol;
       
  6892                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6893                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6894                 function_type_prefix = return_type_symbol;
       
  6895                 function_type_suffix = IN_type_symbol;
       
  6896                 break;
       
  6897                 
       
  6898             }
       
  6899             
       
  6900             
       
  6901             ERROR;
       
  6902         }
       
  6903         
       
  6904     }/*function_word_to_lint*/
       
  6905     break;
       
  6906 
       
  6907 /****
       
  6908  *WORD_TO_DINT
       
  6909  */
       
  6910     case function_word_to_dint :
       
  6911     {
       
  6912         symbol_c *last_type_symbol = NULL;
       
  6913 
       
  6914         {
       
  6915             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6916             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6917             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6918             symbol_c *IN_type_symbol = NULL;
       
  6919             
       
  6920             /* Get the value from a foo(<param_value>) style call */
       
  6921             if (IN_param_value == NULL)
       
  6922               IN_param_value = function_call_param_iterator.next_nf();
       
  6923             if (IN_param_value != NULL) {
       
  6924               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6925               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6926             }
       
  6927             
       
  6928             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6929             {
       
  6930         
       
  6931                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6932                 
       
  6933                 if (IN_type_symbol == NULL)
       
  6934                   IN_type_symbol = last_type_symbol;
       
  6935                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6936                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6937                 function_type_prefix = return_type_symbol;
       
  6938                 function_type_suffix = IN_type_symbol;
       
  6939                 break;
       
  6940                 
       
  6941             }
       
  6942             
       
  6943             
       
  6944             ERROR;
       
  6945         }
       
  6946         
       
  6947     }/*function_word_to_dint*/
       
  6948     break;
       
  6949 
       
  6950 /****
       
  6951  *WORD_TO_DATE
       
  6952  */
       
  6953     case function_word_to_date :
       
  6954     {
       
  6955         symbol_c *last_type_symbol = NULL;
       
  6956 
       
  6957         {
       
  6958             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6960             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6961             symbol_c *IN_type_symbol = NULL;
       
  6962             
       
  6963             /* Get the value from a foo(<param_value>) style call */
       
  6964             if (IN_param_value == NULL)
       
  6965               IN_param_value = function_call_param_iterator.next_nf();
       
  6966             if (IN_param_value != NULL) {
       
  6967               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6968               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6969             }
       
  6970             
       
  6971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6972             {
       
  6973         
       
  6974                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6975                 
       
  6976                 if (IN_type_symbol == NULL)
       
  6977                   IN_type_symbol = last_type_symbol;
       
  6978                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6979                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6980                 function_type_prefix = return_type_symbol;
       
  6981                 break;
       
  6982                 
       
  6983             }
       
  6984             
       
  6985             
       
  6986             ERROR;
       
  6987         }
       
  6988         
       
  6989     }/*function_word_to_date*/
       
  6990     break;
       
  6991 
       
  6992 /****
       
  6993  *WORD_TO_DWORD
       
  6994  */
       
  6995     case function_word_to_dword :
       
  6996     {
       
  6997         symbol_c *last_type_symbol = NULL;
       
  6998 
       
  6999         {
       
  7000             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7001             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7002             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7003             symbol_c *IN_type_symbol = NULL;
       
  7004             
       
  7005             /* Get the value from a foo(<param_value>) style call */
       
  7006             if (IN_param_value == NULL)
       
  7007               IN_param_value = function_call_param_iterator.next_nf();
       
  7008             if (IN_param_value != NULL) {
       
  7009               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7010               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7011             }
       
  7012             
       
  7013             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7014             {
       
  7015         
       
  7016                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7017                 
       
  7018                 if (IN_type_symbol == NULL)
       
  7019                   IN_type_symbol = last_type_symbol;
       
  7020                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7021                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7022                 function_type_prefix = return_type_symbol;
       
  7023                 function_type_suffix = IN_type_symbol;
       
  7024                 break;
       
  7025                 
       
  7026             }
       
  7027             
       
  7028             
       
  7029             ERROR;
       
  7030         }
       
  7031         
       
  7032     }/*function_word_to_dword*/
       
  7033     break;
       
  7034 
       
  7035 /****
       
  7036  *WORD_TO_DT
       
  7037  */
       
  7038     case function_word_to_dt :
       
  7039     {
       
  7040         symbol_c *last_type_symbol = NULL;
       
  7041 
       
  7042         {
       
  7043             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7044             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7045             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7046             symbol_c *IN_type_symbol = NULL;
       
  7047             
       
  7048             /* Get the value from a foo(<param_value>) style call */
       
  7049             if (IN_param_value == NULL)
       
  7050               IN_param_value = function_call_param_iterator.next_nf();
       
  7051             if (IN_param_value != NULL) {
       
  7052               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7053               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7054             }
       
  7055             
       
  7056             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7057             {
       
  7058         
       
  7059                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7060                 
       
  7061                 if (IN_type_symbol == NULL)
       
  7062                   IN_type_symbol = last_type_symbol;
       
  7063                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7064                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7065                 function_type_prefix = return_type_symbol;
       
  7066                 break;
       
  7067                 
       
  7068             }
       
  7069             
       
  7070             
       
  7071             ERROR;
       
  7072         }
       
  7073         
       
  7074     }/*function_word_to_dt*/
       
  7075     break;
       
  7076 
       
  7077 /****
       
  7078  *WORD_TO_TOD
       
  7079  */
       
  7080     case function_word_to_tod :
       
  7081     {
       
  7082         symbol_c *last_type_symbol = NULL;
       
  7083 
       
  7084         {
       
  7085             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7086             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7087             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7088             symbol_c *IN_type_symbol = NULL;
       
  7089             
       
  7090             /* Get the value from a foo(<param_value>) style call */
       
  7091             if (IN_param_value == NULL)
       
  7092               IN_param_value = function_call_param_iterator.next_nf();
       
  7093             if (IN_param_value != NULL) {
       
  7094               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7095               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7096             }
       
  7097             
       
  7098             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7099             {
       
  7100         
       
  7101                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7102                 
       
  7103                 if (IN_type_symbol == NULL)
       
  7104                   IN_type_symbol = last_type_symbol;
       
  7105                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7106                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7107                 function_type_prefix = return_type_symbol;
       
  7108                 break;
       
  7109                 
       
  7110             }
       
  7111             
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_word_to_tod*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *WORD_TO_UDINT
       
  7121  */
       
  7122     case function_word_to_udint :
       
  7123     {
       
  7124         symbol_c *last_type_symbol = NULL;
       
  7125 
       
  7126         {
       
  7127             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7129             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7130             symbol_c *IN_type_symbol = NULL;
       
  7131             
       
  7132             /* Get the value from a foo(<param_value>) style call */
       
  7133             if (IN_param_value == NULL)
       
  7134               IN_param_value = function_call_param_iterator.next_nf();
       
  7135             if (IN_param_value != NULL) {
       
  7136               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7137               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7138             }
       
  7139             
       
  7140             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7141             {
       
  7142         
       
  7143                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7144                 
       
  7145                 if (IN_type_symbol == NULL)
       
  7146                   IN_type_symbol = last_type_symbol;
       
  7147                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7148                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7149                 function_type_prefix = return_type_symbol;
       
  7150                 function_type_suffix = IN_type_symbol;
       
  7151                 break;
       
  7152                 
       
  7153             }
       
  7154             
       
  7155             
       
  7156             ERROR;
       
  7157         }
       
  7158         
       
  7159     }/*function_word_to_udint*/
       
  7160     break;
       
  7161 
       
  7162 /****
       
  7163  *WORD_TO_STRING
       
  7164  */
       
  7165     case function_word_to_string :
       
  7166     {
       
  7167         symbol_c *last_type_symbol = NULL;
       
  7168 
       
  7169         {
       
  7170             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7172             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7173             symbol_c *IN_type_symbol = NULL;
       
  7174             
       
  7175             /* Get the value from a foo(<param_value>) style call */
       
  7176             if (IN_param_value == NULL)
       
  7177               IN_param_value = function_call_param_iterator.next_nf();
       
  7178             if (IN_param_value != NULL) {
       
  7179               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7180               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7181             }
       
  7182             
       
  7183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7184             {
       
  7185         
       
  7186                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  7187                 
       
  7188                 if (IN_type_symbol == NULL)
       
  7189                   IN_type_symbol = last_type_symbol;
       
  7190                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7191                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7192                 function_type_prefix = return_type_symbol;
       
  7193                 break;
       
  7194                 
       
  7195             }
       
  7196             
       
  7197             
       
  7198             ERROR;
       
  7199         }
       
  7200         
       
  7201     }/*function_word_to_string*/
       
  7202     break;
       
  7203 
       
  7204 /****
       
  7205  *WORD_TO_LWORD
       
  7206  */
       
  7207     case function_word_to_lword :
       
  7208     {
       
  7209         symbol_c *last_type_symbol = NULL;
       
  7210 
       
  7211         {
       
  7212             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7213             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7214             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7215             symbol_c *IN_type_symbol = NULL;
       
  7216             
       
  7217             /* Get the value from a foo(<param_value>) style call */
       
  7218             if (IN_param_value == NULL)
       
  7219               IN_param_value = function_call_param_iterator.next_nf();
       
  7220             if (IN_param_value != NULL) {
       
  7221               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7222               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7223             }
       
  7224             
       
  7225             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7226             {
       
  7227         
       
  7228                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7229                 
       
  7230                 if (IN_type_symbol == NULL)
       
  7231                   IN_type_symbol = last_type_symbol;
       
  7232                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7233                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7234                 function_type_prefix = return_type_symbol;
       
  7235                 function_type_suffix = IN_type_symbol;
       
  7236                 break;
       
  7237                 
       
  7238             }
       
  7239             
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_word_to_lword*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *WORD_TO_UINT
       
  7249  */
       
  7250     case function_word_to_uint :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = NULL;
       
  7253 
       
  7254         {
       
  7255             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7258             symbol_c *IN_type_symbol = NULL;
       
  7259             
       
  7260             /* Get the value from a foo(<param_value>) style call */
       
  7261             if (IN_param_value == NULL)
       
  7262               IN_param_value = function_call_param_iterator.next_nf();
       
  7263             if (IN_param_value != NULL) {
       
  7264               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7265               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7266             }
       
  7267             
       
  7268             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7269             {
       
  7270         
       
  7271                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7272                 
       
  7273                 if (IN_type_symbol == NULL)
       
  7274                   IN_type_symbol = last_type_symbol;
       
  7275                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7276                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7277                 function_type_prefix = return_type_symbol;
       
  7278                 function_type_suffix = IN_type_symbol;
       
  7279                 break;
       
  7280                 
       
  7281             }
       
  7282             
       
  7283             
       
  7284             ERROR;
       
  7285         }
       
  7286         
       
  7287     }/*function_word_to_uint*/
       
  7288     break;
       
  7289 
       
  7290 /****
       
  7291  *WORD_TO_LREAL
       
  7292  */
       
  7293     case function_word_to_lreal :
       
  7294     {
       
  7295         symbol_c *last_type_symbol = NULL;
       
  7296 
       
  7297         {
       
  7298             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7300             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7301             symbol_c *IN_type_symbol = NULL;
       
  7302             
       
  7303             /* Get the value from a foo(<param_value>) style call */
       
  7304             if (IN_param_value == NULL)
       
  7305               IN_param_value = function_call_param_iterator.next_nf();
       
  7306             if (IN_param_value != NULL) {
       
  7307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7309             }
       
  7310             
       
  7311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7312             {
       
  7313         
       
  7314                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7315                 
       
  7316                 if (IN_type_symbol == NULL)
       
  7317                   IN_type_symbol = last_type_symbol;
       
  7318                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7319                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7320                 function_type_prefix = return_type_symbol;
       
  7321                 function_type_suffix = IN_type_symbol;
       
  7322                 break;
       
  7323                 
       
  7324             }
       
  7325             
       
  7326             
       
  7327             ERROR;
       
  7328         }
       
  7329         
       
  7330     }/*function_word_to_lreal*/
       
  7331     break;
       
  7332 
       
  7333 /****
       
  7334  *WORD_TO_BYTE
       
  7335  */
       
  7336     case function_word_to_byte :
       
  7337     {
       
  7338         symbol_c *last_type_symbol = NULL;
       
  7339 
       
  7340         {
       
  7341             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7343             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7344             symbol_c *IN_type_symbol = NULL;
       
  7345             
       
  7346             /* Get the value from a foo(<param_value>) style call */
       
  7347             if (IN_param_value == NULL)
       
  7348               IN_param_value = function_call_param_iterator.next_nf();
       
  7349             if (IN_param_value != NULL) {
       
  7350               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7351               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7352             }
       
  7353             
       
  7354             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7355             {
       
  7356         
       
  7357                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7358                 
       
  7359                 if (IN_type_symbol == NULL)
       
  7360                   IN_type_symbol = last_type_symbol;
       
  7361                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7362                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7363                 function_type_prefix = return_type_symbol;
       
  7364                 function_type_suffix = IN_type_symbol;
       
  7365                 break;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             
       
  7370             ERROR;
       
  7371         }
       
  7372         
       
  7373     }/*function_word_to_byte*/
       
  7374     break;
       
  7375 
       
  7376 /****
       
  7377  *WORD_TO_USINT
       
  7378  */
       
  7379     case function_word_to_usint :
       
  7380     {
       
  7381         symbol_c *last_type_symbol = NULL;
       
  7382 
       
  7383         {
       
  7384             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7386             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7387             symbol_c *IN_type_symbol = NULL;
       
  7388             
       
  7389             /* Get the value from a foo(<param_value>) style call */
       
  7390             if (IN_param_value == NULL)
       
  7391               IN_param_value = function_call_param_iterator.next_nf();
       
  7392             if (IN_param_value != NULL) {
       
  7393               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7394               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7395             }
       
  7396             
       
  7397             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7398             {
       
  7399         
       
  7400                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7401                 
       
  7402                 if (IN_type_symbol == NULL)
       
  7403                   IN_type_symbol = last_type_symbol;
       
  7404                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7405                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7406                 function_type_prefix = return_type_symbol;
       
  7407                 function_type_suffix = IN_type_symbol;
       
  7408                 break;
       
  7409                 
       
  7410             }
       
  7411             
       
  7412             
       
  7413             ERROR;
       
  7414         }
       
  7415         
       
  7416     }/*function_word_to_usint*/
       
  7417     break;
       
  7418 
       
  7419 /****
       
  7420  *WORD_TO_ULINT
       
  7421  */
       
  7422     case function_word_to_ulint :
       
  7423     {
       
  7424         symbol_c *last_type_symbol = NULL;
       
  7425 
       
  7426         {
       
  7427             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7429             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7430             symbol_c *IN_type_symbol = NULL;
       
  7431             
       
  7432             /* Get the value from a foo(<param_value>) style call */
       
  7433             if (IN_param_value == NULL)
       
  7434               IN_param_value = function_call_param_iterator.next_nf();
       
  7435             if (IN_param_value != NULL) {
       
  7436               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7437               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7438             }
       
  7439             
       
  7440             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7441             {
       
  7442         
       
  7443                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7444                 
       
  7445                 if (IN_type_symbol == NULL)
       
  7446                   IN_type_symbol = last_type_symbol;
       
  7447                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7448                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7449                 function_type_prefix = return_type_symbol;
       
  7450                 function_type_suffix = IN_type_symbol;
       
  7451                 break;
       
  7452                 
       
  7453             }
       
  7454             
       
  7455             
       
  7456             ERROR;
       
  7457         }
       
  7458         
       
  7459     }/*function_word_to_ulint*/
       
  7460     break;
       
  7461 
       
  7462 /****
       
  7463  *WORD_TO_BOOL
       
  7464  */
       
  7465     case function_word_to_bool :
       
  7466     {
       
  7467         symbol_c *last_type_symbol = NULL;
       
  7468 
       
  7469         {
       
  7470             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7472             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7473             symbol_c *IN_type_symbol = NULL;
       
  7474             
       
  7475             /* Get the value from a foo(<param_value>) style call */
       
  7476             if (IN_param_value == NULL)
       
  7477               IN_param_value = function_call_param_iterator.next_nf();
       
  7478             if (IN_param_value != NULL) {
       
  7479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7481             }
       
  7482             
       
  7483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7484             {
       
  7485         
       
  7486                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7487                 
       
  7488                 if (IN_type_symbol == NULL)
       
  7489                   IN_type_symbol = last_type_symbol;
       
  7490                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7491                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7492                 function_type_prefix = return_type_symbol;
       
  7493                 function_type_suffix = IN_type_symbol;
       
  7494                 break;
       
  7495                 
       
  7496             }
       
  7497             
       
  7498             
       
  7499             ERROR;
       
  7500         }
       
  7501         
       
  7502     }/*function_word_to_bool*/
       
  7503     break;
       
  7504 
       
  7505 /****
       
  7506  *WORD_TO_TIME
       
  7507  */
       
  7508     case function_word_to_time :
       
  7509     {
       
  7510         symbol_c *last_type_symbol = NULL;
       
  7511 
       
  7512         {
       
  7513             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7515             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7516             symbol_c *IN_type_symbol = NULL;
       
  7517             
       
  7518             /* Get the value from a foo(<param_value>) style call */
       
  7519             if (IN_param_value == NULL)
       
  7520               IN_param_value = function_call_param_iterator.next_nf();
       
  7521             if (IN_param_value != NULL) {
       
  7522               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7523               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7524             }
       
  7525             
       
  7526             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7527             {
       
  7528         
       
  7529                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7530                 
       
  7531                 if (IN_type_symbol == NULL)
       
  7532                   IN_type_symbol = last_type_symbol;
       
  7533                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7534                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7535                 function_type_prefix = return_type_symbol;
       
  7536                 break;
       
  7537                 
       
  7538             }
       
  7539             
       
  7540             
       
  7541             ERROR;
       
  7542         }
       
  7543         
       
  7544     }/*function_word_to_time*/
       
  7545     break;
       
  7546 
       
  7547 /****
       
  7548  *WORD_TO_INT
       
  7549  */
       
  7550     case function_word_to_int :
       
  7551     {
       
  7552         symbol_c *last_type_symbol = NULL;
       
  7553 
       
  7554         {
       
  7555             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7556             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7557             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7558             symbol_c *IN_type_symbol = NULL;
       
  7559             
       
  7560             /* Get the value from a foo(<param_value>) style call */
       
  7561             if (IN_param_value == NULL)
       
  7562               IN_param_value = function_call_param_iterator.next_nf();
       
  7563             if (IN_param_value != NULL) {
       
  7564               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7565               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7566             }
       
  7567             
       
  7568             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7569             {
       
  7570         
       
  7571                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7572                 
       
  7573                 if (IN_type_symbol == NULL)
       
  7574                   IN_type_symbol = last_type_symbol;
       
  7575                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7576                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7577                 function_type_prefix = return_type_symbol;
       
  7578                 function_type_suffix = IN_type_symbol;
       
  7579                 break;
       
  7580                 
       
  7581             }
       
  7582             
       
  7583             
       
  7584             ERROR;
       
  7585         }
       
  7586         
       
  7587     }/*function_word_to_int*/
       
  7588     break;
       
  7589 
       
  7590 /****
       
  7591  *STRING_TO_REAL
       
  7592  */
       
  7593     case function_string_to_real :
       
  7594     {
       
  7595         symbol_c *last_type_symbol = NULL;
       
  7596 
       
  7597         {
       
  7598             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7599             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7600             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7601             symbol_c *IN_type_symbol = NULL;
       
  7602             
       
  7603             /* Get the value from a foo(<param_value>) style call */
       
  7604             if (IN_param_value == NULL)
       
  7605               IN_param_value = function_call_param_iterator.next_nf();
       
  7606             if (IN_param_value != NULL) {
       
  7607               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7608               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7609             }
       
  7610             
       
  7611             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7612             {
       
  7613         
       
  7614                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  7615                 
       
  7616                 if (IN_type_symbol == NULL)
       
  7617                   IN_type_symbol = last_type_symbol;
       
  7618                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7619                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7620                 function_type_prefix = return_type_symbol;
       
  7621                 break;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             
       
  7626             ERROR;
       
  7627         }
       
  7628         
       
  7629     }/*function_string_to_real*/
       
  7630     break;
       
  7631 
       
  7632 /****
       
  7633  *STRING_TO_SINT
       
  7634  */
       
  7635     case function_string_to_sint :
       
  7636     {
       
  7637         symbol_c *last_type_symbol = NULL;
       
  7638 
       
  7639         {
       
  7640             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7641             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7642             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7643             symbol_c *IN_type_symbol = NULL;
       
  7644             
       
  7645             /* Get the value from a foo(<param_value>) style call */
       
  7646             if (IN_param_value == NULL)
       
  7647               IN_param_value = function_call_param_iterator.next_nf();
       
  7648             if (IN_param_value != NULL) {
       
  7649               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7650               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7651             }
       
  7652             
       
  7653             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7654             {
       
  7655         
       
  7656                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7657                 
       
  7658                 if (IN_type_symbol == NULL)
       
  7659                   IN_type_symbol = last_type_symbol;
       
  7660                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7661                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7662                 function_type_prefix = return_type_symbol;
       
  7663                 break;
       
  7664                 
       
  7665             }
       
  7666             
       
  7667             
       
  7668             ERROR;
       
  7669         }
       
  7670         
       
  7671     }/*function_string_to_sint*/
       
  7672     break;
       
  7673 
       
  7674 /****
       
  7675  *STRING_TO_LINT
       
  7676  */
       
  7677     case function_string_to_lint :
       
  7678     {
       
  7679         symbol_c *last_type_symbol = NULL;
       
  7680 
       
  7681         {
       
  7682             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7684             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7685             symbol_c *IN_type_symbol = NULL;
       
  7686             
       
  7687             /* Get the value from a foo(<param_value>) style call */
       
  7688             if (IN_param_value == NULL)
       
  7689               IN_param_value = function_call_param_iterator.next_nf();
       
  7690             if (IN_param_value != NULL) {
       
  7691               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7692               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7693             }
       
  7694             
       
  7695             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7696             {
       
  7697         
       
  7698                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7699                 
       
  7700                 if (IN_type_symbol == NULL)
       
  7701                   IN_type_symbol = last_type_symbol;
       
  7702                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7703                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7704                 function_type_prefix = return_type_symbol;
       
  7705                 break;
       
  7706                 
       
  7707             }
       
  7708             
       
  7709             
       
  7710             ERROR;
       
  7711         }
       
  7712         
       
  7713     }/*function_string_to_lint*/
       
  7714     break;
       
  7715 
       
  7716 /****
       
  7717  *STRING_TO_DINT
       
  7718  */
       
  7719     case function_string_to_dint :
       
  7720     {
       
  7721         symbol_c *last_type_symbol = NULL;
       
  7722 
       
  7723         {
       
  7724             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7725             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7726             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7727             symbol_c *IN_type_symbol = NULL;
       
  7728             
       
  7729             /* Get the value from a foo(<param_value>) style call */
       
  7730             if (IN_param_value == NULL)
       
  7731               IN_param_value = function_call_param_iterator.next_nf();
       
  7732             if (IN_param_value != NULL) {
       
  7733               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7734               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7735             }
       
  7736             
       
  7737             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7738             {
       
  7739         
       
  7740                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7741                 
       
  7742                 if (IN_type_symbol == NULL)
       
  7743                   IN_type_symbol = last_type_symbol;
       
  7744                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7745                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7746                 function_type_prefix = return_type_symbol;
       
  7747                 break;
       
  7748                 
       
  7749             }
       
  7750             
       
  7751             
       
  7752             ERROR;
       
  7753         }
       
  7754         
       
  7755     }/*function_string_to_dint*/
       
  7756     break;
       
  7757 
       
  7758 /****
       
  7759  *STRING_TO_DATE
       
  7760  */
       
  7761     case function_string_to_date :
       
  7762     {
       
  7763         symbol_c *last_type_symbol = NULL;
       
  7764 
       
  7765         {
       
  7766             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7767             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7768             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7769             symbol_c *IN_type_symbol = NULL;
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next_nf();
       
  7774             if (IN_param_value != NULL) {
       
  7775               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7776               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7777             }
       
  7778             
       
  7779             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7780             {
       
  7781         
       
  7782                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7783                 
       
  7784                 if (IN_type_symbol == NULL)
       
  7785                   IN_type_symbol = last_type_symbol;
       
  7786                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7787                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7788                 function_type_prefix = return_type_symbol;
       
  7789                 break;
       
  7790                 
       
  7791             }
       
  7792             
       
  7793             
       
  7794             ERROR;
       
  7795         }
       
  7796         
       
  7797     }/*function_string_to_date*/
       
  7798     break;
       
  7799 
       
  7800 /****
       
  7801  *STRING_TO_DWORD
       
  7802  */
       
  7803     case function_string_to_dword :
       
  7804     {
       
  7805         symbol_c *last_type_symbol = NULL;
       
  7806 
       
  7807         {
       
  7808             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7809             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7810             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7811             symbol_c *IN_type_symbol = NULL;
       
  7812             
       
  7813             /* Get the value from a foo(<param_value>) style call */
       
  7814             if (IN_param_value == NULL)
       
  7815               IN_param_value = function_call_param_iterator.next_nf();
       
  7816             if (IN_param_value != NULL) {
       
  7817               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7818               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7819             }
       
  7820             
       
  7821             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7822             {
       
  7823         
       
  7824                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  7825                 
       
  7826                 if (IN_type_symbol == NULL)
       
  7827                   IN_type_symbol = last_type_symbol;
       
  7828                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7829                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7830                 function_type_prefix = return_type_symbol;
       
  7831                 break;
       
  7832                 
       
  7833             }
       
  7834             
       
  7835             
       
  7836             ERROR;
       
  7837         }
       
  7838         
       
  7839     }/*function_string_to_dword*/
       
  7840     break;
       
  7841 
       
  7842 /****
       
  7843  *STRING_TO_DT
       
  7844  */
       
  7845     case function_string_to_dt :
       
  7846     {
       
  7847         symbol_c *last_type_symbol = NULL;
       
  7848 
       
  7849         {
       
  7850             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7852             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7853             symbol_c *IN_type_symbol = NULL;
       
  7854             
       
  7855             /* Get the value from a foo(<param_value>) style call */
       
  7856             if (IN_param_value == NULL)
       
  7857               IN_param_value = function_call_param_iterator.next_nf();
       
  7858             if (IN_param_value != NULL) {
       
  7859               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7860               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7861             }
       
  7862             
       
  7863             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7864             {
       
  7865         
       
  7866                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7867                 
       
  7868                 if (IN_type_symbol == NULL)
       
  7869                   IN_type_symbol = last_type_symbol;
       
  7870                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7871                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7872                 function_type_prefix = return_type_symbol;
       
  7873                 break;
       
  7874                 
       
  7875             }
       
  7876             
       
  7877             
       
  7878             ERROR;
       
  7879         }
       
  7880         
       
  7881     }/*function_string_to_dt*/
       
  7882     break;
       
  7883 
       
  7884 /****
       
  7885  *STRING_TO_TOD
       
  7886  */
       
  7887     case function_string_to_tod :
       
  7888     {
       
  7889         symbol_c *last_type_symbol = NULL;
       
  7890 
       
  7891         {
       
  7892             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7894             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7895             symbol_c *IN_type_symbol = NULL;
       
  7896             
       
  7897             /* Get the value from a foo(<param_value>) style call */
       
  7898             if (IN_param_value == NULL)
       
  7899               IN_param_value = function_call_param_iterator.next_nf();
       
  7900             if (IN_param_value != NULL) {
       
  7901               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7902               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7903             }
       
  7904             
       
  7905             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7906             {
       
  7907         
       
  7908                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7909                 
       
  7910                 if (IN_type_symbol == NULL)
       
  7911                   IN_type_symbol = last_type_symbol;
       
  7912                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7913                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7914                 function_type_prefix = return_type_symbol;
       
  7915                 break;
       
  7916                 
       
  7917             }
       
  7918             
       
  7919             
       
  7920             ERROR;
       
  7921         }
       
  7922         
       
  7923     }/*function_string_to_tod*/
       
  7924     break;
       
  7925 
       
  7926 /****
       
  7927  *STRING_TO_UDINT
       
  7928  */
       
  7929     case function_string_to_udint :
       
  7930     {
       
  7931         symbol_c *last_type_symbol = NULL;
       
  7932 
       
  7933         {
       
  7934             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7935             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7936             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7937             symbol_c *IN_type_symbol = NULL;
       
  7938             
       
  7939             /* Get the value from a foo(<param_value>) style call */
       
  7940             if (IN_param_value == NULL)
       
  7941               IN_param_value = function_call_param_iterator.next_nf();
       
  7942             if (IN_param_value != NULL) {
       
  7943               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7944               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7945             }
       
  7946             
       
  7947             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7948             {
       
  7949         
       
  7950                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  7951                 
       
  7952                 if (IN_type_symbol == NULL)
       
  7953                   IN_type_symbol = last_type_symbol;
       
  7954                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7955                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7956                 function_type_prefix = return_type_symbol;
       
  7957                 break;
       
  7958                 
       
  7959             }
       
  7960             
       
  7961             
       
  7962             ERROR;
       
  7963         }
       
  7964         
       
  7965     }/*function_string_to_udint*/
       
  7966     break;
       
  7967 
       
  7968 /****
       
  7969  *STRING_TO_WORD
       
  7970  */
       
  7971     case function_string_to_word :
       
  7972     {
       
  7973         symbol_c *last_type_symbol = NULL;
       
  7974 
       
  7975         {
       
  7976             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7977             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7978             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7979             symbol_c *IN_type_symbol = NULL;
       
  7980             
       
  7981             /* Get the value from a foo(<param_value>) style call */
       
  7982             if (IN_param_value == NULL)
       
  7983               IN_param_value = function_call_param_iterator.next_nf();
       
  7984             if (IN_param_value != NULL) {
       
  7985               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7986               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7987             }
       
  7988             
       
  7989             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7990             {
       
  7991         
       
  7992                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  7993                 
       
  7994                 if (IN_type_symbol == NULL)
       
  7995                   IN_type_symbol = last_type_symbol;
       
  7996                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7997                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7998                 function_type_prefix = return_type_symbol;
       
  7999                 break;
       
  8000                 
       
  8001             }
       
  8002             
       
  8003             
       
  8004             ERROR;
       
  8005         }
       
  8006         
       
  8007     }/*function_string_to_word*/
       
  8008     break;
       
  8009 
       
  8010 /****
       
  8011  *STRING_TO_LWORD
       
  8012  */
       
  8013     case function_string_to_lword :
       
  8014     {
       
  8015         symbol_c *last_type_symbol = NULL;
       
  8016 
       
  8017         {
       
  8018             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8020             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8021             symbol_c *IN_type_symbol = NULL;
       
  8022             
       
  8023             /* Get the value from a foo(<param_value>) style call */
       
  8024             if (IN_param_value == NULL)
       
  8025               IN_param_value = function_call_param_iterator.next_nf();
       
  8026             if (IN_param_value != NULL) {
       
  8027               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8028               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8029             }
       
  8030             
       
  8031             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8032             {
       
  8033         
       
  8034                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8035                 
       
  8036                 if (IN_type_symbol == NULL)
       
  8037                   IN_type_symbol = last_type_symbol;
       
  8038                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8039                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8040                 function_type_prefix = return_type_symbol;
       
  8041                 break;
       
  8042                 
       
  8043             }
       
  8044             
       
  8045             
       
  8046             ERROR;
       
  8047         }
       
  8048         
       
  8049     }/*function_string_to_lword*/
       
  8050     break;
       
  8051 
       
  8052 /****
       
  8053  *STRING_TO_UINT
       
  8054  */
       
  8055     case function_string_to_uint :
       
  8056     {
       
  8057         symbol_c *last_type_symbol = NULL;
       
  8058 
       
  8059         {
       
  8060             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8062             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8063             symbol_c *IN_type_symbol = NULL;
       
  8064             
       
  8065             /* Get the value from a foo(<param_value>) style call */
       
  8066             if (IN_param_value == NULL)
       
  8067               IN_param_value = function_call_param_iterator.next_nf();
       
  8068             if (IN_param_value != NULL) {
       
  8069               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8070               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8071             }
       
  8072             
       
  8073             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8074             {
       
  8075         
       
  8076                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8077                 
       
  8078                 if (IN_type_symbol == NULL)
       
  8079                   IN_type_symbol = last_type_symbol;
       
  8080                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8081                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8082                 function_type_prefix = return_type_symbol;
       
  8083                 break;
       
  8084                 
       
  8085             }
       
  8086             
       
  8087             
       
  8088             ERROR;
       
  8089         }
       
  8090         
       
  8091     }/*function_string_to_uint*/
       
  8092     break;
       
  8093 
       
  8094 /****
       
  8095  *STRING_TO_LREAL
       
  8096  */
       
  8097     case function_string_to_lreal :
       
  8098     {
       
  8099         symbol_c *last_type_symbol = NULL;
       
  8100 
       
  8101         {
       
  8102             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8103             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8104             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8105             symbol_c *IN_type_symbol = NULL;
       
  8106             
       
  8107             /* Get the value from a foo(<param_value>) style call */
       
  8108             if (IN_param_value == NULL)
       
  8109               IN_param_value = function_call_param_iterator.next_nf();
       
  8110             if (IN_param_value != NULL) {
       
  8111               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8112               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8113             }
       
  8114             
       
  8115             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8116             {
       
  8117         
       
  8118                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  8119                 
       
  8120                 if (IN_type_symbol == NULL)
       
  8121                   IN_type_symbol = last_type_symbol;
       
  8122                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8123                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8124                 function_type_prefix = return_type_symbol;
       
  8125                 break;
       
  8126                 
       
  8127             }
       
  8128             
       
  8129             
       
  8130             ERROR;
       
  8131         }
       
  8132         
       
  8133     }/*function_string_to_lreal*/
       
  8134     break;
       
  8135 
       
  8136 /****
       
  8137  *STRING_TO_BYTE
       
  8138  */
       
  8139     case function_string_to_byte :
       
  8140     {
       
  8141         symbol_c *last_type_symbol = NULL;
       
  8142 
       
  8143         {
       
  8144             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8145             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8146             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8147             symbol_c *IN_type_symbol = NULL;
       
  8148             
       
  8149             /* Get the value from a foo(<param_value>) style call */
       
  8150             if (IN_param_value == NULL)
       
  8151               IN_param_value = function_call_param_iterator.next_nf();
       
  8152             if (IN_param_value != NULL) {
       
  8153               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8154               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8155             }
       
  8156             
       
  8157             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8158             {
       
  8159         
       
  8160                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8161                 
       
  8162                 if (IN_type_symbol == NULL)
       
  8163                   IN_type_symbol = last_type_symbol;
       
  8164                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8165                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8166                 function_type_prefix = return_type_symbol;
       
  8167                 break;
       
  8168                 
       
  8169             }
       
  8170             
       
  8171             
       
  8172             ERROR;
       
  8173         }
       
  8174         
       
  8175     }/*function_string_to_byte*/
       
  8176     break;
       
  8177 
       
  8178 /****
       
  8179  *STRING_TO_USINT
       
  8180  */
       
  8181     case function_string_to_usint :
       
  8182     {
       
  8183         symbol_c *last_type_symbol = NULL;
       
  8184 
       
  8185         {
       
  8186             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8188             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8189             symbol_c *IN_type_symbol = NULL;
       
  8190             
       
  8191             /* Get the value from a foo(<param_value>) style call */
       
  8192             if (IN_param_value == NULL)
       
  8193               IN_param_value = function_call_param_iterator.next_nf();
       
  8194             if (IN_param_value != NULL) {
       
  8195               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8196               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8197             }
       
  8198             
       
  8199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8200             {
       
  8201         
       
  8202                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8203                 
       
  8204                 if (IN_type_symbol == NULL)
       
  8205                   IN_type_symbol = last_type_symbol;
       
  8206                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8207                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8208                 function_type_prefix = return_type_symbol;
       
  8209                 break;
       
  8210                 
       
  8211             }
       
  8212             
       
  8213             
       
  8214             ERROR;
       
  8215         }
       
  8216         
       
  8217     }/*function_string_to_usint*/
       
  8218     break;
       
  8219 
       
  8220 /****
       
  8221  *STRING_TO_ULINT
       
  8222  */
       
  8223     case function_string_to_ulint :
       
  8224     {
       
  8225         symbol_c *last_type_symbol = NULL;
       
  8226 
       
  8227         {
       
  8228             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8229             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8230             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8231             symbol_c *IN_type_symbol = NULL;
       
  8232             
       
  8233             /* Get the value from a foo(<param_value>) style call */
       
  8234             if (IN_param_value == NULL)
       
  8235               IN_param_value = function_call_param_iterator.next_nf();
       
  8236             if (IN_param_value != NULL) {
       
  8237               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8238               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8239             }
       
  8240             
       
  8241             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8242             {
       
  8243         
       
  8244                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8245                 
       
  8246                 if (IN_type_symbol == NULL)
       
  8247                   IN_type_symbol = last_type_symbol;
       
  8248                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8249                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8250                 function_type_prefix = return_type_symbol;
       
  8251                 break;
       
  8252                 
       
  8253             }
       
  8254             
       
  8255             
       
  8256             ERROR;
       
  8257         }
       
  8258         
       
  8259     }/*function_string_to_ulint*/
       
  8260     break;
       
  8261 
       
  8262 /****
       
  8263  *STRING_TO_BOOL
       
  8264  */
       
  8265     case function_string_to_bool :
       
  8266     {
       
  8267         symbol_c *last_type_symbol = NULL;
       
  8268 
       
  8269         {
       
  8270             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8271             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8272             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8273             symbol_c *IN_type_symbol = NULL;
       
  8274             
       
  8275             /* Get the value from a foo(<param_value>) style call */
       
  8276             if (IN_param_value == NULL)
       
  8277               IN_param_value = function_call_param_iterator.next_nf();
       
  8278             if (IN_param_value != NULL) {
       
  8279               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8280               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8281             }
       
  8282             
       
  8283             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8284             {
       
  8285         
       
  8286                 function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
       
  8287                 
       
  8288                 if (IN_type_symbol == NULL)
       
  8289                   IN_type_symbol = last_type_symbol;
       
  8290                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8291                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8292                 function_type_prefix = return_type_symbol;
       
  8293                 break;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             
       
  8298             ERROR;
       
  8299         }
       
  8300         
       
  8301     }/*function_string_to_bool*/
       
  8302     break;
       
  8303 
       
  8304 /****
       
  8305  *STRING_TO_TIME
       
  8306  */
       
  8307     case function_string_to_time :
       
  8308     {
       
  8309         symbol_c *last_type_symbol = NULL;
       
  8310 
       
  8311         {
       
  8312             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8313             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8314             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8315             symbol_c *IN_type_symbol = NULL;
       
  8316             
       
  8317             /* Get the value from a foo(<param_value>) style call */
       
  8318             if (IN_param_value == NULL)
       
  8319               IN_param_value = function_call_param_iterator.next_nf();
       
  8320             if (IN_param_value != NULL) {
       
  8321               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8322               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8323             }
       
  8324             
       
  8325             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8326             {
       
  8327         
       
  8328                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  8329                 
       
  8330                 if (IN_type_symbol == NULL)
       
  8331                   IN_type_symbol = last_type_symbol;
       
  8332                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8333                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8334                 function_type_prefix = return_type_symbol;
       
  8335                 break;
       
  8336                 
       
  8337             }
       
  8338             
       
  8339             
       
  8340             ERROR;
       
  8341         }
       
  8342         
       
  8343     }/*function_string_to_time*/
       
  8344     break;
       
  8345 
       
  8346 /****
       
  8347  *STRING_TO_INT
       
  8348  */
       
  8349     case function_string_to_int :
       
  8350     {
       
  8351         symbol_c *last_type_symbol = NULL;
       
  8352 
       
  8353         {
       
  8354             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8355             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8356             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8357             symbol_c *IN_type_symbol = NULL;
       
  8358             
       
  8359             /* Get the value from a foo(<param_value>) style call */
       
  8360             if (IN_param_value == NULL)
       
  8361               IN_param_value = function_call_param_iterator.next_nf();
       
  8362             if (IN_param_value != NULL) {
       
  8363               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8364               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8365             }
       
  8366             
       
  8367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8368             {
       
  8369         
       
  8370                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  8371                 
       
  8372                 if (IN_type_symbol == NULL)
       
  8373                   IN_type_symbol = last_type_symbol;
       
  8374                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8375                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8376                 function_type_prefix = return_type_symbol;
       
  8377                 break;
       
  8378                 
       
  8379             }
       
  8380             
       
  8381             
       
  8382             ERROR;
       
  8383         }
       
  8384         
       
  8385     }/*function_string_to_int*/
       
  8386     break;
       
  8387 
       
  8388 /****
       
  8389  *LWORD_TO_REAL
       
  8390  */
       
  8391     case function_lword_to_real :
       
  8392     {
       
  8393         symbol_c *last_type_symbol = NULL;
       
  8394 
       
  8395         {
       
  8396             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8397             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8398             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8399             symbol_c *IN_type_symbol = NULL;
       
  8400             
       
  8401             /* Get the value from a foo(<param_value>) style call */
       
  8402             if (IN_param_value == NULL)
       
  8403               IN_param_value = function_call_param_iterator.next_nf();
       
  8404             if (IN_param_value != NULL) {
       
  8405               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8406               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8407             }
       
  8408             
       
  8409             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8410             {
       
  8411         
       
  8412                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8413                 
       
  8414                 if (IN_type_symbol == NULL)
       
  8415                   IN_type_symbol = last_type_symbol;
       
  8416                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8417                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8418                 function_type_prefix = return_type_symbol;
       
  8419                 function_type_suffix = IN_type_symbol;
       
  8420                 break;
       
  8421                 
       
  8422             }
       
  8423             
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_lword_to_real*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *LWORD_TO_SINT
       
  8433  */
       
  8434     case function_lword_to_sint :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = NULL;
       
  8437 
       
  8438         {
       
  8439             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8442             symbol_c *IN_type_symbol = NULL;
       
  8443             
       
  8444             /* Get the value from a foo(<param_value>) style call */
       
  8445             if (IN_param_value == NULL)
       
  8446               IN_param_value = function_call_param_iterator.next_nf();
       
  8447             if (IN_param_value != NULL) {
       
  8448               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8449               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8450             }
       
  8451             
       
  8452             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8453             {
       
  8454         
       
  8455                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8456                 
       
  8457                 if (IN_type_symbol == NULL)
       
  8458                   IN_type_symbol = last_type_symbol;
       
  8459                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8460                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8461                 function_type_prefix = return_type_symbol;
       
  8462                 function_type_suffix = IN_type_symbol;
       
  8463                 break;
       
  8464                 
       
  8465             }
       
  8466             
       
  8467             
       
  8468             ERROR;
       
  8469         }
       
  8470         
       
  8471     }/*function_lword_to_sint*/
       
  8472     break;
       
  8473 
       
  8474 /****
       
  8475  *LWORD_TO_LINT
       
  8476  */
       
  8477     case function_lword_to_lint :
       
  8478     {
       
  8479         symbol_c *last_type_symbol = NULL;
       
  8480 
       
  8481         {
       
  8482             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8484             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8485             symbol_c *IN_type_symbol = NULL;
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next_nf();
       
  8490             if (IN_param_value != NULL) {
       
  8491               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8492               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8493             }
       
  8494             
       
  8495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8496             {
       
  8497         
       
  8498                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8499                 
       
  8500                 if (IN_type_symbol == NULL)
       
  8501                   IN_type_symbol = last_type_symbol;
       
  8502                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8503                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8504                 function_type_prefix = return_type_symbol;
       
  8505                 function_type_suffix = IN_type_symbol;
       
  8506                 break;
       
  8507                 
       
  8508             }
       
  8509             
       
  8510             
       
  8511             ERROR;
       
  8512         }
       
  8513         
       
  8514     }/*function_lword_to_lint*/
       
  8515     break;
       
  8516 
       
  8517 /****
       
  8518  *LWORD_TO_DINT
       
  8519  */
       
  8520     case function_lword_to_dint :
       
  8521     {
       
  8522         symbol_c *last_type_symbol = NULL;
       
  8523 
       
  8524         {
       
  8525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8526             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8527             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8528             symbol_c *IN_type_symbol = NULL;
       
  8529             
       
  8530             /* Get the value from a foo(<param_value>) style call */
       
  8531             if (IN_param_value == NULL)
       
  8532               IN_param_value = function_call_param_iterator.next_nf();
       
  8533             if (IN_param_value != NULL) {
       
  8534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8535               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8536             }
       
  8537             
       
  8538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8539             {
       
  8540         
       
  8541                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8542                 
       
  8543                 if (IN_type_symbol == NULL)
       
  8544                   IN_type_symbol = last_type_symbol;
       
  8545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8546                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8547                 function_type_prefix = return_type_symbol;
       
  8548                 function_type_suffix = IN_type_symbol;
       
  8549                 break;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             
       
  8554             ERROR;
       
  8555         }
       
  8556         
       
  8557     }/*function_lword_to_dint*/
       
  8558     break;
       
  8559 
       
  8560 /****
       
  8561  *LWORD_TO_DATE
       
  8562  */
       
  8563     case function_lword_to_date :
       
  8564     {
       
  8565         symbol_c *last_type_symbol = NULL;
       
  8566 
       
  8567         {
       
  8568             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8569             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8570             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8571             symbol_c *IN_type_symbol = NULL;
       
  8572             
       
  8573             /* Get the value from a foo(<param_value>) style call */
       
  8574             if (IN_param_value == NULL)
       
  8575               IN_param_value = function_call_param_iterator.next_nf();
       
  8576             if (IN_param_value != NULL) {
       
  8577               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8578               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8579             }
       
  8580             
       
  8581             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8582             {
       
  8583         
       
  8584                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8585                 
       
  8586                 if (IN_type_symbol == NULL)
       
  8587                   IN_type_symbol = last_type_symbol;
       
  8588                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8589                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8590                 function_type_prefix = return_type_symbol;
       
  8591                 break;
       
  8592                 
       
  8593             }
       
  8594             
       
  8595             
       
  8596             ERROR;
       
  8597         }
       
  8598         
       
  8599     }/*function_lword_to_date*/
       
  8600     break;
       
  8601 
       
  8602 /****
       
  8603  *LWORD_TO_DWORD
       
  8604  */
       
  8605     case function_lword_to_dword :
       
  8606     {
       
  8607         symbol_c *last_type_symbol = NULL;
       
  8608 
       
  8609         {
       
  8610             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8611             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8612             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8613             symbol_c *IN_type_symbol = NULL;
       
  8614             
       
  8615             /* Get the value from a foo(<param_value>) style call */
       
  8616             if (IN_param_value == NULL)
       
  8617               IN_param_value = function_call_param_iterator.next_nf();
       
  8618             if (IN_param_value != NULL) {
       
  8619               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8620               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8621             }
       
  8622             
       
  8623             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8624             {
       
  8625         
       
  8626                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8627                 
       
  8628                 if (IN_type_symbol == NULL)
       
  8629                   IN_type_symbol = last_type_symbol;
       
  8630                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8631                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8632                 function_type_prefix = return_type_symbol;
       
  8633                 function_type_suffix = IN_type_symbol;
       
  8634                 break;
       
  8635                 
       
  8636             }
       
  8637             
       
  8638             
       
  8639             ERROR;
       
  8640         }
       
  8641         
       
  8642     }/*function_lword_to_dword*/
       
  8643     break;
       
  8644 
       
  8645 /****
       
  8646  *LWORD_TO_DT
       
  8647  */
       
  8648     case function_lword_to_dt :
       
  8649     {
       
  8650         symbol_c *last_type_symbol = NULL;
       
  8651 
       
  8652         {
       
  8653             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8654             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8655             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8656             symbol_c *IN_type_symbol = NULL;
       
  8657             
       
  8658             /* Get the value from a foo(<param_value>) style call */
       
  8659             if (IN_param_value == NULL)
       
  8660               IN_param_value = function_call_param_iterator.next_nf();
       
  8661             if (IN_param_value != NULL) {
       
  8662               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8663               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8664             }
       
  8665             
       
  8666             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8667             {
       
  8668         
       
  8669                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8670                 
       
  8671                 if (IN_type_symbol == NULL)
       
  8672                   IN_type_symbol = last_type_symbol;
       
  8673                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8674                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8675                 function_type_prefix = return_type_symbol;
       
  8676                 break;
       
  8677                 
       
  8678             }
       
  8679             
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_lword_to_dt*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *LWORD_TO_TOD
       
  8689  */
       
  8690     case function_lword_to_tod :
       
  8691     {
       
  8692         symbol_c *last_type_symbol = NULL;
       
  8693 
       
  8694         {
       
  8695             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8697             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8698             symbol_c *IN_type_symbol = NULL;
       
  8699             
       
  8700             /* Get the value from a foo(<param_value>) style call */
       
  8701             if (IN_param_value == NULL)
       
  8702               IN_param_value = function_call_param_iterator.next_nf();
       
  8703             if (IN_param_value != NULL) {
       
  8704               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8705               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8706             }
       
  8707             
       
  8708             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8709             {
       
  8710         
       
  8711                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8712                 
       
  8713                 if (IN_type_symbol == NULL)
       
  8714                   IN_type_symbol = last_type_symbol;
       
  8715                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8716                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8717                 function_type_prefix = return_type_symbol;
       
  8718                 break;
       
  8719                 
       
  8720             }
       
  8721             
       
  8722             
       
  8723             ERROR;
       
  8724         }
       
  8725         
       
  8726     }/*function_lword_to_tod*/
       
  8727     break;
       
  8728 
       
  8729 /****
       
  8730  *LWORD_TO_UDINT
       
  8731  */
       
  8732     case function_lword_to_udint :
       
  8733     {
       
  8734         symbol_c *last_type_symbol = NULL;
       
  8735 
       
  8736         {
       
  8737             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8738             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8739             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8740             symbol_c *IN_type_symbol = NULL;
       
  8741             
       
  8742             /* Get the value from a foo(<param_value>) style call */
       
  8743             if (IN_param_value == NULL)
       
  8744               IN_param_value = function_call_param_iterator.next_nf();
       
  8745             if (IN_param_value != NULL) {
       
  8746               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8747               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8748             }
       
  8749             
       
  8750             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8751             {
       
  8752         
       
  8753                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8754                 
       
  8755                 if (IN_type_symbol == NULL)
       
  8756                   IN_type_symbol = last_type_symbol;
       
  8757                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8758                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8759                 function_type_prefix = return_type_symbol;
       
  8760                 function_type_suffix = IN_type_symbol;
       
  8761                 break;
       
  8762                 
       
  8763             }
       
  8764             
       
  8765             
       
  8766             ERROR;
       
  8767         }
       
  8768         
       
  8769     }/*function_lword_to_udint*/
       
  8770     break;
       
  8771 
       
  8772 /****
       
  8773  *LWORD_TO_WORD
       
  8774  */
       
  8775     case function_lword_to_word :
       
  8776     {
       
  8777         symbol_c *last_type_symbol = NULL;
       
  8778 
       
  8779         {
       
  8780             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8782             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8783             symbol_c *IN_type_symbol = NULL;
       
  8784             
       
  8785             /* Get the value from a foo(<param_value>) style call */
       
  8786             if (IN_param_value == NULL)
       
  8787               IN_param_value = function_call_param_iterator.next_nf();
       
  8788             if (IN_param_value != NULL) {
       
  8789               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8790               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8791             }
       
  8792             
       
  8793             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8794             {
       
  8795         
       
  8796                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8797                 
       
  8798                 if (IN_type_symbol == NULL)
       
  8799                   IN_type_symbol = last_type_symbol;
       
  8800                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8801                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8802                 function_type_prefix = return_type_symbol;
       
  8803                 function_type_suffix = IN_type_symbol;
       
  8804                 break;
       
  8805                 
       
  8806             }
       
  8807             
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_lword_to_word*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *LWORD_TO_STRING
       
  8817  */
       
  8818     case function_lword_to_string :
       
  8819     {
       
  8820         symbol_c *last_type_symbol = NULL;
       
  8821 
       
  8822         {
       
  8823             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8825             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8826             symbol_c *IN_type_symbol = NULL;
       
  8827             
       
  8828             /* Get the value from a foo(<param_value>) style call */
       
  8829             if (IN_param_value == NULL)
       
  8830               IN_param_value = function_call_param_iterator.next_nf();
       
  8831             if (IN_param_value != NULL) {
       
  8832               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8833               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8834             }
       
  8835             
       
  8836             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8837             {
       
  8838         
       
  8839                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  8840                 
       
  8841                 if (IN_type_symbol == NULL)
       
  8842                   IN_type_symbol = last_type_symbol;
       
  8843                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8844                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8845                 function_type_prefix = return_type_symbol;
       
  8846                 break;
       
  8847                 
       
  8848             }
       
  8849             
       
  8850             
       
  8851             ERROR;
       
  8852         }
       
  8853         
       
  8854     }/*function_lword_to_string*/
       
  8855     break;
       
  8856 
       
  8857 /****
       
  8858  *LWORD_TO_UINT
       
  8859  */
       
  8860     case function_lword_to_uint :
       
  8861     {
       
  8862         symbol_c *last_type_symbol = NULL;
       
  8863 
       
  8864         {
       
  8865             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8866             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8867             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8868             symbol_c *IN_type_symbol = NULL;
       
  8869             
       
  8870             /* Get the value from a foo(<param_value>) style call */
       
  8871             if (IN_param_value == NULL)
       
  8872               IN_param_value = function_call_param_iterator.next_nf();
       
  8873             if (IN_param_value != NULL) {
       
  8874               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8875               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8876             }
       
  8877             
       
  8878             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8879             {
       
  8880         
       
  8881                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8882                 
       
  8883                 if (IN_type_symbol == NULL)
       
  8884                   IN_type_symbol = last_type_symbol;
       
  8885                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8886                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8887                 function_type_prefix = return_type_symbol;
       
  8888                 function_type_suffix = IN_type_symbol;
       
  8889                 break;
       
  8890                 
       
  8891             }
       
  8892             
       
  8893             
       
  8894             ERROR;
       
  8895         }
       
  8896         
       
  8897     }/*function_lword_to_uint*/
       
  8898     break;
       
  8899 
       
  8900 /****
       
  8901  *LWORD_TO_LREAL
       
  8902  */
       
  8903     case function_lword_to_lreal :
       
  8904     {
       
  8905         symbol_c *last_type_symbol = NULL;
       
  8906 
       
  8907         {
       
  8908             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8909             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8910             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8911             symbol_c *IN_type_symbol = NULL;
       
  8912             
       
  8913             /* Get the value from a foo(<param_value>) style call */
       
  8914             if (IN_param_value == NULL)
       
  8915               IN_param_value = function_call_param_iterator.next_nf();
       
  8916             if (IN_param_value != NULL) {
       
  8917               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8918               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8919             }
       
  8920             
       
  8921             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8922             {
       
  8923         
       
  8924                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8925                 
       
  8926                 if (IN_type_symbol == NULL)
       
  8927                   IN_type_symbol = last_type_symbol;
       
  8928                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8929                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8930                 function_type_prefix = return_type_symbol;
       
  8931                 function_type_suffix = IN_type_symbol;
       
  8932                 break;
       
  8933                 
       
  8934             }
       
  8935             
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_lword_to_lreal*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *LWORD_TO_BYTE
       
  8945  */
       
  8946     case function_lword_to_byte :
       
  8947     {
       
  8948         symbol_c *last_type_symbol = NULL;
       
  8949 
       
  8950         {
       
  8951             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8953             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8954             symbol_c *IN_type_symbol = NULL;
       
  8955             
       
  8956             /* Get the value from a foo(<param_value>) style call */
       
  8957             if (IN_param_value == NULL)
       
  8958               IN_param_value = function_call_param_iterator.next_nf();
       
  8959             if (IN_param_value != NULL) {
       
  8960               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8961               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8962             }
       
  8963             
       
  8964             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8965             {
       
  8966         
       
  8967                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8968                 
       
  8969                 if (IN_type_symbol == NULL)
       
  8970                   IN_type_symbol = last_type_symbol;
       
  8971                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8972                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8973                 function_type_prefix = return_type_symbol;
       
  8974                 function_type_suffix = IN_type_symbol;
       
  8975                 break;
       
  8976                 
       
  8977             }
       
  8978             
       
  8979             
       
  8980             ERROR;
       
  8981         }
       
  8982         
       
  8983     }/*function_lword_to_byte*/
       
  8984     break;
       
  8985 
       
  8986 /****
       
  8987  *LWORD_TO_USINT
       
  8988  */
       
  8989     case function_lword_to_usint :
       
  8990     {
       
  8991         symbol_c *last_type_symbol = NULL;
       
  8992 
       
  8993         {
       
  8994             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8995             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8996             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8997             symbol_c *IN_type_symbol = NULL;
       
  8998             
       
  8999             /* Get the value from a foo(<param_value>) style call */
       
  9000             if (IN_param_value == NULL)
       
  9001               IN_param_value = function_call_param_iterator.next_nf();
       
  9002             if (IN_param_value != NULL) {
       
  9003               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9004               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9005             }
       
  9006             
       
  9007             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9008             {
       
  9009         
       
  9010                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9011                 
       
  9012                 if (IN_type_symbol == NULL)
       
  9013                   IN_type_symbol = last_type_symbol;
       
  9014                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9015                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9016                 function_type_prefix = return_type_symbol;
       
  9017                 function_type_suffix = IN_type_symbol;
       
  9018                 break;
       
  9019                 
       
  9020             }
       
  9021             
       
  9022             
       
  9023             ERROR;
       
  9024         }
       
  9025         
       
  9026     }/*function_lword_to_usint*/
       
  9027     break;
       
  9028 
       
  9029 /****
       
  9030  *LWORD_TO_ULINT
       
  9031  */
       
  9032     case function_lword_to_ulint :
       
  9033     {
       
  9034         symbol_c *last_type_symbol = NULL;
       
  9035 
       
  9036         {
       
  9037             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9038             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9039             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9040             symbol_c *IN_type_symbol = NULL;
       
  9041             
       
  9042             /* Get the value from a foo(<param_value>) style call */
       
  9043             if (IN_param_value == NULL)
       
  9044               IN_param_value = function_call_param_iterator.next_nf();
       
  9045             if (IN_param_value != NULL) {
       
  9046               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9047               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9048             }
       
  9049             
       
  9050             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9051             {
       
  9052         
       
  9053                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9054                 
       
  9055                 if (IN_type_symbol == NULL)
       
  9056                   IN_type_symbol = last_type_symbol;
       
  9057                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9058                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9059                 function_type_prefix = return_type_symbol;
       
  9060                 function_type_suffix = IN_type_symbol;
       
  9061                 break;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             
       
  9066             ERROR;
       
  9067         }
       
  9068         
       
  9069     }/*function_lword_to_ulint*/
       
  9070     break;
       
  9071 
       
  9072 /****
       
  9073  *LWORD_TO_BOOL
       
  9074  */
       
  9075     case function_lword_to_bool :
       
  9076     {
       
  9077         symbol_c *last_type_symbol = NULL;
       
  9078 
       
  9079         {
       
  9080             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9081             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9082             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9083             symbol_c *IN_type_symbol = NULL;
       
  9084             
       
  9085             /* Get the value from a foo(<param_value>) style call */
       
  9086             if (IN_param_value == NULL)
       
  9087               IN_param_value = function_call_param_iterator.next_nf();
       
  9088             if (IN_param_value != NULL) {
       
  9089               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9090               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9091             }
       
  9092             
       
  9093             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9094             {
       
  9095         
       
  9096                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9097                 
       
  9098                 if (IN_type_symbol == NULL)
       
  9099                   IN_type_symbol = last_type_symbol;
       
  9100                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9101                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9102                 function_type_prefix = return_type_symbol;
       
  9103                 function_type_suffix = IN_type_symbol;
       
  9104                 break;
       
  9105                 
       
  9106             }
       
  9107             
       
  9108             
       
  9109             ERROR;
       
  9110         }
       
  9111         
       
  9112     }/*function_lword_to_bool*/
       
  9113     break;
       
  9114 
       
  9115 /****
       
  9116  *LWORD_TO_TIME
       
  9117  */
       
  9118     case function_lword_to_time :
       
  9119     {
       
  9120         symbol_c *last_type_symbol = NULL;
       
  9121 
       
  9122         {
       
  9123             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9124             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9125             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9126             symbol_c *IN_type_symbol = NULL;
       
  9127             
       
  9128             /* Get the value from a foo(<param_value>) style call */
       
  9129             if (IN_param_value == NULL)
       
  9130               IN_param_value = function_call_param_iterator.next_nf();
       
  9131             if (IN_param_value != NULL) {
       
  9132               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9133               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9134             }
       
  9135             
       
  9136             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9137             {
       
  9138         
       
  9139                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9140                 
       
  9141                 if (IN_type_symbol == NULL)
       
  9142                   IN_type_symbol = last_type_symbol;
       
  9143                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9144                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9145                 function_type_prefix = return_type_symbol;
       
  9146                 break;
       
  9147                 
       
  9148             }
       
  9149             
       
  9150             
       
  9151             ERROR;
       
  9152         }
       
  9153         
       
  9154     }/*function_lword_to_time*/
       
  9155     break;
       
  9156 
       
  9157 /****
       
  9158  *LWORD_TO_INT
       
  9159  */
       
  9160     case function_lword_to_int :
       
  9161     {
       
  9162         symbol_c *last_type_symbol = NULL;
       
  9163 
       
  9164         {
       
  9165             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9166             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9167             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9168             symbol_c *IN_type_symbol = NULL;
       
  9169             
       
  9170             /* Get the value from a foo(<param_value>) style call */
       
  9171             if (IN_param_value == NULL)
       
  9172               IN_param_value = function_call_param_iterator.next_nf();
       
  9173             if (IN_param_value != NULL) {
       
  9174               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9175               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9176             }
       
  9177             
       
  9178             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9179             {
       
  9180         
       
  9181                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9182                 
       
  9183                 if (IN_type_symbol == NULL)
       
  9184                   IN_type_symbol = last_type_symbol;
       
  9185                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9186                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9187                 function_type_prefix = return_type_symbol;
       
  9188                 function_type_suffix = IN_type_symbol;
       
  9189                 break;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             
       
  9194             ERROR;
       
  9195         }
       
  9196         
       
  9197     }/*function_lword_to_int*/
       
  9198     break;
       
  9199 
       
  9200 /****
       
  9201  *UINT_TO_REAL
       
  9202  */
       
  9203     case function_uint_to_real :
       
  9204     {
       
  9205         symbol_c *last_type_symbol = NULL;
       
  9206 
       
  9207         {
       
  9208             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9209             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9210             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9211             symbol_c *IN_type_symbol = NULL;
       
  9212             
       
  9213             /* Get the value from a foo(<param_value>) style call */
       
  9214             if (IN_param_value == NULL)
       
  9215               IN_param_value = function_call_param_iterator.next_nf();
       
  9216             if (IN_param_value != NULL) {
       
  9217               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9218               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9219             }
       
  9220             
       
  9221             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9222             {
       
  9223         
       
  9224                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9225                 
       
  9226                 if (IN_type_symbol == NULL)
       
  9227                   IN_type_symbol = last_type_symbol;
       
  9228                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9229                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9230                 function_type_prefix = return_type_symbol;
       
  9231                 function_type_suffix = IN_type_symbol;
       
  9232                 break;
       
  9233                 
       
  9234             }
       
  9235             
       
  9236             
       
  9237             ERROR;
       
  9238         }
       
  9239         
       
  9240     }/*function_uint_to_real*/
       
  9241     break;
       
  9242 
       
  9243 /****
       
  9244  *UINT_TO_SINT
       
  9245  */
       
  9246     case function_uint_to_sint :
       
  9247     {
       
  9248         symbol_c *last_type_symbol = NULL;
       
  9249 
       
  9250         {
       
  9251             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9252             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9253             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9254             symbol_c *IN_type_symbol = NULL;
       
  9255             
       
  9256             /* Get the value from a foo(<param_value>) style call */
       
  9257             if (IN_param_value == NULL)
       
  9258               IN_param_value = function_call_param_iterator.next_nf();
       
  9259             if (IN_param_value != NULL) {
       
  9260               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9261               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9262             }
       
  9263             
       
  9264             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9265             {
       
  9266         
       
  9267                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9268                 
       
  9269                 if (IN_type_symbol == NULL)
       
  9270                   IN_type_symbol = last_type_symbol;
       
  9271                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9272                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9273                 function_type_prefix = return_type_symbol;
       
  9274                 function_type_suffix = IN_type_symbol;
       
  9275                 break;
       
  9276                 
       
  9277             }
       
  9278             
       
  9279             
       
  9280             ERROR;
       
  9281         }
       
  9282         
       
  9283     }/*function_uint_to_sint*/
       
  9284     break;
       
  9285 
       
  9286 /****
       
  9287  *UINT_TO_LINT
       
  9288  */
       
  9289     case function_uint_to_lint :
       
  9290     {
       
  9291         symbol_c *last_type_symbol = NULL;
       
  9292 
       
  9293         {
       
  9294             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9295             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9296             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9297             symbol_c *IN_type_symbol = NULL;
       
  9298             
       
  9299             /* Get the value from a foo(<param_value>) style call */
       
  9300             if (IN_param_value == NULL)
       
  9301               IN_param_value = function_call_param_iterator.next_nf();
       
  9302             if (IN_param_value != NULL) {
       
  9303               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9304               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9305             }
       
  9306             
       
  9307             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9308             {
       
  9309         
       
  9310                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9311                 
       
  9312                 if (IN_type_symbol == NULL)
       
  9313                   IN_type_symbol = last_type_symbol;
       
  9314                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9315                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9316                 function_type_prefix = return_type_symbol;
       
  9317                 function_type_suffix = IN_type_symbol;
       
  9318                 break;
       
  9319                 
       
  9320             }
       
  9321             
       
  9322             
       
  9323             ERROR;
       
  9324         }
       
  9325         
       
  9326     }/*function_uint_to_lint*/
       
  9327     break;
       
  9328 
       
  9329 /****
       
  9330  *UINT_TO_DINT
       
  9331  */
       
  9332     case function_uint_to_dint :
       
  9333     {
       
  9334         symbol_c *last_type_symbol = NULL;
       
  9335 
       
  9336         {
       
  9337             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9338             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9339             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9340             symbol_c *IN_type_symbol = NULL;
       
  9341             
       
  9342             /* Get the value from a foo(<param_value>) style call */
       
  9343             if (IN_param_value == NULL)
       
  9344               IN_param_value = function_call_param_iterator.next_nf();
       
  9345             if (IN_param_value != NULL) {
       
  9346               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9347               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9348             }
       
  9349             
       
  9350             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9351             {
       
  9352         
       
  9353                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9354                 
       
  9355                 if (IN_type_symbol == NULL)
       
  9356                   IN_type_symbol = last_type_symbol;
       
  9357                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9358                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9359                 function_type_prefix = return_type_symbol;
       
  9360                 function_type_suffix = IN_type_symbol;
       
  9361                 break;
       
  9362                 
       
  9363             }
       
  9364             
       
  9365             
       
  9366             ERROR;
       
  9367         }
       
  9368         
       
  9369     }/*function_uint_to_dint*/
       
  9370     break;
       
  9371 
       
  9372 /****
       
  9373  *UINT_TO_DATE
       
  9374  */
       
  9375     case function_uint_to_date :
       
  9376     {
       
  9377         symbol_c *last_type_symbol = NULL;
       
  9378 
       
  9379         {
       
  9380             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9381             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9382             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9383             symbol_c *IN_type_symbol = NULL;
       
  9384             
       
  9385             /* Get the value from a foo(<param_value>) style call */
       
  9386             if (IN_param_value == NULL)
       
  9387               IN_param_value = function_call_param_iterator.next_nf();
       
  9388             if (IN_param_value != NULL) {
       
  9389               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9390               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9391             }
       
  9392             
       
  9393             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9394             {
       
  9395         
       
  9396                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9397                 
       
  9398                 if (IN_type_symbol == NULL)
       
  9399                   IN_type_symbol = last_type_symbol;
       
  9400                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9401                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9402                 function_type_prefix = return_type_symbol;
       
  9403                 break;
       
  9404                 
       
  9405             }
       
  9406             
       
  9407             
       
  9408             ERROR;
       
  9409         }
       
  9410         
       
  9411     }/*function_uint_to_date*/
       
  9412     break;
       
  9413 
       
  9414 /****
       
  9415  *UINT_TO_DWORD
       
  9416  */
       
  9417     case function_uint_to_dword :
       
  9418     {
       
  9419         symbol_c *last_type_symbol = NULL;
       
  9420 
       
  9421         {
       
  9422             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9423             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9424             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9425             symbol_c *IN_type_symbol = NULL;
       
  9426             
       
  9427             /* Get the value from a foo(<param_value>) style call */
       
  9428             if (IN_param_value == NULL)
       
  9429               IN_param_value = function_call_param_iterator.next_nf();
       
  9430             if (IN_param_value != NULL) {
       
  9431               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9432               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9433             }
       
  9434             
       
  9435             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9436             {
       
  9437         
       
  9438                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9439                 
       
  9440                 if (IN_type_symbol == NULL)
       
  9441                   IN_type_symbol = last_type_symbol;
       
  9442                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9443                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9444                 function_type_prefix = return_type_symbol;
       
  9445                 function_type_suffix = IN_type_symbol;
       
  9446                 break;
       
  9447                 
       
  9448             }
       
  9449             
       
  9450             
       
  9451             ERROR;
       
  9452         }
       
  9453         
       
  9454     }/*function_uint_to_dword*/
       
  9455     break;
       
  9456 
       
  9457 /****
       
  9458  *UINT_TO_DT
       
  9459  */
       
  9460     case function_uint_to_dt :
       
  9461     {
       
  9462         symbol_c *last_type_symbol = NULL;
       
  9463 
       
  9464         {
       
  9465             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9466             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9467             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9468             symbol_c *IN_type_symbol = NULL;
       
  9469             
       
  9470             /* Get the value from a foo(<param_value>) style call */
       
  9471             if (IN_param_value == NULL)
       
  9472               IN_param_value = function_call_param_iterator.next_nf();
       
  9473             if (IN_param_value != NULL) {
       
  9474               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9475               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9476             }
       
  9477             
       
  9478             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9479             {
       
  9480         
       
  9481                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9482                 
       
  9483                 if (IN_type_symbol == NULL)
       
  9484                   IN_type_symbol = last_type_symbol;
       
  9485                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9486                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9487                 function_type_prefix = return_type_symbol;
       
  9488                 break;
       
  9489                 
       
  9490             }
       
  9491             
       
  9492             
       
  9493             ERROR;
       
  9494         }
       
  9495         
       
  9496     }/*function_uint_to_dt*/
       
  9497     break;
       
  9498 
       
  9499 /****
       
  9500  *UINT_TO_TOD
       
  9501  */
       
  9502     case function_uint_to_tod :
       
  9503     {
       
  9504         symbol_c *last_type_symbol = NULL;
       
  9505 
       
  9506         {
       
  9507             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9508             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9509             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9510             symbol_c *IN_type_symbol = NULL;
       
  9511             
       
  9512             /* Get the value from a foo(<param_value>) style call */
       
  9513             if (IN_param_value == NULL)
       
  9514               IN_param_value = function_call_param_iterator.next_nf();
       
  9515             if (IN_param_value != NULL) {
       
  9516               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9517               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9518             }
       
  9519             
       
  9520             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9521             {
       
  9522         
       
  9523                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9524                 
       
  9525                 if (IN_type_symbol == NULL)
       
  9526                   IN_type_symbol = last_type_symbol;
       
  9527                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9528                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9529                 function_type_prefix = return_type_symbol;
       
  9530                 break;
       
  9531                 
       
  9532             }
       
  9533             
       
  9534             
       
  9535             ERROR;
       
  9536         }
       
  9537         
       
  9538     }/*function_uint_to_tod*/
       
  9539     break;
       
  9540 
       
  9541 /****
       
  9542  *UINT_TO_UDINT
       
  9543  */
       
  9544     case function_uint_to_udint :
       
  9545     {
       
  9546         symbol_c *last_type_symbol = NULL;
       
  9547 
       
  9548         {
       
  9549             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9550             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9551             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9552             symbol_c *IN_type_symbol = NULL;
       
  9553             
       
  9554             /* Get the value from a foo(<param_value>) style call */
       
  9555             if (IN_param_value == NULL)
       
  9556               IN_param_value = function_call_param_iterator.next_nf();
       
  9557             if (IN_param_value != NULL) {
       
  9558               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9559               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9560             }
       
  9561             
       
  9562             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9563             {
       
  9564         
       
  9565                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9566                 
       
  9567                 if (IN_type_symbol == NULL)
       
  9568                   IN_type_symbol = last_type_symbol;
       
  9569                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9570                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9571                 function_type_prefix = return_type_symbol;
       
  9572                 function_type_suffix = IN_type_symbol;
       
  9573                 break;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             
       
  9578             ERROR;
       
  9579         }
       
  9580         
       
  9581     }/*function_uint_to_udint*/
       
  9582     break;
       
  9583 
       
  9584 /****
       
  9585  *UINT_TO_WORD
       
  9586  */
       
  9587     case function_uint_to_word :
       
  9588     {
       
  9589         symbol_c *last_type_symbol = NULL;
       
  9590 
       
  9591         {
       
  9592             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9593             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9594             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9595             symbol_c *IN_type_symbol = NULL;
       
  9596             
       
  9597             /* Get the value from a foo(<param_value>) style call */
       
  9598             if (IN_param_value == NULL)
       
  9599               IN_param_value = function_call_param_iterator.next_nf();
       
  9600             if (IN_param_value != NULL) {
       
  9601               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9602               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9603             }
       
  9604             
       
  9605             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9606             {
       
  9607         
       
  9608                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9609                 
       
  9610                 if (IN_type_symbol == NULL)
       
  9611                   IN_type_symbol = last_type_symbol;
       
  9612                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9613                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9614                 function_type_prefix = return_type_symbol;
       
  9615                 function_type_suffix = IN_type_symbol;
       
  9616                 break;
       
  9617                 
       
  9618             }
       
  9619             
       
  9620             
       
  9621             ERROR;
       
  9622         }
       
  9623         
       
  9624     }/*function_uint_to_word*/
       
  9625     break;
       
  9626 
       
  9627 /****
       
  9628  *UINT_TO_STRING
       
  9629  */
       
  9630     case function_uint_to_string :
       
  9631     {
       
  9632         symbol_c *last_type_symbol = NULL;
       
  9633 
       
  9634         {
       
  9635             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9636             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9637             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9638             symbol_c *IN_type_symbol = NULL;
       
  9639             
       
  9640             /* Get the value from a foo(<param_value>) style call */
       
  9641             if (IN_param_value == NULL)
       
  9642               IN_param_value = function_call_param_iterator.next_nf();
       
  9643             if (IN_param_value != NULL) {
       
  9644               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9645               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9646             }
       
  9647             
       
  9648             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9649             {
       
  9650         
       
  9651                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  9652                 
       
  9653                 if (IN_type_symbol == NULL)
       
  9654                   IN_type_symbol = last_type_symbol;
       
  9655                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9656                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9657                 function_type_prefix = return_type_symbol;
       
  9658                 break;
       
  9659                 
       
  9660             }
       
  9661             
       
  9662             
       
  9663             ERROR;
       
  9664         }
       
  9665         
       
  9666     }/*function_uint_to_string*/
       
  9667     break;
       
  9668 
       
  9669 /****
       
  9670  *UINT_TO_LWORD
       
  9671  */
       
  9672     case function_uint_to_lword :
       
  9673     {
       
  9674         symbol_c *last_type_symbol = NULL;
       
  9675 
       
  9676         {
       
  9677             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9678             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9679             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9680             symbol_c *IN_type_symbol = NULL;
       
  9681             
       
  9682             /* Get the value from a foo(<param_value>) style call */
       
  9683             if (IN_param_value == NULL)
       
  9684               IN_param_value = function_call_param_iterator.next_nf();
       
  9685             if (IN_param_value != NULL) {
       
  9686               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9687               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9688             }
       
  9689             
       
  9690             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9691             {
       
  9692         
       
  9693                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9694                 
       
  9695                 if (IN_type_symbol == NULL)
       
  9696                   IN_type_symbol = last_type_symbol;
       
  9697                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9698                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9699                 function_type_prefix = return_type_symbol;
       
  9700                 function_type_suffix = IN_type_symbol;
       
  9701                 break;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             
       
  9706             ERROR;
       
  9707         }
       
  9708         
       
  9709     }/*function_uint_to_lword*/
       
  9710     break;
       
  9711 
       
  9712 /****
       
  9713  *UINT_TO_LREAL
       
  9714  */
       
  9715     case function_uint_to_lreal :
       
  9716     {
       
  9717         symbol_c *last_type_symbol = NULL;
       
  9718 
       
  9719         {
       
  9720             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9722             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9723             symbol_c *IN_type_symbol = NULL;
       
  9724             
       
  9725             /* Get the value from a foo(<param_value>) style call */
       
  9726             if (IN_param_value == NULL)
       
  9727               IN_param_value = function_call_param_iterator.next_nf();
       
  9728             if (IN_param_value != NULL) {
       
  9729               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9730               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9731             }
       
  9732             
       
  9733             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9734             {
       
  9735         
       
  9736                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9737                 
       
  9738                 if (IN_type_symbol == NULL)
       
  9739                   IN_type_symbol = last_type_symbol;
       
  9740                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9741                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9742                 function_type_prefix = return_type_symbol;
       
  9743                 function_type_suffix = IN_type_symbol;
       
  9744                 break;
       
  9745                 
       
  9746             }
       
  9747             
       
  9748             
       
  9749             ERROR;
       
  9750         }
       
  9751         
       
  9752     }/*function_uint_to_lreal*/
       
  9753     break;
       
  9754 
       
  9755 /****
       
  9756  *UINT_TO_BYTE
       
  9757  */
       
  9758     case function_uint_to_byte :
       
  9759     {
       
  9760         symbol_c *last_type_symbol = NULL;
       
  9761 
       
  9762         {
       
  9763             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9764             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9765             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9766             symbol_c *IN_type_symbol = NULL;
       
  9767             
       
  9768             /* Get the value from a foo(<param_value>) style call */
       
  9769             if (IN_param_value == NULL)
       
  9770               IN_param_value = function_call_param_iterator.next_nf();
       
  9771             if (IN_param_value != NULL) {
       
  9772               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9773               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9774             }
       
  9775             
       
  9776             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9777             {
       
  9778         
       
  9779                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9780                 
       
  9781                 if (IN_type_symbol == NULL)
       
  9782                   IN_type_symbol = last_type_symbol;
       
  9783                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9784                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9785                 function_type_prefix = return_type_symbol;
       
  9786                 function_type_suffix = IN_type_symbol;
       
  9787                 break;
       
  9788                 
       
  9789             }
       
  9790             
       
  9791             
       
  9792             ERROR;
       
  9793         }
       
  9794         
       
  9795     }/*function_uint_to_byte*/
       
  9796     break;
       
  9797 
       
  9798 /****
       
  9799  *UINT_TO_USINT
       
  9800  */
       
  9801     case function_uint_to_usint :
       
  9802     {
       
  9803         symbol_c *last_type_symbol = NULL;
       
  9804 
       
  9805         {
       
  9806             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9808             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9809             symbol_c *IN_type_symbol = NULL;
       
  9810             
       
  9811             /* Get the value from a foo(<param_value>) style call */
       
  9812             if (IN_param_value == NULL)
       
  9813               IN_param_value = function_call_param_iterator.next_nf();
       
  9814             if (IN_param_value != NULL) {
       
  9815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9817             }
       
  9818             
       
  9819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9820             {
       
  9821         
       
  9822                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9823                 
       
  9824                 if (IN_type_symbol == NULL)
       
  9825                   IN_type_symbol = last_type_symbol;
       
  9826                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9827                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9828                 function_type_prefix = return_type_symbol;
       
  9829                 function_type_suffix = IN_type_symbol;
       
  9830                 break;
       
  9831                 
       
  9832             }
       
  9833             
       
  9834             
       
  9835             ERROR;
       
  9836         }
       
  9837         
       
  9838     }/*function_uint_to_usint*/
       
  9839     break;
       
  9840 
       
  9841 /****
       
  9842  *UINT_TO_ULINT
       
  9843  */
       
  9844     case function_uint_to_ulint :
       
  9845     {
       
  9846         symbol_c *last_type_symbol = NULL;
       
  9847 
       
  9848         {
       
  9849             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9850             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9851             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9852             symbol_c *IN_type_symbol = NULL;
       
  9853             
       
  9854             /* Get the value from a foo(<param_value>) style call */
       
  9855             if (IN_param_value == NULL)
       
  9856               IN_param_value = function_call_param_iterator.next_nf();
       
  9857             if (IN_param_value != NULL) {
       
  9858               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9859               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9860             }
       
  9861             
       
  9862             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9863             {
       
  9864         
       
  9865                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9866                 
       
  9867                 if (IN_type_symbol == NULL)
       
  9868                   IN_type_symbol = last_type_symbol;
       
  9869                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9870                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9871                 function_type_prefix = return_type_symbol;
       
  9872                 function_type_suffix = IN_type_symbol;
       
  9873                 break;
       
  9874                 
       
  9875             }
       
  9876             
       
  9877             
       
  9878             ERROR;
       
  9879         }
       
  9880         
       
  9881     }/*function_uint_to_ulint*/
       
  9882     break;
       
  9883 
       
  9884 /****
       
  9885  *UINT_TO_BOOL
       
  9886  */
       
  9887     case function_uint_to_bool :
       
  9888     {
       
  9889         symbol_c *last_type_symbol = NULL;
       
  9890 
       
  9891         {
       
  9892             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9894             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9895             symbol_c *IN_type_symbol = NULL;
       
  9896             
       
  9897             /* Get the value from a foo(<param_value>) style call */
       
  9898             if (IN_param_value == NULL)
       
  9899               IN_param_value = function_call_param_iterator.next_nf();
       
  9900             if (IN_param_value != NULL) {
       
  9901               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9902               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9903             }
       
  9904             
       
  9905             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9906             {
       
  9907         
       
  9908                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9909                 
       
  9910                 if (IN_type_symbol == NULL)
       
  9911                   IN_type_symbol = last_type_symbol;
       
  9912                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9913                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9914                 function_type_prefix = return_type_symbol;
       
  9915                 function_type_suffix = IN_type_symbol;
       
  9916                 break;
       
  9917                 
       
  9918             }
       
  9919             
       
  9920             
       
  9921             ERROR;
       
  9922         }
       
  9923         
       
  9924     }/*function_uint_to_bool*/
       
  9925     break;
       
  9926 
       
  9927 /****
       
  9928  *UINT_TO_TIME
       
  9929  */
       
  9930     case function_uint_to_time :
       
  9931     {
       
  9932         symbol_c *last_type_symbol = NULL;
       
  9933 
       
  9934         {
       
  9935             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9937             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9938             symbol_c *IN_type_symbol = NULL;
       
  9939             
       
  9940             /* Get the value from a foo(<param_value>) style call */
       
  9941             if (IN_param_value == NULL)
       
  9942               IN_param_value = function_call_param_iterator.next_nf();
       
  9943             if (IN_param_value != NULL) {
       
  9944               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9945               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9946             }
       
  9947             
       
  9948             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9949             {
       
  9950         
       
  9951                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9952                 
       
  9953                 if (IN_type_symbol == NULL)
       
  9954                   IN_type_symbol = last_type_symbol;
       
  9955                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9957                 function_type_prefix = return_type_symbol;
       
  9958                 break;
       
  9959                 
       
  9960             }
       
  9961             
       
  9962             
       
  9963             ERROR;
       
  9964         }
       
  9965         
       
  9966     }/*function_uint_to_time*/
       
  9967     break;
       
  9968 
       
  9969 /****
       
  9970  *UINT_TO_INT
       
  9971  */
       
  9972     case function_uint_to_int :
       
  9973     {
       
  9974         symbol_c *last_type_symbol = NULL;
       
  9975 
       
  9976         {
       
  9977             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9978             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9979             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9980             symbol_c *IN_type_symbol = NULL;
       
  9981             
       
  9982             /* Get the value from a foo(<param_value>) style call */
       
  9983             if (IN_param_value == NULL)
       
  9984               IN_param_value = function_call_param_iterator.next_nf();
       
  9985             if (IN_param_value != NULL) {
       
  9986               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9987               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9988             }
       
  9989             
       
  9990             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9991             {
       
  9992         
       
  9993                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9994                 
       
  9995                 if (IN_type_symbol == NULL)
       
  9996                   IN_type_symbol = last_type_symbol;
       
  9997                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9998                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9999                 function_type_prefix = return_type_symbol;
       
 10000                 function_type_suffix = IN_type_symbol;
       
 10001                 break;
       
 10002                 
       
 10003             }
       
 10004             
       
 10005             
       
 10006             ERROR;
       
 10007         }
       
 10008         
       
 10009     }/*function_uint_to_int*/
       
 10010     break;
       
 10011 
       
 10012 /****
       
 10013  *LREAL_TO_REAL
       
 10014  */
       
 10015     case function_lreal_to_real :
       
 10016     {
       
 10017         symbol_c *last_type_symbol = NULL;
       
 10018 
       
 10019         {
       
 10020             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10021             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10022             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10023             symbol_c *IN_type_symbol = NULL;
       
 10024             
       
 10025             /* Get the value from a foo(<param_value>) style call */
       
 10026             if (IN_param_value == NULL)
       
 10027               IN_param_value = function_call_param_iterator.next_nf();
       
 10028             if (IN_param_value != NULL) {
       
 10029               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10030               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10031             }
       
 10032             
       
 10033             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10034             {
       
 10035         
       
 10036                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10037                 
       
 10038                 if (IN_type_symbol == NULL)
       
 10039                   IN_type_symbol = last_type_symbol;
       
 10040                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10041                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10042                 function_type_prefix = return_type_symbol;
       
 10043                 function_type_suffix = IN_type_symbol;
       
 10044                 break;
       
 10045                 
       
 10046             }
       
 10047             
       
 10048             
       
 10049             ERROR;
       
 10050         }
       
 10051         
       
 10052     }/*function_lreal_to_real*/
       
 10053     break;
       
 10054 
       
 10055 /****
       
 10056  *LREAL_TO_SINT
       
 10057  */
       
 10058     case function_lreal_to_sint :
       
 10059     {
       
 10060         symbol_c *last_type_symbol = NULL;
       
 10061 
       
 10062         {
       
 10063             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10065             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10066             symbol_c *IN_type_symbol = NULL;
       
 10067             
       
 10068             /* Get the value from a foo(<param_value>) style call */
       
 10069             if (IN_param_value == NULL)
       
 10070               IN_param_value = function_call_param_iterator.next_nf();
       
 10071             if (IN_param_value != NULL) {
       
 10072               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10073               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10074             }
       
 10075             
       
 10076             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10077             {
       
 10078         
       
 10079                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10080                 
       
 10081                 if (IN_type_symbol == NULL)
       
 10082                   IN_type_symbol = last_type_symbol;
       
 10083                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10085                 function_type_prefix = return_type_symbol;
       
 10086                 break;
       
 10087                 
       
 10088             }
       
 10089             
       
 10090             
       
 10091             ERROR;
       
 10092         }
       
 10093         
       
 10094     }/*function_lreal_to_sint*/
       
 10095     break;
       
 10096 
       
 10097 /****
       
 10098  *LREAL_TO_LINT
       
 10099  */
       
 10100     case function_lreal_to_lint :
       
 10101     {
       
 10102         symbol_c *last_type_symbol = NULL;
       
 10103 
       
 10104         {
       
 10105             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10106             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10107             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10108             symbol_c *IN_type_symbol = NULL;
       
 10109             
       
 10110             /* Get the value from a foo(<param_value>) style call */
       
 10111             if (IN_param_value == NULL)
       
 10112               IN_param_value = function_call_param_iterator.next_nf();
       
 10113             if (IN_param_value != NULL) {
       
 10114               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10115               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10116             }
       
 10117             
       
 10118             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10119             {
       
 10120         
       
 10121                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10122                 
       
 10123                 if (IN_type_symbol == NULL)
       
 10124                   IN_type_symbol = last_type_symbol;
       
 10125                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10126                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10127                 function_type_prefix = return_type_symbol;
       
 10128                 break;
       
 10129                 
       
 10130             }
       
 10131             
       
 10132             
       
 10133             ERROR;
       
 10134         }
       
 10135         
       
 10136     }/*function_lreal_to_lint*/
       
 10137     break;
       
 10138 
       
 10139 /****
       
 10140  *LREAL_TO_DINT
       
 10141  */
       
 10142     case function_lreal_to_dint :
       
 10143     {
       
 10144         symbol_c *last_type_symbol = NULL;
       
 10145 
       
 10146         {
       
 10147             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10148             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10149             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10150             symbol_c *IN_type_symbol = NULL;
       
 10151             
       
 10152             /* Get the value from a foo(<param_value>) style call */
       
 10153             if (IN_param_value == NULL)
       
 10154               IN_param_value = function_call_param_iterator.next_nf();
       
 10155             if (IN_param_value != NULL) {
       
 10156               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10157               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10158             }
       
 10159             
       
 10160             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10161             {
       
 10162         
       
 10163                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10164                 
       
 10165                 if (IN_type_symbol == NULL)
       
 10166                   IN_type_symbol = last_type_symbol;
       
 10167                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10168                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10169                 function_type_prefix = return_type_symbol;
       
 10170                 break;
       
 10171                 
       
 10172             }
       
 10173             
       
 10174             
       
 10175             ERROR;
       
 10176         }
       
 10177         
       
 10178     }/*function_lreal_to_dint*/
       
 10179     break;
       
 10180 
       
 10181 /****
       
 10182  *LREAL_TO_DATE
       
 10183  */
       
 10184     case function_lreal_to_date :
       
 10185     {
       
 10186         symbol_c *last_type_symbol = NULL;
       
 10187 
       
 10188         {
       
 10189             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10190             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10191             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10192             symbol_c *IN_type_symbol = NULL;
       
 10193             
       
 10194             /* Get the value from a foo(<param_value>) style call */
       
 10195             if (IN_param_value == NULL)
       
 10196               IN_param_value = function_call_param_iterator.next_nf();
       
 10197             if (IN_param_value != NULL) {
       
 10198               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10199               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10200             }
       
 10201             
       
 10202             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10203             {
       
 10204         
       
 10205                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10206                 
       
 10207                 if (IN_type_symbol == NULL)
       
 10208                   IN_type_symbol = last_type_symbol;
       
 10209                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10210                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10211                 function_type_prefix = return_type_symbol;
       
 10212                 break;
       
 10213                 
       
 10214             }
       
 10215             
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_lreal_to_date*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *LREAL_TO_DWORD
       
 10225  */
       
 10226     case function_lreal_to_dword :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = NULL;
       
 10229 
       
 10230         {
       
 10231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10234             symbol_c *IN_type_symbol = NULL;
       
 10235             
       
 10236             /* Get the value from a foo(<param_value>) style call */
       
 10237             if (IN_param_value == NULL)
       
 10238               IN_param_value = function_call_param_iterator.next_nf();
       
 10239             if (IN_param_value != NULL) {
       
 10240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10241               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10242             }
       
 10243             
       
 10244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10245             {
       
 10246         
       
 10247                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10248                 
       
 10249                 if (IN_type_symbol == NULL)
       
 10250                   IN_type_symbol = last_type_symbol;
       
 10251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10252                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10253                 function_type_prefix = return_type_symbol;
       
 10254                 break;
       
 10255                 
       
 10256             }
       
 10257             
       
 10258             
       
 10259             ERROR;
       
 10260         }
       
 10261         
       
 10262     }/*function_lreal_to_dword*/
       
 10263     break;
       
 10264 
       
 10265 /****
       
 10266  *LREAL_TO_DT
       
 10267  */
       
 10268     case function_lreal_to_dt :
       
 10269     {
       
 10270         symbol_c *last_type_symbol = NULL;
       
 10271 
       
 10272         {
       
 10273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10275             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10276             symbol_c *IN_type_symbol = NULL;
       
 10277             
       
 10278             /* Get the value from a foo(<param_value>) style call */
       
 10279             if (IN_param_value == NULL)
       
 10280               IN_param_value = function_call_param_iterator.next_nf();
       
 10281             if (IN_param_value != NULL) {
       
 10282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10283               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10284             }
       
 10285             
       
 10286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10287             {
       
 10288         
       
 10289                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10290                 
       
 10291                 if (IN_type_symbol == NULL)
       
 10292                   IN_type_symbol = last_type_symbol;
       
 10293                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10294                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10295                 function_type_prefix = return_type_symbol;
       
 10296                 break;
       
 10297                 
       
 10298             }
       
 10299             
       
 10300             
       
 10301             ERROR;
       
 10302         }
       
 10303         
       
 10304     }/*function_lreal_to_dt*/
       
 10305     break;
       
 10306 
       
 10307 /****
       
 10308  *LREAL_TO_TOD
       
 10309  */
       
 10310     case function_lreal_to_tod :
       
 10311     {
       
 10312         symbol_c *last_type_symbol = NULL;
       
 10313 
       
 10314         {
       
 10315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10318             symbol_c *IN_type_symbol = NULL;
       
 10319             
       
 10320             /* Get the value from a foo(<param_value>) style call */
       
 10321             if (IN_param_value == NULL)
       
 10322               IN_param_value = function_call_param_iterator.next_nf();
       
 10323             if (IN_param_value != NULL) {
       
 10324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10326             }
       
 10327             
       
 10328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10329             {
       
 10330         
       
 10331                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10332                 
       
 10333                 if (IN_type_symbol == NULL)
       
 10334                   IN_type_symbol = last_type_symbol;
       
 10335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10336                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10337                 function_type_prefix = return_type_symbol;
       
 10338                 break;
       
 10339                 
       
 10340             }
       
 10341             
       
 10342             
       
 10343             ERROR;
       
 10344         }
       
 10345         
       
 10346     }/*function_lreal_to_tod*/
       
 10347     break;
       
 10348 
       
 10349 /****
       
 10350  *LREAL_TO_UDINT
       
 10351  */
       
 10352     case function_lreal_to_udint :
       
 10353     {
       
 10354         symbol_c *last_type_symbol = NULL;
       
 10355 
       
 10356         {
       
 10357             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10359             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10360             symbol_c *IN_type_symbol = NULL;
       
 10361             
       
 10362             /* Get the value from a foo(<param_value>) style call */
       
 10363             if (IN_param_value == NULL)
       
 10364               IN_param_value = function_call_param_iterator.next_nf();
       
 10365             if (IN_param_value != NULL) {
       
 10366               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             }
       
 10369             
       
 10370             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10371             {
       
 10372         
       
 10373                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10374                 
       
 10375                 if (IN_type_symbol == NULL)
       
 10376                   IN_type_symbol = last_type_symbol;
       
 10377                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10378                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10379                 function_type_prefix = return_type_symbol;
       
 10380                 break;
       
 10381                 
       
 10382             }
       
 10383             
       
 10384             
       
 10385             ERROR;
       
 10386         }
       
 10387         
       
 10388     }/*function_lreal_to_udint*/
       
 10389     break;
       
 10390 
       
 10391 /****
       
 10392  *LREAL_TO_WORD
       
 10393  */
       
 10394     case function_lreal_to_word :
       
 10395     {
       
 10396         symbol_c *last_type_symbol = NULL;
       
 10397 
       
 10398         {
       
 10399             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10401             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10402             symbol_c *IN_type_symbol = NULL;
       
 10403             
       
 10404             /* Get the value from a foo(<param_value>) style call */
       
 10405             if (IN_param_value == NULL)
       
 10406               IN_param_value = function_call_param_iterator.next_nf();
       
 10407             if (IN_param_value != NULL) {
       
 10408               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10409               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10410             }
       
 10411             
       
 10412             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10413             {
       
 10414         
       
 10415                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10416                 
       
 10417                 if (IN_type_symbol == NULL)
       
 10418                   IN_type_symbol = last_type_symbol;
       
 10419                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10421                 function_type_prefix = return_type_symbol;
       
 10422                 break;
       
 10423                 
       
 10424             }
       
 10425             
       
 10426             
       
 10427             ERROR;
       
 10428         }
       
 10429         
       
 10430     }/*function_lreal_to_word*/
       
 10431     break;
       
 10432 
       
 10433 /****
       
 10434  *LREAL_TO_STRING
       
 10435  */
       
 10436     case function_lreal_to_string :
       
 10437     {
       
 10438         symbol_c *last_type_symbol = NULL;
       
 10439 
       
 10440         {
       
 10441             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10442             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10443             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10444             symbol_c *IN_type_symbol = NULL;
       
 10445             
       
 10446             /* Get the value from a foo(<param_value>) style call */
       
 10447             if (IN_param_value == NULL)
       
 10448               IN_param_value = function_call_param_iterator.next_nf();
       
 10449             if (IN_param_value != NULL) {
       
 10450               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10451               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10452             }
       
 10453             
       
 10454             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10455             {
       
 10456         
       
 10457                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
       
 10458                 
       
 10459                 if (IN_type_symbol == NULL)
       
 10460                   IN_type_symbol = last_type_symbol;
       
 10461                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10462                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10463                 function_type_prefix = return_type_symbol;
       
 10464                 break;
       
 10465                 
       
 10466             }
       
 10467             
       
 10468             
       
 10469             ERROR;
       
 10470         }
       
 10471         
       
 10472     }/*function_lreal_to_string*/
       
 10473     break;
       
 10474 
       
 10475 /****
       
 10476  *LREAL_TO_LWORD
       
 10477  */
       
 10478     case function_lreal_to_lword :
       
 10479     {
       
 10480         symbol_c *last_type_symbol = NULL;
       
 10481 
       
 10482         {
       
 10483             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10485             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10486             symbol_c *IN_type_symbol = NULL;
       
 10487             
       
 10488             /* Get the value from a foo(<param_value>) style call */
       
 10489             if (IN_param_value == NULL)
       
 10490               IN_param_value = function_call_param_iterator.next_nf();
       
 10491             if (IN_param_value != NULL) {
       
 10492               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10493               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10494             }
       
 10495             
       
 10496             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10497             {
       
 10498         
       
 10499                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10500                 
       
 10501                 if (IN_type_symbol == NULL)
       
 10502                   IN_type_symbol = last_type_symbol;
       
 10503                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10504                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10505                 function_type_prefix = return_type_symbol;
       
 10506                 break;
       
 10507                 
       
 10508             }
       
 10509             
       
 10510             
       
 10511             ERROR;
       
 10512         }
       
 10513         
       
 10514     }/*function_lreal_to_lword*/
       
 10515     break;
       
 10516 
       
 10517 /****
       
 10518  *LREAL_TO_UINT
       
 10519  */
       
 10520     case function_lreal_to_uint :
       
 10521     {
       
 10522         symbol_c *last_type_symbol = NULL;
       
 10523 
       
 10524         {
       
 10525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10526             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10527             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10528             symbol_c *IN_type_symbol = NULL;
       
 10529             
       
 10530             /* Get the value from a foo(<param_value>) style call */
       
 10531             if (IN_param_value == NULL)
       
 10532               IN_param_value = function_call_param_iterator.next_nf();
       
 10533             if (IN_param_value != NULL) {
       
 10534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10535               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10536             }
       
 10537             
       
 10538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10539             {
       
 10540         
       
 10541                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10542                 
       
 10543                 if (IN_type_symbol == NULL)
       
 10544                   IN_type_symbol = last_type_symbol;
       
 10545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10546                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10547                 function_type_prefix = return_type_symbol;
       
 10548                 break;
       
 10549                 
       
 10550             }
       
 10551             
       
 10552             
       
 10553             ERROR;
       
 10554         }
       
 10555         
       
 10556     }/*function_lreal_to_uint*/
       
 10557     break;
       
 10558 
       
 10559 /****
       
 10560  *LREAL_TO_BYTE
       
 10561  */
       
 10562     case function_lreal_to_byte :
       
 10563     {
       
 10564         symbol_c *last_type_symbol = NULL;
       
 10565 
       
 10566         {
       
 10567             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10569             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10570             symbol_c *IN_type_symbol = NULL;
       
 10571             
       
 10572             /* Get the value from a foo(<param_value>) style call */
       
 10573             if (IN_param_value == NULL)
       
 10574               IN_param_value = function_call_param_iterator.next_nf();
       
 10575             if (IN_param_value != NULL) {
       
 10576               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10577               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10578             }
       
 10579             
       
 10580             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10581             {
       
 10582         
       
 10583                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10584                 
       
 10585                 if (IN_type_symbol == NULL)
       
 10586                   IN_type_symbol = last_type_symbol;
       
 10587                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10589                 function_type_prefix = return_type_symbol;
       
 10590                 break;
       
 10591                 
       
 10592             }
       
 10593             
       
 10594             
       
 10595             ERROR;
       
 10596         }
       
 10597         
       
 10598     }/*function_lreal_to_byte*/
       
 10599     break;
       
 10600 
       
 10601 /****
       
 10602  *LREAL_TO_USINT
       
 10603  */
       
 10604     case function_lreal_to_usint :
       
 10605     {
       
 10606         symbol_c *last_type_symbol = NULL;
       
 10607 
       
 10608         {
       
 10609             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10611             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10612             symbol_c *IN_type_symbol = NULL;
       
 10613             
       
 10614             /* Get the value from a foo(<param_value>) style call */
       
 10615             if (IN_param_value == NULL)
       
 10616               IN_param_value = function_call_param_iterator.next_nf();
       
 10617             if (IN_param_value != NULL) {
       
 10618               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10619               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10620             }
       
 10621             
       
 10622             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10623             {
       
 10624         
       
 10625                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10626                 
       
 10627                 if (IN_type_symbol == NULL)
       
 10628                   IN_type_symbol = last_type_symbol;
       
 10629                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10630                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10631                 function_type_prefix = return_type_symbol;
       
 10632                 break;
       
 10633                 
       
 10634             }
       
 10635             
       
 10636             
       
 10637             ERROR;
       
 10638         }
       
 10639         
       
 10640     }/*function_lreal_to_usint*/
       
 10641     break;
       
 10642 
       
 10643 /****
       
 10644  *LREAL_TO_ULINT
       
 10645  */
       
 10646     case function_lreal_to_ulint :
       
 10647     {
       
 10648         symbol_c *last_type_symbol = NULL;
       
 10649 
       
 10650         {
       
 10651             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10653             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10654             symbol_c *IN_type_symbol = NULL;
       
 10655             
       
 10656             /* Get the value from a foo(<param_value>) style call */
       
 10657             if (IN_param_value == NULL)
       
 10658               IN_param_value = function_call_param_iterator.next_nf();
       
 10659             if (IN_param_value != NULL) {
       
 10660               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10661               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10662             }
       
 10663             
       
 10664             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10665             {
       
 10666         
       
 10667                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
       
 10668                 
       
 10669                 if (IN_type_symbol == NULL)
       
 10670                   IN_type_symbol = last_type_symbol;
       
 10671                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10672                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10673                 function_type_prefix = return_type_symbol;
       
 10674                 break;
       
 10675                 
       
 10676             }
       
 10677             
       
 10678             
       
 10679             ERROR;
       
 10680         }
       
 10681         
       
 10682     }/*function_lreal_to_ulint*/
       
 10683     break;
       
 10684 
       
 10685 /****
       
 10686  *LREAL_TO_BOOL
       
 10687  */
       
 10688     case function_lreal_to_bool :
       
 10689     {
       
 10690         symbol_c *last_type_symbol = NULL;
       
 10691 
       
 10692         {
       
 10693             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10694             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10695             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10696             symbol_c *IN_type_symbol = NULL;
       
 10697             
       
 10698             /* Get the value from a foo(<param_value>) style call */
       
 10699             if (IN_param_value == NULL)
       
 10700               IN_param_value = function_call_param_iterator.next_nf();
       
 10701             if (IN_param_value != NULL) {
       
 10702               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10703               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10704             }
       
 10705             
       
 10706             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10707             {
       
 10708         
       
 10709                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
       
 10710                 
       
 10711                 if (IN_type_symbol == NULL)
       
 10712                   IN_type_symbol = last_type_symbol;
       
 10713                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10714                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10715                 function_type_prefix = return_type_symbol;
       
 10716                 break;
       
 10717                 
       
 10718             }
       
 10719             
       
 10720             
       
 10721             ERROR;
       
 10722         }
       
 10723         
       
 10724     }/*function_lreal_to_bool*/
       
 10725     break;
       
 10726 
       
 10727 /****
       
 10728  *LREAL_TO_TIME
       
 10729  */
       
 10730     case function_lreal_to_time :
       
 10731     {
       
 10732         symbol_c *last_type_symbol = NULL;
       
 10733 
       
 10734         {
       
 10735             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10737             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10738             symbol_c *IN_type_symbol = NULL;
       
 10739             
       
 10740             /* Get the value from a foo(<param_value>) style call */
       
 10741             if (IN_param_value == NULL)
       
 10742               IN_param_value = function_call_param_iterator.next_nf();
       
 10743             if (IN_param_value != NULL) {
       
 10744               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10745               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10746             }
       
 10747             
       
 10748             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10749             {
       
 10750         
       
 10751                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10752                 
       
 10753                 if (IN_type_symbol == NULL)
       
 10754                   IN_type_symbol = last_type_symbol;
       
 10755                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10757                 function_type_prefix = return_type_symbol;
       
 10758                 break;
       
 10759                 
       
 10760             }
       
 10761             
       
 10762             
       
 10763             ERROR;
       
 10764         }
       
 10765         
       
 10766     }/*function_lreal_to_time*/
       
 10767     break;
       
 10768 
       
 10769 /****
       
 10770  *LREAL_TO_INT
       
 10771  */
       
 10772     case function_lreal_to_int :
       
 10773     {
       
 10774         symbol_c *last_type_symbol = NULL;
       
 10775 
       
 10776         {
       
 10777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10780             symbol_c *IN_type_symbol = NULL;
       
 10781             
       
 10782             /* Get the value from a foo(<param_value>) style call */
       
 10783             if (IN_param_value == NULL)
       
 10784               IN_param_value = function_call_param_iterator.next_nf();
       
 10785             if (IN_param_value != NULL) {
       
 10786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10787               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10788             }
       
 10789             
       
 10790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10791             {
       
 10792         
       
 10793                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
       
 10794                 
       
 10795                 if (IN_type_symbol == NULL)
       
 10796                   IN_type_symbol = last_type_symbol;
       
 10797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10798                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10799                 function_type_prefix = return_type_symbol;
       
 10800                 break;
       
 10801                 
       
 10802             }
       
 10803             
       
 10804             
       
 10805             ERROR;
       
 10806         }
       
 10807         
       
 10808     }/*function_lreal_to_int*/
       
 10809     break;
       
 10810 
       
 10811 /****
       
 10812  *BYTE_TO_REAL
       
 10813  */
       
 10814     case function_byte_to_real :
       
 10815     {
       
 10816         symbol_c *last_type_symbol = NULL;
       
 10817 
       
 10818         {
       
 10819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10822             symbol_c *IN_type_symbol = NULL;
       
 10823             
       
 10824             /* Get the value from a foo(<param_value>) style call */
       
 10825             if (IN_param_value == NULL)
       
 10826               IN_param_value = function_call_param_iterator.next_nf();
       
 10827             if (IN_param_value != NULL) {
       
 10828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10830             }
       
 10831             
       
 10832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10833             {
       
 10834         
       
 10835                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10836                 
       
 10837                 if (IN_type_symbol == NULL)
       
 10838                   IN_type_symbol = last_type_symbol;
       
 10839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10840                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10841                 function_type_prefix = return_type_symbol;
       
 10842                 function_type_suffix = IN_type_symbol;
       
 10843                 break;
       
 10844                 
       
 10845             }
       
 10846             
       
 10847             
       
 10848             ERROR;
       
 10849         }
       
 10850         
       
 10851     }/*function_byte_to_real*/
       
 10852     break;
       
 10853 
       
 10854 /****
       
 10855  *BYTE_TO_SINT
       
 10856  */
       
 10857     case function_byte_to_sint :
       
 10858     {
       
 10859         symbol_c *last_type_symbol = NULL;
       
 10860 
       
 10861         {
       
 10862             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10864             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10865             symbol_c *IN_type_symbol = NULL;
       
 10866             
       
 10867             /* Get the value from a foo(<param_value>) style call */
       
 10868             if (IN_param_value == NULL)
       
 10869               IN_param_value = function_call_param_iterator.next_nf();
       
 10870             if (IN_param_value != NULL) {
       
 10871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10873             }
       
 10874             
       
 10875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10876             {
       
 10877         
       
 10878                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10879                 
       
 10880                 if (IN_type_symbol == NULL)
       
 10881                   IN_type_symbol = last_type_symbol;
       
 10882                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10883                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10884                 function_type_prefix = return_type_symbol;
       
 10885                 function_type_suffix = IN_type_symbol;
       
 10886                 break;
       
 10887                 
       
 10888             }
       
 10889             
       
 10890             
       
 10891             ERROR;
       
 10892         }
       
 10893         
       
 10894     }/*function_byte_to_sint*/
       
 10895     break;
       
 10896 
       
 10897 /****
       
 10898  *BYTE_TO_LINT
       
 10899  */
       
 10900     case function_byte_to_lint :
       
 10901     {
       
 10902         symbol_c *last_type_symbol = NULL;
       
 10903 
       
 10904         {
       
 10905             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10907             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10908             symbol_c *IN_type_symbol = NULL;
       
 10909             
       
 10910             /* Get the value from a foo(<param_value>) style call */
       
 10911             if (IN_param_value == NULL)
       
 10912               IN_param_value = function_call_param_iterator.next_nf();
       
 10913             if (IN_param_value != NULL) {
       
 10914               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10915               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10916             }
       
 10917             
       
 10918             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10919             {
       
 10920         
       
 10921                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10922                 
       
 10923                 if (IN_type_symbol == NULL)
       
 10924                   IN_type_symbol = last_type_symbol;
       
 10925                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10926                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10927                 function_type_prefix = return_type_symbol;
       
 10928                 function_type_suffix = IN_type_symbol;
       
 10929                 break;
       
 10930                 
       
 10931             }
       
 10932             
       
 10933             
       
 10934             ERROR;
       
 10935         }
       
 10936         
       
 10937     }/*function_byte_to_lint*/
       
 10938     break;
       
 10939 
       
 10940 /****
       
 10941  *BYTE_TO_DINT
       
 10942  */
       
 10943     case function_byte_to_dint :
       
 10944     {
       
 10945         symbol_c *last_type_symbol = NULL;
       
 10946 
       
 10947         {
       
 10948             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10949             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10950             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10951             symbol_c *IN_type_symbol = NULL;
       
 10952             
       
 10953             /* Get the value from a foo(<param_value>) style call */
       
 10954             if (IN_param_value == NULL)
       
 10955               IN_param_value = function_call_param_iterator.next_nf();
       
 10956             if (IN_param_value != NULL) {
       
 10957               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10958               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10959             }
       
 10960             
       
 10961             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10962             {
       
 10963         
       
 10964                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10965                 
       
 10966                 if (IN_type_symbol == NULL)
       
 10967                   IN_type_symbol = last_type_symbol;
       
 10968                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10969                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10970                 function_type_prefix = return_type_symbol;
       
 10971                 function_type_suffix = IN_type_symbol;
       
 10972                 break;
       
 10973                 
       
 10974             }
       
 10975             
       
 10976             
       
 10977             ERROR;
       
 10978         }
       
 10979         
       
 10980     }/*function_byte_to_dint*/
       
 10981     break;
       
 10982 
       
 10983 /****
       
 10984  *BYTE_TO_DATE
       
 10985  */
       
 10986     case function_byte_to_date :
       
 10987     {
       
 10988         symbol_c *last_type_symbol = NULL;
       
 10989 
       
 10990         {
       
 10991             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10993             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10994             symbol_c *IN_type_symbol = NULL;
       
 10995             
       
 10996             /* Get the value from a foo(<param_value>) style call */
       
 10997             if (IN_param_value == NULL)
       
 10998               IN_param_value = function_call_param_iterator.next_nf();
       
 10999             if (IN_param_value != NULL) {
       
 11000               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11001               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11002             }
       
 11003             
       
 11004             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11005             {
       
 11006         
       
 11007                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11008                 
       
 11009                 if (IN_type_symbol == NULL)
       
 11010                   IN_type_symbol = last_type_symbol;
       
 11011                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11013                 function_type_prefix = return_type_symbol;
       
 11014                 break;
       
 11015                 
       
 11016             }
       
 11017             
       
 11018             
       
 11019             ERROR;
       
 11020         }
       
 11021         
       
 11022     }/*function_byte_to_date*/
       
 11023     break;
       
 11024 
       
 11025 /****
       
 11026  *BYTE_TO_DWORD
       
 11027  */
       
 11028     case function_byte_to_dword :
       
 11029     {
       
 11030         symbol_c *last_type_symbol = NULL;
       
 11031 
       
 11032         {
       
 11033             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11034             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11035             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11036             symbol_c *IN_type_symbol = NULL;
       
 11037             
       
 11038             /* Get the value from a foo(<param_value>) style call */
       
 11039             if (IN_param_value == NULL)
       
 11040               IN_param_value = function_call_param_iterator.next_nf();
       
 11041             if (IN_param_value != NULL) {
       
 11042               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11043               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11044             }
       
 11045             
       
 11046             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11047             {
       
 11048         
       
 11049                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11050                 
       
 11051                 if (IN_type_symbol == NULL)
       
 11052                   IN_type_symbol = last_type_symbol;
       
 11053                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11054                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11055                 function_type_prefix = return_type_symbol;
       
 11056                 function_type_suffix = IN_type_symbol;
       
 11057                 break;
       
 11058                 
       
 11059             }
       
 11060             
       
 11061             
       
 11062             ERROR;
       
 11063         }
       
 11064         
       
 11065     }/*function_byte_to_dword*/
       
 11066     break;
       
 11067 
       
 11068 /****
       
 11069  *BYTE_TO_DT
       
 11070  */
       
 11071     case function_byte_to_dt :
       
 11072     {
       
 11073         symbol_c *last_type_symbol = NULL;
       
 11074 
       
 11075         {
       
 11076             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11078             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11079             symbol_c *IN_type_symbol = NULL;
       
 11080             
       
 11081             /* Get the value from a foo(<param_value>) style call */
       
 11082             if (IN_param_value == NULL)
       
 11083               IN_param_value = function_call_param_iterator.next_nf();
       
 11084             if (IN_param_value != NULL) {
       
 11085               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11086               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11087             }
       
 11088             
       
 11089             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11090             {
       
 11091         
       
 11092                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11093                 
       
 11094                 if (IN_type_symbol == NULL)
       
 11095                   IN_type_symbol = last_type_symbol;
       
 11096                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11097                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11098                 function_type_prefix = return_type_symbol;
       
 11099                 break;
       
 11100                 
       
 11101             }
       
 11102             
       
 11103             
       
 11104             ERROR;
       
 11105         }
       
 11106         
       
 11107     }/*function_byte_to_dt*/
       
 11108     break;
       
 11109 
       
 11110 /****
       
 11111  *BYTE_TO_TOD
       
 11112  */
       
 11113     case function_byte_to_tod :
       
 11114     {
       
 11115         symbol_c *last_type_symbol = NULL;
       
 11116 
       
 11117         {
       
 11118             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11119             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11120             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11121             symbol_c *IN_type_symbol = NULL;
       
 11122             
       
 11123             /* Get the value from a foo(<param_value>) style call */
       
 11124             if (IN_param_value == NULL)
       
 11125               IN_param_value = function_call_param_iterator.next_nf();
       
 11126             if (IN_param_value != NULL) {
       
 11127               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11128               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11129             }
       
 11130             
       
 11131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11132             {
       
 11133         
       
 11134                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11135                 
       
 11136                 if (IN_type_symbol == NULL)
       
 11137                   IN_type_symbol = last_type_symbol;
       
 11138                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11139                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11140                 function_type_prefix = return_type_symbol;
       
 11141                 break;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             
       
 11146             ERROR;
       
 11147         }
       
 11148         
       
 11149     }/*function_byte_to_tod*/
       
 11150     break;
       
 11151 
       
 11152 /****
       
 11153  *BYTE_TO_UDINT
       
 11154  */
       
 11155     case function_byte_to_udint :
       
 11156     {
       
 11157         symbol_c *last_type_symbol = NULL;
       
 11158 
       
 11159         {
       
 11160             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11162             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11163             symbol_c *IN_type_symbol = NULL;
       
 11164             
       
 11165             /* Get the value from a foo(<param_value>) style call */
       
 11166             if (IN_param_value == NULL)
       
 11167               IN_param_value = function_call_param_iterator.next_nf();
       
 11168             if (IN_param_value != NULL) {
       
 11169               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11170               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11171             }
       
 11172             
       
 11173             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11174             {
       
 11175         
       
 11176                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11177                 
       
 11178                 if (IN_type_symbol == NULL)
       
 11179                   IN_type_symbol = last_type_symbol;
       
 11180                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11181                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11182                 function_type_prefix = return_type_symbol;
       
 11183                 function_type_suffix = IN_type_symbol;
       
 11184                 break;
       
 11185                 
       
 11186             }
       
 11187             
       
 11188             
       
 11189             ERROR;
       
 11190         }
       
 11191         
       
 11192     }/*function_byte_to_udint*/
       
 11193     break;
       
 11194 
       
 11195 /****
       
 11196  *BYTE_TO_WORD
       
 11197  */
       
 11198     case function_byte_to_word :
       
 11199     {
       
 11200         symbol_c *last_type_symbol = NULL;
       
 11201 
       
 11202         {
       
 11203             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11205             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11206             symbol_c *IN_type_symbol = NULL;
       
 11207             
       
 11208             /* Get the value from a foo(<param_value>) style call */
       
 11209             if (IN_param_value == NULL)
       
 11210               IN_param_value = function_call_param_iterator.next_nf();
       
 11211             if (IN_param_value != NULL) {
       
 11212               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11213               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11214             }
       
 11215             
       
 11216             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11217             {
       
 11218         
       
 11219                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11220                 
       
 11221                 if (IN_type_symbol == NULL)
       
 11222                   IN_type_symbol = last_type_symbol;
       
 11223                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11224                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11225                 function_type_prefix = return_type_symbol;
       
 11226                 function_type_suffix = IN_type_symbol;
       
 11227                 break;
       
 11228                 
       
 11229             }
       
 11230             
       
 11231             
       
 11232             ERROR;
       
 11233         }
       
 11234         
       
 11235     }/*function_byte_to_word*/
       
 11236     break;
       
 11237 
       
 11238 /****
       
 11239  *BYTE_TO_STRING
       
 11240  */
       
 11241     case function_byte_to_string :
       
 11242     {
       
 11243         symbol_c *last_type_symbol = NULL;
       
 11244 
       
 11245         {
       
 11246             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11248             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11249             symbol_c *IN_type_symbol = NULL;
       
 11250             
       
 11251             /* Get the value from a foo(<param_value>) style call */
       
 11252             if (IN_param_value == NULL)
       
 11253               IN_param_value = function_call_param_iterator.next_nf();
       
 11254             if (IN_param_value != NULL) {
       
 11255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11257             }
       
 11258             
       
 11259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11260             {
       
 11261         
       
 11262                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
 11263                 
       
 11264                 if (IN_type_symbol == NULL)
       
 11265                   IN_type_symbol = last_type_symbol;
       
 11266                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11267                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11268                 function_type_prefix = return_type_symbol;
       
 11269                 break;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             
       
 11274             ERROR;
       
 11275         }
       
 11276         
       
 11277     }/*function_byte_to_string*/
       
 11278     break;
       
 11279 
       
 11280 /****
       
 11281  *BYTE_TO_LWORD
       
 11282  */
       
 11283     case function_byte_to_lword :
       
 11284     {
       
 11285         symbol_c *last_type_symbol = NULL;
       
 11286 
       
 11287         {
       
 11288             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11289             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11290             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11291             symbol_c *IN_type_symbol = NULL;
       
 11292             
       
 11293             /* Get the value from a foo(<param_value>) style call */
       
 11294             if (IN_param_value == NULL)
       
 11295               IN_param_value = function_call_param_iterator.next_nf();
       
 11296             if (IN_param_value != NULL) {
       
 11297               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11298               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11299             }
       
 11300             
       
 11301             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11302             {
       
 11303         
       
 11304                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11305                 
       
 11306                 if (IN_type_symbol == NULL)
       
 11307                   IN_type_symbol = last_type_symbol;
       
 11308                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11309                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11310                 function_type_prefix = return_type_symbol;
       
 11311                 function_type_suffix = IN_type_symbol;
       
 11312                 break;
       
 11313                 
       
 11314             }
       
 11315             
       
 11316             
       
 11317             ERROR;
       
 11318         }
       
 11319         
       
 11320     }/*function_byte_to_lword*/
       
 11321     break;
       
 11322 
       
 11323 /****
       
 11324  *BYTE_TO_UINT
       
 11325  */
       
 11326     case function_byte_to_uint :
       
 11327     {
       
 11328         symbol_c *last_type_symbol = NULL;
       
 11329 
       
 11330         {
       
 11331             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11333             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11334             symbol_c *IN_type_symbol = NULL;
       
 11335             
       
 11336             /* Get the value from a foo(<param_value>) style call */
       
 11337             if (IN_param_value == NULL)
       
 11338               IN_param_value = function_call_param_iterator.next_nf();
       
 11339             if (IN_param_value != NULL) {
       
 11340               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11341               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11342             }
       
 11343             
       
 11344             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11345             {
       
 11346         
       
 11347                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11348                 
       
 11349                 if (IN_type_symbol == NULL)
       
 11350                   IN_type_symbol = last_type_symbol;
       
 11351                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11352                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11353                 function_type_prefix = return_type_symbol;
       
 11354                 function_type_suffix = IN_type_symbol;
       
 11355                 break;
       
 11356                 
       
 11357             }
       
 11358             
       
 11359             
       
 11360             ERROR;
       
 11361         }
       
 11362         
       
 11363     }/*function_byte_to_uint*/
       
 11364     break;
       
 11365 
       
 11366 /****
       
 11367  *BYTE_TO_LREAL
       
 11368  */
       
 11369     case function_byte_to_lreal :
       
 11370     {
       
 11371         symbol_c *last_type_symbol = NULL;
       
 11372 
       
 11373         {
       
 11374             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11376             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11377             symbol_c *IN_type_symbol = NULL;
       
 11378             
       
 11379             /* Get the value from a foo(<param_value>) style call */
       
 11380             if (IN_param_value == NULL)
       
 11381               IN_param_value = function_call_param_iterator.next_nf();
       
 11382             if (IN_param_value != NULL) {
       
 11383               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11384               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11385             }
       
 11386             
       
 11387             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11388             {
       
 11389         
       
 11390                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11391                 
       
 11392                 if (IN_type_symbol == NULL)
       
 11393                   IN_type_symbol = last_type_symbol;
       
 11394                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11395                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11396                 function_type_prefix = return_type_symbol;
       
 11397                 function_type_suffix = IN_type_symbol;
       
 11398                 break;
       
 11399                 
       
 11400             }
       
 11401             
       
 11402             
       
 11403             ERROR;
       
 11404         }
       
 11405         
       
 11406     }/*function_byte_to_lreal*/
       
 11407     break;
       
 11408 
       
 11409 /****
       
 11410  *BYTE_TO_USINT
       
 11411  */
       
 11412     case function_byte_to_usint :
       
 11413     {
       
 11414         symbol_c *last_type_symbol = NULL;
       
 11415 
       
 11416         {
       
 11417             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11419             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11420             symbol_c *IN_type_symbol = NULL;
       
 11421             
       
 11422             /* Get the value from a foo(<param_value>) style call */
       
 11423             if (IN_param_value == NULL)
       
 11424               IN_param_value = function_call_param_iterator.next_nf();
       
 11425             if (IN_param_value != NULL) {
       
 11426               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11427               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11428             }
       
 11429             
       
 11430             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11431             {
       
 11432         
       
 11433                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11434                 
       
 11435                 if (IN_type_symbol == NULL)
       
 11436                   IN_type_symbol = last_type_symbol;
       
 11437                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11438                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11439                 function_type_prefix = return_type_symbol;
       
 11440                 function_type_suffix = IN_type_symbol;
       
 11441                 break;
       
 11442                 
       
 11443             }
       
 11444             
       
 11445             
       
 11446             ERROR;
       
 11447         }
       
 11448         
       
 11449     }/*function_byte_to_usint*/
       
 11450     break;
       
 11451 
       
 11452 /****
       
 11453  *BYTE_TO_ULINT
       
 11454  */
       
 11455     case function_byte_to_ulint :
       
 11456     {
       
 11457         symbol_c *last_type_symbol = NULL;
       
 11458 
       
 11459         {
       
 11460             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11462             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11463             symbol_c *IN_type_symbol = NULL;
       
 11464             
       
 11465             /* Get the value from a foo(<param_value>) style call */
       
 11466             if (IN_param_value == NULL)
       
 11467               IN_param_value = function_call_param_iterator.next_nf();
       
 11468             if (IN_param_value != NULL) {
       
 11469               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11470               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11471             }
       
 11472             
       
 11473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11474             {
       
 11475         
       
 11476                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11477                 
       
 11478                 if (IN_type_symbol == NULL)
       
 11479                   IN_type_symbol = last_type_symbol;
       
 11480                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11481                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11482                 function_type_prefix = return_type_symbol;
       
 11483                 function_type_suffix = IN_type_symbol;
       
 11484                 break;
       
 11485                 
       
 11486             }
       
 11487             
       
 11488             
       
 11489             ERROR;
       
 11490         }
       
 11491         
       
 11492     }/*function_byte_to_ulint*/
       
 11493     break;
       
 11494 
       
 11495 /****
       
 11496  *BYTE_TO_BOOL
       
 11497  */
       
 11498     case function_byte_to_bool :
       
 11499     {
       
 11500         symbol_c *last_type_symbol = NULL;
       
 11501 
       
 11502         {
       
 11503             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11505             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11506             symbol_c *IN_type_symbol = NULL;
       
 11507             
       
 11508             /* Get the value from a foo(<param_value>) style call */
       
 11509             if (IN_param_value == NULL)
       
 11510               IN_param_value = function_call_param_iterator.next_nf();
       
 11511             if (IN_param_value != NULL) {
       
 11512               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11513               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11514             }
       
 11515             
       
 11516             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11517             {
       
 11518         
       
 11519                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11520                 
       
 11521                 if (IN_type_symbol == NULL)
       
 11522                   IN_type_symbol = last_type_symbol;
       
 11523                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11525                 function_type_prefix = return_type_symbol;
       
 11526                 function_type_suffix = IN_type_symbol;
       
 11527                 break;
       
 11528                 
       
 11529             }
       
 11530             
       
 11531             
       
 11532             ERROR;
       
 11533         }
       
 11534         
       
 11535     }/*function_byte_to_bool*/
       
 11536     break;
       
 11537 
       
 11538 /****
       
 11539  *BYTE_TO_TIME
       
 11540  */
       
 11541     case function_byte_to_time :
       
 11542     {
       
 11543         symbol_c *last_type_symbol = NULL;
       
 11544 
       
 11545         {
       
 11546             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11548             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11549             symbol_c *IN_type_symbol = NULL;
       
 11550             
       
 11551             /* Get the value from a foo(<param_value>) style call */
       
 11552             if (IN_param_value == NULL)
       
 11553               IN_param_value = function_call_param_iterator.next_nf();
       
 11554             if (IN_param_value != NULL) {
       
 11555               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11556               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11557             }
       
 11558             
       
 11559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11560             {
       
 11561         
       
 11562                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11563                 
       
 11564                 if (IN_type_symbol == NULL)
       
 11565                   IN_type_symbol = last_type_symbol;
       
 11566                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11567                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11568                 function_type_prefix = return_type_symbol;
       
 11569                 break;
       
 11570                 
       
 11571             }
       
 11572             
       
 11573             
       
 11574             ERROR;
       
 11575         }
       
 11576         
       
 11577     }/*function_byte_to_time*/
       
 11578     break;
       
 11579 
       
 11580 /****
       
 11581  *BYTE_TO_INT
       
 11582  */
       
 11583     case function_byte_to_int :
       
 11584     {
       
 11585         symbol_c *last_type_symbol = NULL;
       
 11586 
       
 11587         {
       
 11588             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11590             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11591             symbol_c *IN_type_symbol = NULL;
       
 11592             
       
 11593             /* Get the value from a foo(<param_value>) style call */
       
 11594             if (IN_param_value == NULL)
       
 11595               IN_param_value = function_call_param_iterator.next_nf();
       
 11596             if (IN_param_value != NULL) {
       
 11597               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11598               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11599             }
       
 11600             
       
 11601             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11602             {
       
 11603         
       
 11604                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11605                 
       
 11606                 if (IN_type_symbol == NULL)
       
 11607                   IN_type_symbol = last_type_symbol;
       
 11608                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11609                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11610                 function_type_prefix = return_type_symbol;
       
 11611                 function_type_suffix = IN_type_symbol;
       
 11612                 break;
       
 11613                 
       
 11614             }
       
 11615             
       
 11616             
       
 11617             ERROR;
       
 11618         }
       
 11619         
       
 11620     }/*function_byte_to_int*/
       
 11621     break;
       
 11622 
       
 11623 /****
       
 11624  *USINT_TO_REAL
       
 11625  */
       
 11626     case function_usint_to_real :
       
 11627     {
       
 11628         symbol_c *last_type_symbol = NULL;
       
 11629 
       
 11630         {
       
 11631             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11633             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11634             symbol_c *IN_type_symbol = NULL;
       
 11635             
       
 11636             /* Get the value from a foo(<param_value>) style call */
       
 11637             if (IN_param_value == NULL)
       
 11638               IN_param_value = function_call_param_iterator.next_nf();
       
 11639             if (IN_param_value != NULL) {
       
 11640               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11641               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11642             }
       
 11643             
       
 11644             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11645             {
       
 11646         
       
 11647                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11648                 
       
 11649                 if (IN_type_symbol == NULL)
       
 11650                   IN_type_symbol = last_type_symbol;
       
 11651                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11653                 function_type_prefix = return_type_symbol;
       
 11654                 function_type_suffix = IN_type_symbol;
       
 11655                 break;
       
 11656                 
       
 11657             }
       
 11658             
       
 11659             
       
 11660             ERROR;
       
 11661         }
       
 11662         
       
 11663     }/*function_usint_to_real*/
       
 11664     break;
       
 11665 
       
 11666 /****
       
 11667  *USINT_TO_SINT
       
 11668  */
       
 11669     case function_usint_to_sint :
       
 11670     {
       
 11671         symbol_c *last_type_symbol = NULL;
       
 11672 
       
 11673         {
       
 11674             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11676             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11677             symbol_c *IN_type_symbol = NULL;
       
 11678             
       
 11679             /* Get the value from a foo(<param_value>) style call */
       
 11680             if (IN_param_value == NULL)
       
 11681               IN_param_value = function_call_param_iterator.next_nf();
       
 11682             if (IN_param_value != NULL) {
       
 11683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11685             }
       
 11686             
       
 11687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11688             {
       
 11689         
       
 11690                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11691                 
       
 11692                 if (IN_type_symbol == NULL)
       
 11693                   IN_type_symbol = last_type_symbol;
       
 11694                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11695                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11696                 function_type_prefix = return_type_symbol;
       
 11697                 function_type_suffix = IN_type_symbol;
       
 11698                 break;
       
 11699                 
       
 11700             }
       
 11701             
       
 11702             
       
 11703             ERROR;
       
 11704         }
       
 11705         
       
 11706     }/*function_usint_to_sint*/
       
 11707     break;
       
 11708 
       
 11709 /****
       
 11710  *USINT_TO_LINT
       
 11711  */
       
 11712     case function_usint_to_lint :
       
 11713     {
       
 11714         symbol_c *last_type_symbol = NULL;
       
 11715 
       
 11716         {
       
 11717             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11718             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11719             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11720             symbol_c *IN_type_symbol = NULL;
       
 11721             
       
 11722             /* Get the value from a foo(<param_value>) style call */
       
 11723             if (IN_param_value == NULL)
       
 11724               IN_param_value = function_call_param_iterator.next_nf();
       
 11725             if (IN_param_value != NULL) {
       
 11726               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11727               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11728             }
       
 11729             
       
 11730             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11731             {
       
 11732         
       
 11733                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11734                 
       
 11735                 if (IN_type_symbol == NULL)
       
 11736                   IN_type_symbol = last_type_symbol;
       
 11737                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11738                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11739                 function_type_prefix = return_type_symbol;
       
 11740                 function_type_suffix = IN_type_symbol;
       
 11741                 break;
       
 11742                 
       
 11743             }
       
 11744             
       
 11745             
       
 11746             ERROR;
       
 11747         }
       
 11748         
       
 11749     }/*function_usint_to_lint*/
       
 11750     break;
       
 11751 
       
 11752 /****
       
 11753  *USINT_TO_DINT
       
 11754  */
       
 11755     case function_usint_to_dint :
       
 11756     {
       
 11757         symbol_c *last_type_symbol = NULL;
       
 11758 
       
 11759         {
       
 11760             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11761             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11762             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11763             symbol_c *IN_type_symbol = NULL;
       
 11764             
       
 11765             /* Get the value from a foo(<param_value>) style call */
       
 11766             if (IN_param_value == NULL)
       
 11767               IN_param_value = function_call_param_iterator.next_nf();
       
 11768             if (IN_param_value != NULL) {
       
 11769               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11770               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11771             }
       
 11772             
       
 11773             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11774             {
       
 11775         
       
 11776                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11777                 
       
 11778                 if (IN_type_symbol == NULL)
       
 11779                   IN_type_symbol = last_type_symbol;
       
 11780                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11781                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11782                 function_type_prefix = return_type_symbol;
       
 11783                 function_type_suffix = IN_type_symbol;
       
 11784                 break;
       
 11785                 
       
 11786             }
       
 11787             
       
 11788             
       
 11789             ERROR;
       
 11790         }
       
 11791         
       
 11792     }/*function_usint_to_dint*/
       
 11793     break;
       
 11794 
       
 11795 /****
       
 11796  *USINT_TO_DATE
       
 11797  */
       
 11798     case function_usint_to_date :
       
 11799     {
       
 11800         symbol_c *last_type_symbol = NULL;
       
 11801 
       
 11802         {
       
 11803             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11804             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11805             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11806             symbol_c *IN_type_symbol = NULL;
       
 11807             
       
 11808             /* Get the value from a foo(<param_value>) style call */
       
 11809             if (IN_param_value == NULL)
       
 11810               IN_param_value = function_call_param_iterator.next_nf();
       
 11811             if (IN_param_value != NULL) {
       
 11812               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11813               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11814             }
       
 11815             
       
 11816             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11817             {
       
 11818         
       
 11819                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11820                 
       
 11821                 if (IN_type_symbol == NULL)
       
 11822                   IN_type_symbol = last_type_symbol;
       
 11823                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11824                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11825                 function_type_prefix = return_type_symbol;
       
 11826                 break;
       
 11827                 
       
 11828             }
       
 11829             
       
 11830             
       
 11831             ERROR;
       
 11832         }
       
 11833         
       
 11834     }/*function_usint_to_date*/
       
 11835     break;
       
 11836 
       
 11837 /****
       
 11838  *USINT_TO_DWORD
       
 11839  */
       
 11840     case function_usint_to_dword :
       
 11841     {
       
 11842         symbol_c *last_type_symbol = NULL;
       
 11843 
       
 11844         {
       
 11845             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11846             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11847             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11848             symbol_c *IN_type_symbol = NULL;
       
 11849             
       
 11850             /* Get the value from a foo(<param_value>) style call */
       
 11851             if (IN_param_value == NULL)
       
 11852               IN_param_value = function_call_param_iterator.next_nf();
       
 11853             if (IN_param_value != NULL) {
       
 11854               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11855               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11856             }
       
 11857             
       
 11858             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11859             {
       
 11860         
       
 11861                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11862                 
       
 11863                 if (IN_type_symbol == NULL)
       
 11864                   IN_type_symbol = last_type_symbol;
       
 11865                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11866                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11867                 function_type_prefix = return_type_symbol;
       
 11868                 function_type_suffix = IN_type_symbol;
       
 11869                 break;
       
 11870                 
       
 11871             }
       
 11872             
       
 11873             
       
 11874             ERROR;
       
 11875         }
       
 11876         
       
 11877     }/*function_usint_to_dword*/
       
 11878     break;
       
 11879 
       
 11880 /****
       
 11881  *USINT_TO_DT
       
 11882  */
       
 11883     case function_usint_to_dt :
       
 11884     {
       
 11885         symbol_c *last_type_symbol = NULL;
       
 11886 
       
 11887         {
       
 11888             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11889             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11890             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11891             symbol_c *IN_type_symbol = NULL;
       
 11892             
       
 11893             /* Get the value from a foo(<param_value>) style call */
       
 11894             if (IN_param_value == NULL)
       
 11895               IN_param_value = function_call_param_iterator.next_nf();
       
 11896             if (IN_param_value != NULL) {
       
 11897               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11898               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11899             }
       
 11900             
       
 11901             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11902             {
       
 11903         
       
 11904                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11905                 
       
 11906                 if (IN_type_symbol == NULL)
       
 11907                   IN_type_symbol = last_type_symbol;
       
 11908                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11909                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11910                 function_type_prefix = return_type_symbol;
       
 11911                 break;
       
 11912                 
       
 11913             }
       
 11914             
       
 11915             
       
 11916             ERROR;
       
 11917         }
       
 11918         
       
 11919     }/*function_usint_to_dt*/
       
 11920     break;
       
 11921 
       
 11922 /****
       
 11923  *USINT_TO_TOD
       
 11924  */
       
 11925     case function_usint_to_tod :
       
 11926     {
       
 11927         symbol_c *last_type_symbol = NULL;
       
 11928 
       
 11929         {
       
 11930             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11932             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11933             symbol_c *IN_type_symbol = NULL;
       
 11934             
       
 11935             /* Get the value from a foo(<param_value>) style call */
       
 11936             if (IN_param_value == NULL)
       
 11937               IN_param_value = function_call_param_iterator.next_nf();
       
 11938             if (IN_param_value != NULL) {
       
 11939               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11940               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11941             }
       
 11942             
       
 11943             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11944             {
       
 11945         
       
 11946                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 11947                 
       
 11948                 if (IN_type_symbol == NULL)
       
 11949                   IN_type_symbol = last_type_symbol;
       
 11950                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11951                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11952                 function_type_prefix = return_type_symbol;
       
 11953                 break;
       
 11954                 
       
 11955             }
       
 11956             
       
 11957             
       
 11958             ERROR;
       
 11959         }
       
 11960         
       
 11961     }/*function_usint_to_tod*/
       
 11962     break;
       
 11963 
       
 11964 /****
       
 11965  *USINT_TO_UDINT
       
 11966  */
       
 11967     case function_usint_to_udint :
       
 11968     {
       
 11969         symbol_c *last_type_symbol = NULL;
       
 11970 
       
 11971         {
       
 11972             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 11973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11974             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 11975             symbol_c *IN_type_symbol = NULL;
       
 11976             
       
 11977             /* Get the value from a foo(<param_value>) style call */
       
 11978             if (IN_param_value == NULL)
       
 11979               IN_param_value = function_call_param_iterator.next_nf();
       
 11980             if (IN_param_value != NULL) {
       
 11981               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11982               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11983             }
       
 11984             
       
 11985             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11986             {
       
 11987         
       
 11988                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 11989                 
       
 11990                 if (IN_type_symbol == NULL)
       
 11991                   IN_type_symbol = last_type_symbol;
       
 11992                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 11993                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11994                 function_type_prefix = return_type_symbol;
       
 11995                 function_type_suffix = IN_type_symbol;
       
 11996                 break;
       
 11997                 
       
 11998             }
       
 11999             
       
 12000             
       
 12001             ERROR;
       
 12002         }
       
 12003         
       
 12004     }/*function_usint_to_udint*/
       
 12005     break;
       
 12006 
       
 12007 /****
       
 12008  *USINT_TO_WORD
       
 12009  */
       
 12010     case function_usint_to_word :
       
 12011     {
       
 12012         symbol_c *last_type_symbol = NULL;
       
 12013 
       
 12014         {
       
 12015             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12017             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12018             symbol_c *IN_type_symbol = NULL;
       
 12019             
       
 12020             /* Get the value from a foo(<param_value>) style call */
       
 12021             if (IN_param_value == NULL)
       
 12022               IN_param_value = function_call_param_iterator.next_nf();
       
 12023             if (IN_param_value != NULL) {
       
 12024               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12025               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12026             }
       
 12027             
       
 12028             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12029             {
       
 12030         
       
 12031                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12032                 
       
 12033                 if (IN_type_symbol == NULL)
       
 12034                   IN_type_symbol = last_type_symbol;
       
 12035                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12036                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12037                 function_type_prefix = return_type_symbol;
       
 12038                 function_type_suffix = IN_type_symbol;
       
 12039                 break;
       
 12040                 
       
 12041             }
       
 12042             
       
 12043             
       
 12044             ERROR;
       
 12045         }
       
 12046         
       
 12047     }/*function_usint_to_word*/
       
 12048     break;
       
 12049 
       
 12050 /****
       
 12051  *USINT_TO_STRING
       
 12052  */
       
 12053     case function_usint_to_string :
       
 12054     {
       
 12055         symbol_c *last_type_symbol = NULL;
       
 12056 
       
 12057         {
       
 12058             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12059             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12060             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12061             symbol_c *IN_type_symbol = NULL;
       
 12062             
       
 12063             /* Get the value from a foo(<param_value>) style call */
       
 12064             if (IN_param_value == NULL)
       
 12065               IN_param_value = function_call_param_iterator.next_nf();
       
 12066             if (IN_param_value != NULL) {
       
 12067               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12068               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12069             }
       
 12070             
       
 12071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12072             {
       
 12073         
       
 12074                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
 12075                 
       
 12076                 if (IN_type_symbol == NULL)
       
 12077                   IN_type_symbol = last_type_symbol;
       
 12078                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12079                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12080                 function_type_prefix = return_type_symbol;
       
 12081                 break;
       
 12082                 
       
 12083             }
       
 12084             
       
 12085             
       
 12086             ERROR;
       
 12087         }
       
 12088         
       
 12089     }/*function_usint_to_string*/
       
 12090     break;
       
 12091 
       
 12092 /****
       
 12093  *USINT_TO_LWORD
       
 12094  */
       
 12095     case function_usint_to_lword :
       
 12096     {
       
 12097         symbol_c *last_type_symbol = NULL;
       
 12098 
       
 12099         {
       
 12100             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12101             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12102             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12103             symbol_c *IN_type_symbol = NULL;
       
 12104             
       
 12105             /* Get the value from a foo(<param_value>) style call */
       
 12106             if (IN_param_value == NULL)
       
 12107               IN_param_value = function_call_param_iterator.next_nf();
       
 12108             if (IN_param_value != NULL) {
       
 12109               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12110               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12111             }
       
 12112             
       
 12113             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12114             {
       
 12115         
       
 12116                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12117                 
       
 12118                 if (IN_type_symbol == NULL)
       
 12119                   IN_type_symbol = last_type_symbol;
       
 12120                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12121                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12122                 function_type_prefix = return_type_symbol;
       
 12123                 function_type_suffix = IN_type_symbol;
       
 12124                 break;
       
 12125                 
       
 12126             }
       
 12127             
       
 12128             
       
 12129             ERROR;
       
 12130         }
       
 12131         
       
 12132     }/*function_usint_to_lword*/
       
 12133     break;
       
 12134 
       
 12135 /****
       
 12136  *USINT_TO_UINT
       
 12137  */
       
 12138     case function_usint_to_uint :
       
 12139     {
       
 12140         symbol_c *last_type_symbol = NULL;
       
 12141 
       
 12142         {
       
 12143             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12145             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12146             symbol_c *IN_type_symbol = NULL;
       
 12147             
       
 12148             /* Get the value from a foo(<param_value>) style call */
       
 12149             if (IN_param_value == NULL)
       
 12150               IN_param_value = function_call_param_iterator.next_nf();
       
 12151             if (IN_param_value != NULL) {
       
 12152               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12153               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12154             }
       
 12155             
       
 12156             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12157             {
       
 12158         
       
 12159                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12160                 
       
 12161                 if (IN_type_symbol == NULL)
       
 12162                   IN_type_symbol = last_type_symbol;
       
 12163                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12164                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12165                 function_type_prefix = return_type_symbol;
       
 12166                 function_type_suffix = IN_type_symbol;
       
 12167                 break;
       
 12168                 
       
 12169             }
       
 12170             
       
 12171             
       
 12172             ERROR;
       
 12173         }
       
 12174         
       
 12175     }/*function_usint_to_uint*/
       
 12176     break;
       
 12177 
       
 12178 /****
       
 12179  *USINT_TO_LREAL
       
 12180  */
       
 12181     case function_usint_to_lreal :
       
 12182     {
       
 12183         symbol_c *last_type_symbol = NULL;
       
 12184 
       
 12185         {
       
 12186             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12188             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12189             symbol_c *IN_type_symbol = NULL;
       
 12190             
       
 12191             /* Get the value from a foo(<param_value>) style call */
       
 12192             if (IN_param_value == NULL)
       
 12193               IN_param_value = function_call_param_iterator.next_nf();
       
 12194             if (IN_param_value != NULL) {
       
 12195               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12196               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12197             }
       
 12198             
       
 12199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12200             {
       
 12201         
       
 12202                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12203                 
       
 12204                 if (IN_type_symbol == NULL)
       
 12205                   IN_type_symbol = last_type_symbol;
       
 12206                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12207                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12208                 function_type_prefix = return_type_symbol;
       
 12209                 function_type_suffix = IN_type_symbol;
       
 12210                 break;
       
 12211                 
       
 12212             }
       
 12213             
       
 12214             
       
 12215             ERROR;
       
 12216         }
       
 12217         
       
 12218     }/*function_usint_to_lreal*/
       
 12219     break;
       
 12220 
       
 12221 /****
       
 12222  *USINT_TO_BYTE
       
 12223  */
       
 12224     case function_usint_to_byte :
       
 12225     {
       
 12226         symbol_c *last_type_symbol = NULL;
       
 12227 
       
 12228         {
       
 12229             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12231             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12232             symbol_c *IN_type_symbol = NULL;
       
 12233             
       
 12234             /* Get the value from a foo(<param_value>) style call */
       
 12235             if (IN_param_value == NULL)
       
 12236               IN_param_value = function_call_param_iterator.next_nf();
       
 12237             if (IN_param_value != NULL) {
       
 12238               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12239               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12240             }
       
 12241             
       
 12242             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12243             {
       
 12244         
       
 12245                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12246                 
       
 12247                 if (IN_type_symbol == NULL)
       
 12248                   IN_type_symbol = last_type_symbol;
       
 12249                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12250                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12251                 function_type_prefix = return_type_symbol;
       
 12252                 function_type_suffix = IN_type_symbol;
       
 12253                 break;
       
 12254                 
       
 12255             }
       
 12256             
       
 12257             
       
 12258             ERROR;
       
 12259         }
       
 12260         
       
 12261     }/*function_usint_to_byte*/
       
 12262     break;
       
 12263 
       
 12264 /****
       
 12265  *USINT_TO_ULINT
       
 12266  */
       
 12267     case function_usint_to_ulint :
       
 12268     {
       
 12269         symbol_c *last_type_symbol = NULL;
       
 12270 
       
 12271         {
       
 12272             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12274             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12275             symbol_c *IN_type_symbol = NULL;
       
 12276             
       
 12277             /* Get the value from a foo(<param_value>) style call */
       
 12278             if (IN_param_value == NULL)
       
 12279               IN_param_value = function_call_param_iterator.next_nf();
       
 12280             if (IN_param_value != NULL) {
       
 12281               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12282               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12283             }
       
 12284             
       
 12285             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12286             {
       
 12287         
       
 12288                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12289                 
       
 12290                 if (IN_type_symbol == NULL)
       
 12291                   IN_type_symbol = last_type_symbol;
       
 12292                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12293                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12294                 function_type_prefix = return_type_symbol;
       
 12295                 function_type_suffix = IN_type_symbol;
       
 12296                 break;
       
 12297                 
       
 12298             }
       
 12299             
       
 12300             
       
 12301             ERROR;
       
 12302         }
       
 12303         
       
 12304     }/*function_usint_to_ulint*/
       
 12305     break;
       
 12306 
       
 12307 /****
       
 12308  *USINT_TO_BOOL
       
 12309  */
       
 12310     case function_usint_to_bool :
       
 12311     {
       
 12312         symbol_c *last_type_symbol = NULL;
       
 12313 
       
 12314         {
       
 12315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12318             symbol_c *IN_type_symbol = NULL;
       
 12319             
       
 12320             /* Get the value from a foo(<param_value>) style call */
       
 12321             if (IN_param_value == NULL)
       
 12322               IN_param_value = function_call_param_iterator.next_nf();
       
 12323             if (IN_param_value != NULL) {
       
 12324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12326             }
       
 12327             
       
 12328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12329             {
       
 12330         
       
 12331                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12332                 
       
 12333                 if (IN_type_symbol == NULL)
       
 12334                   IN_type_symbol = last_type_symbol;
       
 12335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12336                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12337                 function_type_prefix = return_type_symbol;
       
 12338                 function_type_suffix = IN_type_symbol;
       
 12339                 break;
       
 12340                 
       
 12341             }
       
 12342             
       
 12343             
       
 12344             ERROR;
       
 12345         }
       
 12346         
       
 12347     }/*function_usint_to_bool*/
       
 12348     break;
       
 12349 
       
 12350 /****
       
 12351  *USINT_TO_TIME
       
 12352  */
       
 12353     case function_usint_to_time :
       
 12354     {
       
 12355         symbol_c *last_type_symbol = NULL;
       
 12356 
       
 12357         {
       
 12358             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12360             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12361             symbol_c *IN_type_symbol = NULL;
       
 12362             
       
 12363             /* Get the value from a foo(<param_value>) style call */
       
 12364             if (IN_param_value == NULL)
       
 12365               IN_param_value = function_call_param_iterator.next_nf();
       
 12366             if (IN_param_value != NULL) {
       
 12367               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12368               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12369             }
       
 12370             
       
 12371             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12372             {
       
 12373         
       
 12374                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12375                 
       
 12376                 if (IN_type_symbol == NULL)
       
 12377                   IN_type_symbol = last_type_symbol;
       
 12378                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12379                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12380                 function_type_prefix = return_type_symbol;
       
 12381                 break;
       
 12382                 
       
 12383             }
       
 12384             
       
 12385             
       
 12386             ERROR;
       
 12387         }
       
 12388         
       
 12389     }/*function_usint_to_time*/
       
 12390     break;
       
 12391 
       
 12392 /****
       
 12393  *USINT_TO_INT
       
 12394  */
       
 12395     case function_usint_to_int :
       
 12396     {
       
 12397         symbol_c *last_type_symbol = NULL;
       
 12398 
       
 12399         {
       
 12400             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12401             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12402             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12403             symbol_c *IN_type_symbol = NULL;
       
 12404             
       
 12405             /* Get the value from a foo(<param_value>) style call */
       
 12406             if (IN_param_value == NULL)
       
 12407               IN_param_value = function_call_param_iterator.next_nf();
       
 12408             if (IN_param_value != NULL) {
       
 12409               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12410               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12411             }
       
 12412             
       
 12413             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12414             {
       
 12415         
       
 12416                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12417                 
       
 12418                 if (IN_type_symbol == NULL)
       
 12419                   IN_type_symbol = last_type_symbol;
       
 12420                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12421                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12422                 function_type_prefix = return_type_symbol;
       
 12423                 function_type_suffix = IN_type_symbol;
       
 12424                 break;
       
 12425                 
       
 12426             }
       
 12427             
       
 12428             
       
 12429             ERROR;
       
 12430         }
       
 12431         
       
 12432     }/*function_usint_to_int*/
       
 12433     break;
       
 12434 
       
 12435 /****
       
 12436  *ULINT_TO_REAL
       
 12437  */
       
 12438     case function_ulint_to_real :
       
 12439     {
       
 12440         symbol_c *last_type_symbol = NULL;
       
 12441 
       
 12442         {
       
 12443             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12445             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12446             symbol_c *IN_type_symbol = NULL;
       
 12447             
       
 12448             /* Get the value from a foo(<param_value>) style call */
       
 12449             if (IN_param_value == NULL)
       
 12450               IN_param_value = function_call_param_iterator.next_nf();
       
 12451             if (IN_param_value != NULL) {
       
 12452               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12453               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12454             }
       
 12455             
       
 12456             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12457             {
       
 12458         
       
 12459                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12460                 
       
 12461                 if (IN_type_symbol == NULL)
       
 12462                   IN_type_symbol = last_type_symbol;
       
 12463                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12464                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12465                 function_type_prefix = return_type_symbol;
       
 12466                 function_type_suffix = IN_type_symbol;
       
 12467                 break;
       
 12468                 
       
 12469             }
       
 12470             
       
 12471             
       
 12472             ERROR;
       
 12473         }
       
 12474         
       
 12475     }/*function_ulint_to_real*/
       
 12476     break;
       
 12477 
       
 12478 /****
       
 12479  *ULINT_TO_SINT
       
 12480  */
       
 12481     case function_ulint_to_sint :
       
 12482     {
       
 12483         symbol_c *last_type_symbol = NULL;
       
 12484 
       
 12485         {
       
 12486             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12488             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12489             symbol_c *IN_type_symbol = NULL;
       
 12490             
       
 12491             /* Get the value from a foo(<param_value>) style call */
       
 12492             if (IN_param_value == NULL)
       
 12493               IN_param_value = function_call_param_iterator.next_nf();
       
 12494             if (IN_param_value != NULL) {
       
 12495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12497             }
       
 12498             
       
 12499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12500             {
       
 12501         
       
 12502                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12503                 
       
 12504                 if (IN_type_symbol == NULL)
       
 12505                   IN_type_symbol = last_type_symbol;
       
 12506                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12507                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12508                 function_type_prefix = return_type_symbol;
       
 12509                 function_type_suffix = IN_type_symbol;
       
 12510                 break;
       
 12511                 
       
 12512             }
       
 12513             
       
 12514             
       
 12515             ERROR;
       
 12516         }
       
 12517         
       
 12518     }/*function_ulint_to_sint*/
       
 12519     break;
       
 12520 
       
 12521 /****
       
 12522  *ULINT_TO_LINT
       
 12523  */
       
 12524     case function_ulint_to_lint :
       
 12525     {
       
 12526         symbol_c *last_type_symbol = NULL;
       
 12527 
       
 12528         {
       
 12529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12532             symbol_c *IN_type_symbol = NULL;
       
 12533             
       
 12534             /* Get the value from a foo(<param_value>) style call */
       
 12535             if (IN_param_value == NULL)
       
 12536               IN_param_value = function_call_param_iterator.next_nf();
       
 12537             if (IN_param_value != NULL) {
       
 12538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12540             }
       
 12541             
       
 12542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12543             {
       
 12544         
       
 12545                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12546                 
       
 12547                 if (IN_type_symbol == NULL)
       
 12548                   IN_type_symbol = last_type_symbol;
       
 12549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12550                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12551                 function_type_prefix = return_type_symbol;
       
 12552                 function_type_suffix = IN_type_symbol;
       
 12553                 break;
       
 12554                 
       
 12555             }
       
 12556             
       
 12557             
       
 12558             ERROR;
       
 12559         }
       
 12560         
       
 12561     }/*function_ulint_to_lint*/
       
 12562     break;
       
 12563 
       
 12564 /****
       
 12565  *ULINT_TO_DINT
       
 12566  */
       
 12567     case function_ulint_to_dint :
       
 12568     {
       
 12569         symbol_c *last_type_symbol = NULL;
       
 12570 
       
 12571         {
       
 12572             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12574             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12575             symbol_c *IN_type_symbol = NULL;
       
 12576             
       
 12577             /* Get the value from a foo(<param_value>) style call */
       
 12578             if (IN_param_value == NULL)
       
 12579               IN_param_value = function_call_param_iterator.next_nf();
       
 12580             if (IN_param_value != NULL) {
       
 12581               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12582               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12583             }
       
 12584             
       
 12585             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12586             {
       
 12587         
       
 12588                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12589                 
       
 12590                 if (IN_type_symbol == NULL)
       
 12591                   IN_type_symbol = last_type_symbol;
       
 12592                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12593                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12594                 function_type_prefix = return_type_symbol;
       
 12595                 function_type_suffix = IN_type_symbol;
       
 12596                 break;
       
 12597                 
       
 12598             }
       
 12599             
       
 12600             
       
 12601             ERROR;
       
 12602         }
       
 12603         
       
 12604     }/*function_ulint_to_dint*/
       
 12605     break;
       
 12606 
       
 12607 /****
       
 12608  *ULINT_TO_DATE
       
 12609  */
       
 12610     case function_ulint_to_date :
       
 12611     {
       
 12612         symbol_c *last_type_symbol = NULL;
       
 12613 
       
 12614         {
       
 12615             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12617             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12618             symbol_c *IN_type_symbol = NULL;
       
 12619             
       
 12620             /* Get the value from a foo(<param_value>) style call */
       
 12621             if (IN_param_value == NULL)
       
 12622               IN_param_value = function_call_param_iterator.next_nf();
       
 12623             if (IN_param_value != NULL) {
       
 12624               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12625               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12626             }
       
 12627             
       
 12628             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12629             {
       
 12630         
       
 12631                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12632                 
       
 12633                 if (IN_type_symbol == NULL)
       
 12634                   IN_type_symbol = last_type_symbol;
       
 12635                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12636                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12637                 function_type_prefix = return_type_symbol;
       
 12638                 break;
       
 12639                 
       
 12640             }
       
 12641             
       
 12642             
       
 12643             ERROR;
       
 12644         }
       
 12645         
       
 12646     }/*function_ulint_to_date*/
       
 12647     break;
       
 12648 
       
 12649 /****
       
 12650  *ULINT_TO_DWORD
       
 12651  */
       
 12652     case function_ulint_to_dword :
       
 12653     {
       
 12654         symbol_c *last_type_symbol = NULL;
       
 12655 
       
 12656         {
       
 12657             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12658             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12659             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12660             symbol_c *IN_type_symbol = NULL;
       
 12661             
       
 12662             /* Get the value from a foo(<param_value>) style call */
       
 12663             if (IN_param_value == NULL)
       
 12664               IN_param_value = function_call_param_iterator.next_nf();
       
 12665             if (IN_param_value != NULL) {
       
 12666               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12667               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12668             }
       
 12669             
       
 12670             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12671             {
       
 12672         
       
 12673                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12674                 
       
 12675                 if (IN_type_symbol == NULL)
       
 12676                   IN_type_symbol = last_type_symbol;
       
 12677                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12678                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12679                 function_type_prefix = return_type_symbol;
       
 12680                 function_type_suffix = IN_type_symbol;
       
 12681                 break;
       
 12682                 
       
 12683             }
       
 12684             
       
 12685             
       
 12686             ERROR;
       
 12687         }
       
 12688         
       
 12689     }/*function_ulint_to_dword*/
       
 12690     break;
       
 12691 
       
 12692 /****
       
 12693  *ULINT_TO_DT
       
 12694  */
       
 12695     case function_ulint_to_dt :
       
 12696     {
       
 12697         symbol_c *last_type_symbol = NULL;
       
 12698 
       
 12699         {
       
 12700             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12701             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12702             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12703             symbol_c *IN_type_symbol = NULL;
       
 12704             
       
 12705             /* Get the value from a foo(<param_value>) style call */
       
 12706             if (IN_param_value == NULL)
       
 12707               IN_param_value = function_call_param_iterator.next_nf();
       
 12708             if (IN_param_value != NULL) {
       
 12709               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12710               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12711             }
       
 12712             
       
 12713             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12714             {
       
 12715         
       
 12716                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12717                 
       
 12718                 if (IN_type_symbol == NULL)
       
 12719                   IN_type_symbol = last_type_symbol;
       
 12720                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12721                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12722                 function_type_prefix = return_type_symbol;
       
 12723                 break;
       
 12724                 
       
 12725             }
       
 12726             
       
 12727             
       
 12728             ERROR;
       
 12729         }
       
 12730         
       
 12731     }/*function_ulint_to_dt*/
       
 12732     break;
       
 12733 
       
 12734 /****
       
 12735  *ULINT_TO_TOD
       
 12736  */
       
 12737     case function_ulint_to_tod :
       
 12738     {
       
 12739         symbol_c *last_type_symbol = NULL;
       
 12740 
       
 12741         {
       
 12742             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12744             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12745             symbol_c *IN_type_symbol = NULL;
       
 12746             
       
 12747             /* Get the value from a foo(<param_value>) style call */
       
 12748             if (IN_param_value == NULL)
       
 12749               IN_param_value = function_call_param_iterator.next_nf();
       
 12750             if (IN_param_value != NULL) {
       
 12751               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12752               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12753             }
       
 12754             
       
 12755             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12756             {
       
 12757         
       
 12758                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 12759                 
       
 12760                 if (IN_type_symbol == NULL)
       
 12761                   IN_type_symbol = last_type_symbol;
       
 12762                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12763                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12764                 function_type_prefix = return_type_symbol;
       
 12765                 break;
       
 12766                 
       
 12767             }
       
 12768             
       
 12769             
       
 12770             ERROR;
       
 12771         }
       
 12772         
       
 12773     }/*function_ulint_to_tod*/
       
 12774     break;
       
 12775 
       
 12776 /****
       
 12777  *ULINT_TO_UDINT
       
 12778  */
       
 12779     case function_ulint_to_udint :
       
 12780     {
       
 12781         symbol_c *last_type_symbol = NULL;
       
 12782 
       
 12783         {
       
 12784             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12785             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12786             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12787             symbol_c *IN_type_symbol = NULL;
       
 12788             
       
 12789             /* Get the value from a foo(<param_value>) style call */
       
 12790             if (IN_param_value == NULL)
       
 12791               IN_param_value = function_call_param_iterator.next_nf();
       
 12792             if (IN_param_value != NULL) {
       
 12793               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12794               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12795             }
       
 12796             
       
 12797             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12798             {
       
 12799         
       
 12800                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12801                 
       
 12802                 if (IN_type_symbol == NULL)
       
 12803                   IN_type_symbol = last_type_symbol;
       
 12804                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12805                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12806                 function_type_prefix = return_type_symbol;
       
 12807                 function_type_suffix = IN_type_symbol;
       
 12808                 break;
       
 12809                 
       
 12810             }
       
 12811             
       
 12812             
       
 12813             ERROR;
       
 12814         }
       
 12815         
       
 12816     }/*function_ulint_to_udint*/
       
 12817     break;
       
 12818 
       
 12819 /****
       
 12820  *ULINT_TO_WORD
       
 12821  */
       
 12822     case function_ulint_to_word :
       
 12823     {
       
 12824         symbol_c *last_type_symbol = NULL;
       
 12825 
       
 12826         {
       
 12827             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12828             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12829             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12830             symbol_c *IN_type_symbol = NULL;
       
 12831             
       
 12832             /* Get the value from a foo(<param_value>) style call */
       
 12833             if (IN_param_value == NULL)
       
 12834               IN_param_value = function_call_param_iterator.next_nf();
       
 12835             if (IN_param_value != NULL) {
       
 12836               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12837               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12838             }
       
 12839             
       
 12840             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12841             {
       
 12842         
       
 12843                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12844                 
       
 12845                 if (IN_type_symbol == NULL)
       
 12846                   IN_type_symbol = last_type_symbol;
       
 12847                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12848                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12849                 function_type_prefix = return_type_symbol;
       
 12850                 function_type_suffix = IN_type_symbol;
       
 12851                 break;
       
 12852                 
       
 12853             }
       
 12854             
       
 12855             
       
 12856             ERROR;
       
 12857         }
       
 12858         
       
 12859     }/*function_ulint_to_word*/
       
 12860     break;
       
 12861 
       
 12862 /****
       
 12863  *ULINT_TO_STRING
       
 12864  */
       
 12865     case function_ulint_to_string :
       
 12866     {
       
 12867         symbol_c *last_type_symbol = NULL;
       
 12868 
       
 12869         {
       
 12870             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12871             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12872             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12873             symbol_c *IN_type_symbol = NULL;
       
 12874             
       
 12875             /* Get the value from a foo(<param_value>) style call */
       
 12876             if (IN_param_value == NULL)
       
 12877               IN_param_value = function_call_param_iterator.next_nf();
       
 12878             if (IN_param_value != NULL) {
       
 12879               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12880               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12881             }
       
 12882             
       
 12883             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12884             {
       
 12885         
       
 12886                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
 12887                 
       
 12888                 if (IN_type_symbol == NULL)
       
 12889                   IN_type_symbol = last_type_symbol;
       
 12890                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12891                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12892                 function_type_prefix = return_type_symbol;
       
 12893                 break;
       
 12894                 
       
 12895             }
       
 12896             
       
 12897             
       
 12898             ERROR;
       
 12899         }
       
 12900         
       
 12901     }/*function_ulint_to_string*/
       
 12902     break;
       
 12903 
       
 12904 /****
       
 12905  *ULINT_TO_LWORD
       
 12906  */
       
 12907     case function_ulint_to_lword :
       
 12908     {
       
 12909         symbol_c *last_type_symbol = NULL;
       
 12910 
       
 12911         {
       
 12912             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12913             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12914             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12915             symbol_c *IN_type_symbol = NULL;
       
 12916             
       
 12917             /* Get the value from a foo(<param_value>) style call */
       
 12918             if (IN_param_value == NULL)
       
 12919               IN_param_value = function_call_param_iterator.next_nf();
       
 12920             if (IN_param_value != NULL) {
       
 12921               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12922               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12923             }
       
 12924             
       
 12925             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12926             {
       
 12927         
       
 12928                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12929                 
       
 12930                 if (IN_type_symbol == NULL)
       
 12931                   IN_type_symbol = last_type_symbol;
       
 12932                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12933                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12934                 function_type_prefix = return_type_symbol;
       
 12935                 function_type_suffix = IN_type_symbol;
       
 12936                 break;
       
 12937                 
       
 12938             }
       
 12939             
       
 12940             
       
 12941             ERROR;
       
 12942         }
       
 12943         
       
 12944     }/*function_ulint_to_lword*/
       
 12945     break;
       
 12946 
       
 12947 /****
       
 12948  *ULINT_TO_UINT
       
 12949  */
       
 12950     case function_ulint_to_uint :
       
 12951     {
       
 12952         symbol_c *last_type_symbol = NULL;
       
 12953 
       
 12954         {
       
 12955             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12956             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12957             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 12958             symbol_c *IN_type_symbol = NULL;
       
 12959             
       
 12960             /* Get the value from a foo(<param_value>) style call */
       
 12961             if (IN_param_value == NULL)
       
 12962               IN_param_value = function_call_param_iterator.next_nf();
       
 12963             if (IN_param_value != NULL) {
       
 12964               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12965               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12966             }
       
 12967             
       
 12968             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12969             {
       
 12970         
       
 12971                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 12972                 
       
 12973                 if (IN_type_symbol == NULL)
       
 12974                   IN_type_symbol = last_type_symbol;
       
 12975                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 12976                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12977                 function_type_prefix = return_type_symbol;
       
 12978                 function_type_suffix = IN_type_symbol;
       
 12979                 break;
       
 12980                 
       
 12981             }
       
 12982             
       
 12983             
       
 12984             ERROR;
       
 12985         }
       
 12986         
       
 12987     }/*function_ulint_to_uint*/
       
 12988     break;
       
 12989 
       
 12990 /****
       
 12991  *ULINT_TO_LREAL
       
 12992  */
       
 12993     case function_ulint_to_lreal :
       
 12994     {
       
 12995         symbol_c *last_type_symbol = NULL;
       
 12996 
       
 12997         {
       
 12998             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 12999             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13000             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13001             symbol_c *IN_type_symbol = NULL;
       
 13002             
       
 13003             /* Get the value from a foo(<param_value>) style call */
       
 13004             if (IN_param_value == NULL)
       
 13005               IN_param_value = function_call_param_iterator.next_nf();
       
 13006             if (IN_param_value != NULL) {
       
 13007               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13008               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13009             }
       
 13010             
       
 13011             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13012             {
       
 13013         
       
 13014                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13015                 
       
 13016                 if (IN_type_symbol == NULL)
       
 13017                   IN_type_symbol = last_type_symbol;
       
 13018                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13019                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13020                 function_type_prefix = return_type_symbol;
       
 13021                 function_type_suffix = IN_type_symbol;
       
 13022                 break;
       
 13023                 
       
 13024             }
       
 13025             
       
 13026             
       
 13027             ERROR;
       
 13028         }
       
 13029         
       
 13030     }/*function_ulint_to_lreal*/
       
 13031     break;
       
 13032 
       
 13033 /****
       
 13034  *ULINT_TO_BYTE
       
 13035  */
       
 13036     case function_ulint_to_byte :
       
 13037     {
       
 13038         symbol_c *last_type_symbol = NULL;
       
 13039 
       
 13040         {
       
 13041             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13042             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13043             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13044             symbol_c *IN_type_symbol = NULL;
       
 13045             
       
 13046             /* Get the value from a foo(<param_value>) style call */
       
 13047             if (IN_param_value == NULL)
       
 13048               IN_param_value = function_call_param_iterator.next_nf();
       
 13049             if (IN_param_value != NULL) {
       
 13050               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13051               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13052             }
       
 13053             
       
 13054             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13055             {
       
 13056         
       
 13057                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13058                 
       
 13059                 if (IN_type_symbol == NULL)
       
 13060                   IN_type_symbol = last_type_symbol;
       
 13061                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13062                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13063                 function_type_prefix = return_type_symbol;
       
 13064                 function_type_suffix = IN_type_symbol;
       
 13065                 break;
       
 13066                 
       
 13067             }
       
 13068             
       
 13069             
       
 13070             ERROR;
       
 13071         }
       
 13072         
       
 13073     }/*function_ulint_to_byte*/
       
 13074     break;
       
 13075 
       
 13076 /****
       
 13077  *ULINT_TO_USINT
       
 13078  */
       
 13079     case function_ulint_to_usint :
       
 13080     {
       
 13081         symbol_c *last_type_symbol = NULL;
       
 13082 
       
 13083         {
       
 13084             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13085             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13086             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13087             symbol_c *IN_type_symbol = NULL;
       
 13088             
       
 13089             /* Get the value from a foo(<param_value>) style call */
       
 13090             if (IN_param_value == NULL)
       
 13091               IN_param_value = function_call_param_iterator.next_nf();
       
 13092             if (IN_param_value != NULL) {
       
 13093               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13094               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13095             }
       
 13096             
       
 13097             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13098             {
       
 13099         
       
 13100                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13101                 
       
 13102                 if (IN_type_symbol == NULL)
       
 13103                   IN_type_symbol = last_type_symbol;
       
 13104                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13105                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13106                 function_type_prefix = return_type_symbol;
       
 13107                 function_type_suffix = IN_type_symbol;
       
 13108                 break;
       
 13109                 
       
 13110             }
       
 13111             
       
 13112             
       
 13113             ERROR;
       
 13114         }
       
 13115         
       
 13116     }/*function_ulint_to_usint*/
       
 13117     break;
       
 13118 
       
 13119 /****
       
 13120  *ULINT_TO_BOOL
       
 13121  */
       
 13122     case function_ulint_to_bool :
       
 13123     {
       
 13124         symbol_c *last_type_symbol = NULL;
       
 13125 
       
 13126         {
       
 13127             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13129             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13130             symbol_c *IN_type_symbol = NULL;
       
 13131             
       
 13132             /* Get the value from a foo(<param_value>) style call */
       
 13133             if (IN_param_value == NULL)
       
 13134               IN_param_value = function_call_param_iterator.next_nf();
       
 13135             if (IN_param_value != NULL) {
       
 13136               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13137               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13138             }
       
 13139             
       
 13140             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13141             {
       
 13142         
       
 13143                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13144                 
       
 13145                 if (IN_type_symbol == NULL)
       
 13146                   IN_type_symbol = last_type_symbol;
       
 13147                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13148                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13149                 function_type_prefix = return_type_symbol;
       
 13150                 function_type_suffix = IN_type_symbol;
       
 13151                 break;
       
 13152                 
       
 13153             }
       
 13154             
       
 13155             
       
 13156             ERROR;
       
 13157         }
       
 13158         
       
 13159     }/*function_ulint_to_bool*/
       
 13160     break;
       
 13161 
       
 13162 /****
       
 13163  *ULINT_TO_TIME
       
 13164  */
       
 13165     case function_ulint_to_time :
       
 13166     {
       
 13167         symbol_c *last_type_symbol = NULL;
       
 13168 
       
 13169         {
       
 13170             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13172             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13173             symbol_c *IN_type_symbol = NULL;
       
 13174             
       
 13175             /* Get the value from a foo(<param_value>) style call */
       
 13176             if (IN_param_value == NULL)
       
 13177               IN_param_value = function_call_param_iterator.next_nf();
       
 13178             if (IN_param_value != NULL) {
       
 13179               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13180               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13181             }
       
 13182             
       
 13183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13184             {
       
 13185         
       
 13186                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13187                 
       
 13188                 if (IN_type_symbol == NULL)
       
 13189                   IN_type_symbol = last_type_symbol;
       
 13190                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13191                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13192                 function_type_prefix = return_type_symbol;
       
 13193                 break;
       
 13194                 
       
 13195             }
       
 13196             
       
 13197             
       
 13198             ERROR;
       
 13199         }
       
 13200         
       
 13201     }/*function_ulint_to_time*/
       
 13202     break;
       
 13203 
       
 13204 /****
       
 13205  *ULINT_TO_INT
       
 13206  */
       
 13207     case function_ulint_to_int :
       
 13208     {
       
 13209         symbol_c *last_type_symbol = NULL;
       
 13210 
       
 13211         {
       
 13212             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13213             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13214             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13215             symbol_c *IN_type_symbol = NULL;
       
 13216             
       
 13217             /* Get the value from a foo(<param_value>) style call */
       
 13218             if (IN_param_value == NULL)
       
 13219               IN_param_value = function_call_param_iterator.next_nf();
       
 13220             if (IN_param_value != NULL) {
       
 13221               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13222               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13223             }
       
 13224             
       
 13225             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13226             {
       
 13227         
       
 13228                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13229                 
       
 13230                 if (IN_type_symbol == NULL)
       
 13231                   IN_type_symbol = last_type_symbol;
       
 13232                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13233                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13234                 function_type_prefix = return_type_symbol;
       
 13235                 function_type_suffix = IN_type_symbol;
       
 13236                 break;
       
 13237                 
       
 13238             }
       
 13239             
       
 13240             
       
 13241             ERROR;
       
 13242         }
       
 13243         
       
 13244     }/*function_ulint_to_int*/
       
 13245     break;
       
 13246 
       
 13247 /****
       
 13248  *BOOL_TO_REAL
       
 13249  */
       
 13250     case function_bool_to_real :
       
 13251     {
       
 13252         symbol_c *last_type_symbol = NULL;
       
 13253 
       
 13254         {
       
 13255             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13257             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13258             symbol_c *IN_type_symbol = NULL;
       
 13259             
       
 13260             /* Get the value from a foo(<param_value>) style call */
       
 13261             if (IN_param_value == NULL)
       
 13262               IN_param_value = function_call_param_iterator.next_nf();
       
 13263             if (IN_param_value != NULL) {
       
 13264               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13265               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13266             }
       
 13267             
       
 13268             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13269             {
       
 13270         
       
 13271                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13272                 
       
 13273                 if (IN_type_symbol == NULL)
       
 13274                   IN_type_symbol = last_type_symbol;
       
 13275                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13276                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 13277                 function_type_prefix = return_type_symbol;
       
 13278                 function_type_suffix = IN_type_symbol;
       
 13279                 break;
       
 13280                 
       
 13281             }
       
 13282             
       
 13283             
       
 13284             ERROR;
       
 13285         }
       
 13286         
       
 13287     }/*function_bool_to_real*/
       
 13288     break;
       
 13289 
       
 13290 /****
       
 13291  *BOOL_TO_SINT
       
 13292  */
       
 13293     case function_bool_to_sint :
       
 13294     {
       
 13295         symbol_c *last_type_symbol = NULL;
       
 13296 
       
 13297         {
       
 13298             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13300             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13301             symbol_c *IN_type_symbol = NULL;
       
 13302             
       
 13303             /* Get the value from a foo(<param_value>) style call */
       
 13304             if (IN_param_value == NULL)
       
 13305               IN_param_value = function_call_param_iterator.next_nf();
       
 13306             if (IN_param_value != NULL) {
       
 13307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13309             }
       
 13310             
       
 13311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13312             {
       
 13313         
       
 13314                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13315                 
       
 13316                 if (IN_type_symbol == NULL)
       
 13317                   IN_type_symbol = last_type_symbol;
       
 13318                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13319                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13320                 function_type_prefix = return_type_symbol;
       
 13321                 function_type_suffix = IN_type_symbol;
       
 13322                 break;
       
 13323                 
       
 13324             }
       
 13325             
       
 13326             
       
 13327             ERROR;
       
 13328         }
       
 13329         
       
 13330     }/*function_bool_to_sint*/
       
 13331     break;
       
 13332 
       
 13333 /****
       
 13334  *BOOL_TO_LINT
       
 13335  */
       
 13336     case function_bool_to_lint :
       
 13337     {
       
 13338         symbol_c *last_type_symbol = NULL;
       
 13339 
       
 13340         {
       
 13341             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13343             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13344             symbol_c *IN_type_symbol = NULL;
       
 13345             
       
 13346             /* Get the value from a foo(<param_value>) style call */
       
 13347             if (IN_param_value == NULL)
       
 13348               IN_param_value = function_call_param_iterator.next_nf();
       
 13349             if (IN_param_value != NULL) {
       
 13350               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13351               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13352             }
       
 13353             
       
 13354             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13355             {
       
 13356         
       
 13357                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13358                 
       
 13359                 if (IN_type_symbol == NULL)
       
 13360                   IN_type_symbol = last_type_symbol;
       
 13361                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13362                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13363                 function_type_prefix = return_type_symbol;
       
 13364                 function_type_suffix = IN_type_symbol;
       
 13365                 break;
       
 13366                 
       
 13367             }
       
 13368             
       
 13369             
       
 13370             ERROR;
       
 13371         }
       
 13372         
       
 13373     }/*function_bool_to_lint*/
       
 13374     break;
       
 13375 
       
 13376 /****
       
 13377  *BOOL_TO_DINT
       
 13378  */
       
 13379     case function_bool_to_dint :
       
 13380     {
       
 13381         symbol_c *last_type_symbol = NULL;
       
 13382 
       
 13383         {
       
 13384             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13386             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13387             symbol_c *IN_type_symbol = NULL;
       
 13388             
       
 13389             /* Get the value from a foo(<param_value>) style call */
       
 13390             if (IN_param_value == NULL)
       
 13391               IN_param_value = function_call_param_iterator.next_nf();
       
 13392             if (IN_param_value != NULL) {
       
 13393               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13394               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13395             }
       
 13396             
       
 13397             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13398             {
       
 13399         
       
 13400                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13401                 
       
 13402                 if (IN_type_symbol == NULL)
       
 13403                   IN_type_symbol = last_type_symbol;
       
 13404                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13405                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13406                 function_type_prefix = return_type_symbol;
       
 13407                 function_type_suffix = IN_type_symbol;
       
 13408                 break;
       
 13409                 
       
 13410             }
       
 13411             
       
 13412             
       
 13413             ERROR;
       
 13414         }
       
 13415         
       
 13416     }/*function_bool_to_dint*/
       
 13417     break;
       
 13418 
       
 13419 /****
       
 13420  *BOOL_TO_DATE
       
 13421  */
       
 13422     case function_bool_to_date :
       
 13423     {
       
 13424         symbol_c *last_type_symbol = NULL;
       
 13425 
       
 13426         {
       
 13427             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13429             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13430             symbol_c *IN_type_symbol = NULL;
       
 13431             
       
 13432             /* Get the value from a foo(<param_value>) style call */
       
 13433             if (IN_param_value == NULL)
       
 13434               IN_param_value = function_call_param_iterator.next_nf();
       
 13435             if (IN_param_value != NULL) {
       
 13436               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13437               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13438             }
       
 13439             
       
 13440             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13441             {
       
 13442         
       
 13443                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13444                 
       
 13445                 if (IN_type_symbol == NULL)
       
 13446                   IN_type_symbol = last_type_symbol;
       
 13447                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13448                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13449                 function_type_prefix = return_type_symbol;
       
 13450                 break;
       
 13451                 
       
 13452             }
       
 13453             
       
 13454             
       
 13455             ERROR;
       
 13456         }
       
 13457         
       
 13458     }/*function_bool_to_date*/
       
 13459     break;
       
 13460 
       
 13461 /****
       
 13462  *BOOL_TO_DWORD
       
 13463  */
       
 13464     case function_bool_to_dword :
       
 13465     {
       
 13466         symbol_c *last_type_symbol = NULL;
       
 13467 
       
 13468         {
       
 13469             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13470             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13471             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13472             symbol_c *IN_type_symbol = NULL;
       
 13473             
       
 13474             /* Get the value from a foo(<param_value>) style call */
       
 13475             if (IN_param_value == NULL)
       
 13476               IN_param_value = function_call_param_iterator.next_nf();
       
 13477             if (IN_param_value != NULL) {
       
 13478               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13479               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13480             }
       
 13481             
       
 13482             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13483             {
       
 13484         
       
 13485                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13486                 
       
 13487                 if (IN_type_symbol == NULL)
       
 13488                   IN_type_symbol = last_type_symbol;
       
 13489                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13490                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13491                 function_type_prefix = return_type_symbol;
       
 13492                 function_type_suffix = IN_type_symbol;
       
 13493                 break;
       
 13494                 
       
 13495             }
       
 13496             
       
 13497             
       
 13498             ERROR;
       
 13499         }
       
 13500         
       
 13501     }/*function_bool_to_dword*/
       
 13502     break;
       
 13503 
       
 13504 /****
       
 13505  *BOOL_TO_DT
       
 13506  */
       
 13507     case function_bool_to_dt :
       
 13508     {
       
 13509         symbol_c *last_type_symbol = NULL;
       
 13510 
       
 13511         {
       
 13512             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13513             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13514             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13515             symbol_c *IN_type_symbol = NULL;
       
 13516             
       
 13517             /* Get the value from a foo(<param_value>) style call */
       
 13518             if (IN_param_value == NULL)
       
 13519               IN_param_value = function_call_param_iterator.next_nf();
       
 13520             if (IN_param_value != NULL) {
       
 13521               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13522               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13523             }
       
 13524             
       
 13525             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13526             {
       
 13527         
       
 13528                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13529                 
       
 13530                 if (IN_type_symbol == NULL)
       
 13531                   IN_type_symbol = last_type_symbol;
       
 13532                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13533                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13534                 function_type_prefix = return_type_symbol;
       
 13535                 break;
       
 13536                 
       
 13537             }
       
 13538             
       
 13539             
       
 13540             ERROR;
       
 13541         }
       
 13542         
       
 13543     }/*function_bool_to_dt*/
       
 13544     break;
       
 13545 
       
 13546 /****
       
 13547  *BOOL_TO_TOD
       
 13548  */
       
 13549     case function_bool_to_tod :
       
 13550     {
       
 13551         symbol_c *last_type_symbol = NULL;
       
 13552 
       
 13553         {
       
 13554             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13556             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13557             symbol_c *IN_type_symbol = NULL;
       
 13558             
       
 13559             /* Get the value from a foo(<param_value>) style call */
       
 13560             if (IN_param_value == NULL)
       
 13561               IN_param_value = function_call_param_iterator.next_nf();
       
 13562             if (IN_param_value != NULL) {
       
 13563               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13564               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13565             }
       
 13566             
       
 13567             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13568             {
       
 13569         
       
 13570                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13571                 
       
 13572                 if (IN_type_symbol == NULL)
       
 13573                   IN_type_symbol = last_type_symbol;
       
 13574                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13575                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13576                 function_type_prefix = return_type_symbol;
       
 13577                 break;
       
 13578                 
       
 13579             }
       
 13580             
       
 13581             
       
 13582             ERROR;
       
 13583         }
       
 13584         
       
 13585     }/*function_bool_to_tod*/
       
 13586     break;
       
 13587 
       
 13588 /****
       
 13589  *BOOL_TO_UDINT
       
 13590  */
       
 13591     case function_bool_to_udint :
       
 13592     {
       
 13593         symbol_c *last_type_symbol = NULL;
       
 13594 
       
 13595         {
       
 13596             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13597             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13598             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13599             symbol_c *IN_type_symbol = NULL;
       
 13600             
       
 13601             /* Get the value from a foo(<param_value>) style call */
       
 13602             if (IN_param_value == NULL)
       
 13603               IN_param_value = function_call_param_iterator.next_nf();
       
 13604             if (IN_param_value != NULL) {
       
 13605               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13606               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13607             }
       
 13608             
       
 13609             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13610             {
       
 13611         
       
 13612                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13613                 
       
 13614                 if (IN_type_symbol == NULL)
       
 13615                   IN_type_symbol = last_type_symbol;
       
 13616                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13617                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13618                 function_type_prefix = return_type_symbol;
       
 13619                 function_type_suffix = IN_type_symbol;
       
 13620                 break;
       
 13621                 
       
 13622             }
       
 13623             
       
 13624             
       
 13625             ERROR;
       
 13626         }
       
 13627         
       
 13628     }/*function_bool_to_udint*/
       
 13629     break;
       
 13630 
       
 13631 /****
       
 13632  *BOOL_TO_WORD
       
 13633  */
       
 13634     case function_bool_to_word :
       
 13635     {
       
 13636         symbol_c *last_type_symbol = NULL;
       
 13637 
       
 13638         {
       
 13639             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13641             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13642             symbol_c *IN_type_symbol = NULL;
       
 13643             
       
 13644             /* Get the value from a foo(<param_value>) style call */
       
 13645             if (IN_param_value == NULL)
       
 13646               IN_param_value = function_call_param_iterator.next_nf();
       
 13647             if (IN_param_value != NULL) {
       
 13648               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13649               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13650             }
       
 13651             
       
 13652             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13653             {
       
 13654         
       
 13655                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13656                 
       
 13657                 if (IN_type_symbol == NULL)
       
 13658                   IN_type_symbol = last_type_symbol;
       
 13659                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13660                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13661                 function_type_prefix = return_type_symbol;
       
 13662                 function_type_suffix = IN_type_symbol;
       
 13663                 break;
       
 13664                 
       
 13665             }
       
 13666             
       
 13667             
       
 13668             ERROR;
       
 13669         }
       
 13670         
       
 13671     }/*function_bool_to_word*/
       
 13672     break;
       
 13673 
       
 13674 /****
       
 13675  *BOOL_TO_STRING
       
 13676  */
       
 13677     case function_bool_to_string :
       
 13678     {
       
 13679         symbol_c *last_type_symbol = NULL;
       
 13680 
       
 13681         {
       
 13682             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13684             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13685             symbol_c *IN_type_symbol = NULL;
       
 13686             
       
 13687             /* Get the value from a foo(<param_value>) style call */
       
 13688             if (IN_param_value == NULL)
       
 13689               IN_param_value = function_call_param_iterator.next_nf();
       
 13690             if (IN_param_value != NULL) {
       
 13691               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13692               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13693             }
       
 13694             
       
 13695             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13696             {
       
 13697         
       
 13698                 function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
       
 13699                 
       
 13700                 if (IN_type_symbol == NULL)
       
 13701                   IN_type_symbol = last_type_symbol;
       
 13702                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13703                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13704                 function_type_prefix = return_type_symbol;
       
 13705                 break;
       
 13706                 
       
 13707             }
       
 13708             
       
 13709             
       
 13710             ERROR;
       
 13711         }
       
 13712         
       
 13713     }/*function_bool_to_string*/
       
 13714     break;
       
 13715 
       
 13716 /****
       
 13717  *BOOL_TO_LWORD
       
 13718  */
       
 13719     case function_bool_to_lword :
       
 13720     {
       
 13721         symbol_c *last_type_symbol = NULL;
       
 13722 
       
 13723         {
       
 13724             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13725             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13726             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13727             symbol_c *IN_type_symbol = NULL;
       
 13728             
       
 13729             /* Get the value from a foo(<param_value>) style call */
       
 13730             if (IN_param_value == NULL)
       
 13731               IN_param_value = function_call_param_iterator.next_nf();
       
 13732             if (IN_param_value != NULL) {
       
 13733               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13734               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13735             }
       
 13736             
       
 13737             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13738             {
       
 13739         
       
 13740                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13741                 
       
 13742                 if (IN_type_symbol == NULL)
       
 13743                   IN_type_symbol = last_type_symbol;
       
 13744                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13745                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13746                 function_type_prefix = return_type_symbol;
       
 13747                 function_type_suffix = IN_type_symbol;
       
 13748                 break;
       
 13749                 
       
 13750             }
       
 13751             
       
 13752             
       
 13753             ERROR;
       
 13754         }
       
 13755         
       
 13756     }/*function_bool_to_lword*/
       
 13757     break;
       
 13758 
       
 13759 /****
       
 13760  *BOOL_TO_UINT
       
 13761  */
       
 13762     case function_bool_to_uint :
       
 13763     {
       
 13764         symbol_c *last_type_symbol = NULL;
       
 13765 
       
 13766         {
       
 13767             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13769             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13770             symbol_c *IN_type_symbol = NULL;
       
 13771             
       
 13772             /* Get the value from a foo(<param_value>) style call */
       
 13773             if (IN_param_value == NULL)
       
 13774               IN_param_value = function_call_param_iterator.next_nf();
       
 13775             if (IN_param_value != NULL) {
       
 13776               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13777               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13778             }
       
 13779             
       
 13780             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13781             {
       
 13782         
       
 13783                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13784                 
       
 13785                 if (IN_type_symbol == NULL)
       
 13786                   IN_type_symbol = last_type_symbol;
       
 13787                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13788                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13789                 function_type_prefix = return_type_symbol;
       
 13790                 function_type_suffix = IN_type_symbol;
       
 13791                 break;
       
 13792                 
       
 13793             }
       
 13794             
       
 13795             
       
 13796             ERROR;
       
 13797         }
       
 13798         
       
 13799     }/*function_bool_to_uint*/
       
 13800     break;
       
 13801 
       
 13802 /****
       
 13803  *BOOL_TO_LREAL
       
 13804  */
       
 13805     case function_bool_to_lreal :
       
 13806     {
       
 13807         symbol_c *last_type_symbol = NULL;
       
 13808 
       
 13809         {
       
 13810             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13812             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13813             symbol_c *IN_type_symbol = NULL;
       
 13814             
       
 13815             /* Get the value from a foo(<param_value>) style call */
       
 13816             if (IN_param_value == NULL)
       
 13817               IN_param_value = function_call_param_iterator.next_nf();
       
 13818             if (IN_param_value != NULL) {
       
 13819               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13820               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13821             }
       
 13822             
       
 13823             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13824             {
       
 13825         
       
 13826                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13827                 
       
 13828                 if (IN_type_symbol == NULL)
       
 13829                   IN_type_symbol = last_type_symbol;
       
 13830                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13831                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13832                 function_type_prefix = return_type_symbol;
       
 13833                 function_type_suffix = IN_type_symbol;
       
 13834                 break;
       
 13835                 
       
 13836             }
       
 13837             
       
 13838             
       
 13839             ERROR;
       
 13840         }
       
 13841         
       
 13842     }/*function_bool_to_lreal*/
       
 13843     break;
       
 13844 
       
 13845 /****
       
 13846  *BOOL_TO_BYTE
       
 13847  */
       
 13848     case function_bool_to_byte :
       
 13849     {
       
 13850         symbol_c *last_type_symbol = NULL;
       
 13851 
       
 13852         {
       
 13853             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13855             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13856             symbol_c *IN_type_symbol = NULL;
       
 13857             
       
 13858             /* Get the value from a foo(<param_value>) style call */
       
 13859             if (IN_param_value == NULL)
       
 13860               IN_param_value = function_call_param_iterator.next_nf();
       
 13861             if (IN_param_value != NULL) {
       
 13862               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13863               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13864             }
       
 13865             
       
 13866             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13867             {
       
 13868         
       
 13869                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13870                 
       
 13871                 if (IN_type_symbol == NULL)
       
 13872                   IN_type_symbol = last_type_symbol;
       
 13873                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13874                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13875                 function_type_prefix = return_type_symbol;
       
 13876                 function_type_suffix = IN_type_symbol;
       
 13877                 break;
       
 13878                 
       
 13879             }
       
 13880             
       
 13881             
       
 13882             ERROR;
       
 13883         }
       
 13884         
       
 13885     }/*function_bool_to_byte*/
       
 13886     break;
       
 13887 
       
 13888 /****
       
 13889  *BOOL_TO_USINT
       
 13890  */
       
 13891     case function_bool_to_usint :
       
 13892     {
       
 13893         symbol_c *last_type_symbol = NULL;
       
 13894 
       
 13895         {
       
 13896             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13897             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13898             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13899             symbol_c *IN_type_symbol = NULL;
       
 13900             
       
 13901             /* Get the value from a foo(<param_value>) style call */
       
 13902             if (IN_param_value == NULL)
       
 13903               IN_param_value = function_call_param_iterator.next_nf();
       
 13904             if (IN_param_value != NULL) {
       
 13905               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13906               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13907             }
       
 13908             
       
 13909             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13910             {
       
 13911         
       
 13912                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13913                 
       
 13914                 if (IN_type_symbol == NULL)
       
 13915                   IN_type_symbol = last_type_symbol;
       
 13916                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13917                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13918                 function_type_prefix = return_type_symbol;
       
 13919                 function_type_suffix = IN_type_symbol;
       
 13920                 break;
       
 13921                 
       
 13922             }
       
 13923             
       
 13924             
       
 13925             ERROR;
       
 13926         }
       
 13927         
       
 13928     }/*function_bool_to_usint*/
       
 13929     break;
       
 13930 
       
 13931 /****
       
 13932  *BOOL_TO_ULINT
       
 13933  */
       
 13934     case function_bool_to_ulint :
       
 13935     {
       
 13936         symbol_c *last_type_symbol = NULL;
       
 13937 
       
 13938         {
       
 13939             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13940             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13941             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13942             symbol_c *IN_type_symbol = NULL;
       
 13943             
       
 13944             /* Get the value from a foo(<param_value>) style call */
       
 13945             if (IN_param_value == NULL)
       
 13946               IN_param_value = function_call_param_iterator.next_nf();
       
 13947             if (IN_param_value != NULL) {
       
 13948               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13949               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13950             }
       
 13951             
       
 13952             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13953             {
       
 13954         
       
 13955                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 13956                 
       
 13957                 if (IN_type_symbol == NULL)
       
 13958                   IN_type_symbol = last_type_symbol;
       
 13959                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 13960                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13961                 function_type_prefix = return_type_symbol;
       
 13962                 function_type_suffix = IN_type_symbol;
       
 13963                 break;
       
 13964                 
       
 13965             }
       
 13966             
       
 13967             
       
 13968             ERROR;
       
 13969         }
       
 13970         
       
 13971     }/*function_bool_to_ulint*/
       
 13972     break;
       
 13973 
       
 13974 /****
       
 13975  *BOOL_TO_TIME
       
 13976  */
       
 13977     case function_bool_to_time :
       
 13978     {
       
 13979         symbol_c *last_type_symbol = NULL;
       
 13980 
       
 13981         {
       
 13982             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 13983             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13984             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 13985             symbol_c *IN_type_symbol = NULL;
       
 13986             
       
 13987             /* Get the value from a foo(<param_value>) style call */
       
 13988             if (IN_param_value == NULL)
       
 13989               IN_param_value = function_call_param_iterator.next_nf();
       
 13990             if (IN_param_value != NULL) {
       
 13991               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13992               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13993             }
       
 13994             
       
 13995             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13996             {
       
 13997         
       
 13998                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 13999                 
       
 14000                 if (IN_type_symbol == NULL)
       
 14001                   IN_type_symbol = last_type_symbol;
       
 14002                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14003                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14004                 function_type_prefix = return_type_symbol;
       
 14005                 break;
       
 14006                 
       
 14007             }
       
 14008             
       
 14009             
       
 14010             ERROR;
       
 14011         }
       
 14012         
       
 14013     }/*function_bool_to_time*/
       
 14014     break;
       
 14015 
       
 14016 /****
       
 14017  *BOOL_TO_INT
       
 14018  */
       
 14019     case function_bool_to_int :
       
 14020     {
       
 14021         symbol_c *last_type_symbol = NULL;
       
 14022 
       
 14023         {
       
 14024             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14025             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14026             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14027             symbol_c *IN_type_symbol = NULL;
       
 14028             
       
 14029             /* Get the value from a foo(<param_value>) style call */
       
 14030             if (IN_param_value == NULL)
       
 14031               IN_param_value = function_call_param_iterator.next_nf();
       
 14032             if (IN_param_value != NULL) {
       
 14033               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14034               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14035             }
       
 14036             
       
 14037             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14038             {
       
 14039         
       
 14040                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14041                 
       
 14042                 if (IN_type_symbol == NULL)
       
 14043                   IN_type_symbol = last_type_symbol;
       
 14044                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14045                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14046                 function_type_prefix = return_type_symbol;
       
 14047                 function_type_suffix = IN_type_symbol;
       
 14048                 break;
       
 14049                 
       
 14050             }
       
 14051             
       
 14052             
       
 14053             ERROR;
       
 14054         }
       
 14055         
       
 14056     }/*function_bool_to_int*/
       
 14057     break;
       
 14058 
       
 14059 /****
       
 14060  *TIME_TO_REAL
       
 14061  */
       
 14062     case function_time_to_real :
       
 14063     {
       
 14064         symbol_c *last_type_symbol = NULL;
       
 14065 
       
 14066         {
       
 14067             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14068             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14069             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14070             symbol_c *IN_type_symbol = NULL;
       
 14071             
       
 14072             /* Get the value from a foo(<param_value>) style call */
       
 14073             if (IN_param_value == NULL)
       
 14074               IN_param_value = function_call_param_iterator.next_nf();
       
 14075             if (IN_param_value != NULL) {
       
 14076               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14077               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14078             }
       
 14079             
       
 14080             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14081             {
       
 14082         
       
 14083                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
 14084                 
       
 14085                 if (IN_type_symbol == NULL)
       
 14086                   IN_type_symbol = last_type_symbol;
       
 14087                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14088                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14089                 function_type_prefix = return_type_symbol;
       
 14090                 break;
       
 14091                 
       
 14092             }
       
 14093             
       
 14094             
       
 14095             ERROR;
       
 14096         }
       
 14097         
       
 14098     }/*function_time_to_real*/
       
 14099     break;
       
 14100 
       
 14101 /****
       
 14102  *TIME_TO_SINT
       
 14103  */
       
 14104     case function_time_to_sint :
       
 14105     {
       
 14106         symbol_c *last_type_symbol = NULL;
       
 14107 
       
 14108         {
       
 14109             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14110             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14111             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14112             symbol_c *IN_type_symbol = NULL;
       
 14113             
       
 14114             /* Get the value from a foo(<param_value>) style call */
       
 14115             if (IN_param_value == NULL)
       
 14116               IN_param_value = function_call_param_iterator.next_nf();
       
 14117             if (IN_param_value != NULL) {
       
 14118               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14119               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14120             }
       
 14121             
       
 14122             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14123             {
       
 14124         
       
 14125                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14126                 
       
 14127                 if (IN_type_symbol == NULL)
       
 14128                   IN_type_symbol = last_type_symbol;
       
 14129                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14130                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14131                 function_type_prefix = return_type_symbol;
       
 14132                 break;
       
 14133                 
       
 14134             }
       
 14135             
       
 14136             
       
 14137             ERROR;
       
 14138         }
       
 14139         
       
 14140     }/*function_time_to_sint*/
       
 14141     break;
       
 14142 
       
 14143 /****
       
 14144  *TIME_TO_LINT
       
 14145  */
       
 14146     case function_time_to_lint :
       
 14147     {
       
 14148         symbol_c *last_type_symbol = NULL;
       
 14149 
       
 14150         {
       
 14151             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14153             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14154             symbol_c *IN_type_symbol = NULL;
       
 14155             
       
 14156             /* Get the value from a foo(<param_value>) style call */
       
 14157             if (IN_param_value == NULL)
       
 14158               IN_param_value = function_call_param_iterator.next_nf();
       
 14159             if (IN_param_value != NULL) {
       
 14160               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14161               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14162             }
       
 14163             
       
 14164             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14165             {
       
 14166         
       
 14167                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14168                 
       
 14169                 if (IN_type_symbol == NULL)
       
 14170                   IN_type_symbol = last_type_symbol;
       
 14171                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14172                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14173                 function_type_prefix = return_type_symbol;
       
 14174                 break;
       
 14175                 
       
 14176             }
       
 14177             
       
 14178             
       
 14179             ERROR;
       
 14180         }
       
 14181         
       
 14182     }/*function_time_to_lint*/
       
 14183     break;
       
 14184 
       
 14185 /****
       
 14186  *TIME_TO_DINT
       
 14187  */
       
 14188     case function_time_to_dint :
       
 14189     {
       
 14190         symbol_c *last_type_symbol = NULL;
       
 14191 
       
 14192         {
       
 14193             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14194             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14195             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14196             symbol_c *IN_type_symbol = NULL;
       
 14197             
       
 14198             /* Get the value from a foo(<param_value>) style call */
       
 14199             if (IN_param_value == NULL)
       
 14200               IN_param_value = function_call_param_iterator.next_nf();
       
 14201             if (IN_param_value != NULL) {
       
 14202               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14203               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14204             }
       
 14205             
       
 14206             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14207             {
       
 14208         
       
 14209                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14210                 
       
 14211                 if (IN_type_symbol == NULL)
       
 14212                   IN_type_symbol = last_type_symbol;
       
 14213                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14214                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14215                 function_type_prefix = return_type_symbol;
       
 14216                 break;
       
 14217                 
       
 14218             }
       
 14219             
       
 14220             
       
 14221             ERROR;
       
 14222         }
       
 14223         
       
 14224     }/*function_time_to_dint*/
       
 14225     break;
       
 14226 
       
 14227 /****
       
 14228  *TIME_TO_DWORD
       
 14229  */
       
 14230     case function_time_to_dword :
       
 14231     {
       
 14232         symbol_c *last_type_symbol = NULL;
       
 14233 
       
 14234         {
       
 14235             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14236             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14237             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14238             symbol_c *IN_type_symbol = NULL;
       
 14239             
       
 14240             /* Get the value from a foo(<param_value>) style call */
       
 14241             if (IN_param_value == NULL)
       
 14242               IN_param_value = function_call_param_iterator.next_nf();
       
 14243             if (IN_param_value != NULL) {
       
 14244               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14245               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14246             }
       
 14247             
       
 14248             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14249             {
       
 14250         
       
 14251                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14252                 
       
 14253                 if (IN_type_symbol == NULL)
       
 14254                   IN_type_symbol = last_type_symbol;
       
 14255                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14256                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 14257                 function_type_prefix = return_type_symbol;
       
 14258                 break;
       
 14259                 
       
 14260             }
       
 14261             
       
 14262             
       
 14263             ERROR;
       
 14264         }
       
 14265         
       
 14266     }/*function_time_to_dword*/
       
 14267     break;
       
 14268 
       
 14269 /****
       
 14270  *TIME_TO_UDINT
       
 14271  */
       
 14272     case function_time_to_udint :
       
 14273     {
       
 14274         symbol_c *last_type_symbol = NULL;
       
 14275 
       
 14276         {
       
 14277             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14278             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14279             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14280             symbol_c *IN_type_symbol = NULL;
       
 14281             
       
 14282             /* Get the value from a foo(<param_value>) style call */
       
 14283             if (IN_param_value == NULL)
       
 14284               IN_param_value = function_call_param_iterator.next_nf();
       
 14285             if (IN_param_value != NULL) {
       
 14286               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14287               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14288             }
       
 14289             
       
 14290             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14291             {
       
 14292         
       
 14293                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14294                 
       
 14295                 if (IN_type_symbol == NULL)
       
 14296                   IN_type_symbol = last_type_symbol;
       
 14297                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14298                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14299                 function_type_prefix = return_type_symbol;
       
 14300                 break;
       
 14301                 
       
 14302             }
       
 14303             
       
 14304             
       
 14305             ERROR;
       
 14306         }
       
 14307         
       
 14308     }/*function_time_to_udint*/
       
 14309     break;
       
 14310 
       
 14311 /****
       
 14312  *TIME_TO_WORD
       
 14313  */
       
 14314     case function_time_to_word :
       
 14315     {
       
 14316         symbol_c *last_type_symbol = NULL;
       
 14317 
       
 14318         {
       
 14319             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14321             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14322             symbol_c *IN_type_symbol = NULL;
       
 14323             
       
 14324             /* Get the value from a foo(<param_value>) style call */
       
 14325             if (IN_param_value == NULL)
       
 14326               IN_param_value = function_call_param_iterator.next_nf();
       
 14327             if (IN_param_value != NULL) {
       
 14328               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14329               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14330             }
       
 14331             
       
 14332             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14333             {
       
 14334         
       
 14335                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14336                 
       
 14337                 if (IN_type_symbol == NULL)
       
 14338                   IN_type_symbol = last_type_symbol;
       
 14339                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14340                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14341                 function_type_prefix = return_type_symbol;
       
 14342                 break;
       
 14343                 
       
 14344             }
       
 14345             
       
 14346             
       
 14347             ERROR;
       
 14348         }
       
 14349         
       
 14350     }/*function_time_to_word*/
       
 14351     break;
       
 14352 
       
 14353 /****
       
 14354  *TIME_TO_STRING
       
 14355  */
       
 14356     case function_time_to_string :
       
 14357     {
       
 14358         symbol_c *last_type_symbol = NULL;
       
 14359 
       
 14360         {
       
 14361             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14363             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14364             symbol_c *IN_type_symbol = NULL;
       
 14365             
       
 14366             /* Get the value from a foo(<param_value>) style call */
       
 14367             if (IN_param_value == NULL)
       
 14368               IN_param_value = function_call_param_iterator.next_nf();
       
 14369             if (IN_param_value != NULL) {
       
 14370               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14371               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14372             }
       
 14373             
       
 14374             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14375             {
       
 14376         
       
 14377                 function_name = (symbol_c*)(new pragma_c("__time_to_string"));
       
 14378                 
       
 14379                 if (IN_type_symbol == NULL)
       
 14380                   IN_type_symbol = last_type_symbol;
       
 14381                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14382                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14383                 function_type_prefix = return_type_symbol;
       
 14384                 break;
       
 14385                 
       
 14386             }
       
 14387             
       
 14388             
       
 14389             ERROR;
       
 14390         }
       
 14391         
       
 14392     }/*function_time_to_string*/
       
 14393     break;
       
 14394 
       
 14395 /****
       
 14396  *TIME_TO_LWORD
       
 14397  */
       
 14398     case function_time_to_lword :
       
 14399     {
       
 14400         symbol_c *last_type_symbol = NULL;
       
 14401 
       
 14402         {
       
 14403             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14404             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14405             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14406             symbol_c *IN_type_symbol = NULL;
       
 14407             
       
 14408             /* Get the value from a foo(<param_value>) style call */
       
 14409             if (IN_param_value == NULL)
       
 14410               IN_param_value = function_call_param_iterator.next_nf();
       
 14411             if (IN_param_value != NULL) {
       
 14412               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14413               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14414             }
       
 14415             
       
 14416             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14417             {
       
 14418         
       
 14419                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14420                 
       
 14421                 if (IN_type_symbol == NULL)
       
 14422                   IN_type_symbol = last_type_symbol;
       
 14423                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14424                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 14425                 function_type_prefix = return_type_symbol;
       
 14426                 break;
       
 14427                 
       
 14428             }
       
 14429             
       
 14430             
       
 14431             ERROR;
       
 14432         }
       
 14433         
       
 14434     }/*function_time_to_lword*/
       
 14435     break;
       
 14436 
       
 14437 /****
       
 14438  *TIME_TO_UINT
       
 14439  */
       
 14440     case function_time_to_uint :
       
 14441     {
       
 14442         symbol_c *last_type_symbol = NULL;
       
 14443 
       
 14444         {
       
 14445             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14446             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14447             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14448             symbol_c *IN_type_symbol = NULL;
       
 14449             
       
 14450             /* Get the value from a foo(<param_value>) style call */
       
 14451             if (IN_param_value == NULL)
       
 14452               IN_param_value = function_call_param_iterator.next_nf();
       
 14453             if (IN_param_value != NULL) {
       
 14454               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14455               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14456             }
       
 14457             
       
 14458             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14459             {
       
 14460         
       
 14461                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14462                 
       
 14463                 if (IN_type_symbol == NULL)
       
 14464                   IN_type_symbol = last_type_symbol;
       
 14465                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14466                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14467                 function_type_prefix = return_type_symbol;
       
 14468                 break;
       
 14469                 
       
 14470             }
       
 14471             
       
 14472             
       
 14473             ERROR;
       
 14474         }
       
 14475         
       
 14476     }/*function_time_to_uint*/
       
 14477     break;
       
 14478 
       
 14479 /****
       
 14480  *TIME_TO_LREAL
       
 14481  */
       
 14482     case function_time_to_lreal :
       
 14483     {
       
 14484         symbol_c *last_type_symbol = NULL;
       
 14485 
       
 14486         {
       
 14487             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14489             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14490             symbol_c *IN_type_symbol = NULL;
       
 14491             
       
 14492             /* Get the value from a foo(<param_value>) style call */
       
 14493             if (IN_param_value == NULL)
       
 14494               IN_param_value = function_call_param_iterator.next_nf();
       
 14495             if (IN_param_value != NULL) {
       
 14496               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14497               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14498             }
       
 14499             
       
 14500             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14501             {
       
 14502         
       
 14503                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
 14504                 
       
 14505                 if (IN_type_symbol == NULL)
       
 14506                   IN_type_symbol = last_type_symbol;
       
 14507                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14508                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14509                 function_type_prefix = return_type_symbol;
       
 14510                 break;
       
 14511                 
       
 14512             }
       
 14513             
       
 14514             
       
 14515             ERROR;
       
 14516         }
       
 14517         
       
 14518     }/*function_time_to_lreal*/
       
 14519     break;
       
 14520 
       
 14521 /****
       
 14522  *TIME_TO_BYTE
       
 14523  */
       
 14524     case function_time_to_byte :
       
 14525     {
       
 14526         symbol_c *last_type_symbol = NULL;
       
 14527 
       
 14528         {
       
 14529             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14531             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14532             symbol_c *IN_type_symbol = NULL;
       
 14533             
       
 14534             /* Get the value from a foo(<param_value>) style call */
       
 14535             if (IN_param_value == NULL)
       
 14536               IN_param_value = function_call_param_iterator.next_nf();
       
 14537             if (IN_param_value != NULL) {
       
 14538               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14539               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14540             }
       
 14541             
       
 14542             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14543             {
       
 14544         
       
 14545                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14546                 
       
 14547                 if (IN_type_symbol == NULL)
       
 14548                   IN_type_symbol = last_type_symbol;
       
 14549                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14550                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 14551                 function_type_prefix = return_type_symbol;
       
 14552                 break;
       
 14553                 
       
 14554             }
       
 14555             
       
 14556             
       
 14557             ERROR;
       
 14558         }
       
 14559         
       
 14560     }/*function_time_to_byte*/
       
 14561     break;
       
 14562 
       
 14563 /****
       
 14564  *TIME_TO_USINT
       
 14565  */
       
 14566     case function_time_to_usint :
       
 14567     {
       
 14568         symbol_c *last_type_symbol = NULL;
       
 14569 
       
 14570         {
       
 14571             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14572             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14573             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14574             symbol_c *IN_type_symbol = NULL;
       
 14575             
       
 14576             /* Get the value from a foo(<param_value>) style call */
       
 14577             if (IN_param_value == NULL)
       
 14578               IN_param_value = function_call_param_iterator.next_nf();
       
 14579             if (IN_param_value != NULL) {
       
 14580               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14581               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14582             }
       
 14583             
       
 14584             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14585             {
       
 14586         
       
 14587                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14588                 
       
 14589                 if (IN_type_symbol == NULL)
       
 14590                   IN_type_symbol = last_type_symbol;
       
 14591                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14592                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 14593                 function_type_prefix = return_type_symbol;
       
 14594                 break;
       
 14595                 
       
 14596             }
       
 14597             
       
 14598             
       
 14599             ERROR;
       
 14600         }
       
 14601         
       
 14602     }/*function_time_to_usint*/
       
 14603     break;
       
 14604 
       
 14605 /****
       
 14606  *TIME_TO_ULINT
       
 14607  */
       
 14608     case function_time_to_ulint :
       
 14609     {
       
 14610         symbol_c *last_type_symbol = NULL;
       
 14611 
       
 14612         {
       
 14613             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14614             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14615             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14616             symbol_c *IN_type_symbol = NULL;
       
 14617             
       
 14618             /* Get the value from a foo(<param_value>) style call */
       
 14619             if (IN_param_value == NULL)
       
 14620               IN_param_value = function_call_param_iterator.next_nf();
       
 14621             if (IN_param_value != NULL) {
       
 14622               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14623               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14624             }
       
 14625             
       
 14626             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14627             {
       
 14628         
       
 14629                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14630                 
       
 14631                 if (IN_type_symbol == NULL)
       
 14632                   IN_type_symbol = last_type_symbol;
       
 14633                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14634                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14635                 function_type_prefix = return_type_symbol;
       
 14636                 break;
       
 14637                 
       
 14638             }
       
 14639             
       
 14640             
       
 14641             ERROR;
       
 14642         }
       
 14643         
       
 14644     }/*function_time_to_ulint*/
       
 14645     break;
       
 14646 
       
 14647 /****
       
 14648  *TIME_TO_INT
       
 14649  */
       
 14650     case function_time_to_int :
       
 14651     {
       
 14652         symbol_c *last_type_symbol = NULL;
       
 14653 
       
 14654         {
       
 14655             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14657             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14658             symbol_c *IN_type_symbol = NULL;
       
 14659             
       
 14660             /* Get the value from a foo(<param_value>) style call */
       
 14661             if (IN_param_value == NULL)
       
 14662               IN_param_value = function_call_param_iterator.next_nf();
       
 14663             if (IN_param_value != NULL) {
       
 14664               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14665               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14666             }
       
 14667             
       
 14668             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14669             {
       
 14670         
       
 14671                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
 14672                 
       
 14673                 if (IN_type_symbol == NULL)
       
 14674                   IN_type_symbol = last_type_symbol;
       
 14675                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14676                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14677                 function_type_prefix = return_type_symbol;
       
 14678                 break;
       
 14679                 
       
 14680             }
       
 14681             
       
 14682             
       
 14683             ERROR;
       
 14684         }
       
 14685         
       
 14686     }/*function_time_to_int*/
       
 14687     break;
       
 14688 
       
 14689 /****
       
 14690  *INT_TO_REAL
       
 14691  */
       
 14692     case function_int_to_real :
       
 14693     {
       
 14694         symbol_c *last_type_symbol = NULL;
       
 14695 
       
 14696         {
       
 14697             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14698             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14699             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14700             symbol_c *IN_type_symbol = NULL;
       
 14701             
       
 14702             /* Get the value from a foo(<param_value>) style call */
       
 14703             if (IN_param_value == NULL)
       
 14704               IN_param_value = function_call_param_iterator.next_nf();
       
 14705             if (IN_param_value != NULL) {
       
 14706               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14707               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14708             }
       
 14709             
       
 14710             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14711             {
       
 14712         
       
 14713                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14714                 
       
 14715                 if (IN_type_symbol == NULL)
       
 14716                   IN_type_symbol = last_type_symbol;
       
 14717                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14718                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14719                 function_type_prefix = return_type_symbol;
       
 14720                 function_type_suffix = IN_type_symbol;
       
 14721                 break;
       
 14722                 
       
 14723             }
       
 14724             
       
 14725             
       
 14726             ERROR;
       
 14727         }
       
 14728         
       
 14729     }/*function_int_to_real*/
       
 14730     break;
       
 14731 
       
 14732 /****
       
 14733  *INT_TO_SINT
       
 14734  */
       
 14735     case function_int_to_sint :
       
 14736     {
       
 14737         symbol_c *last_type_symbol = NULL;
       
 14738 
       
 14739         {
       
 14740             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14741             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14742             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14743             symbol_c *IN_type_symbol = NULL;
       
 14744             
       
 14745             /* Get the value from a foo(<param_value>) style call */
       
 14746             if (IN_param_value == NULL)
       
 14747               IN_param_value = function_call_param_iterator.next_nf();
       
 14748             if (IN_param_value != NULL) {
       
 14749               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14750               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14751             }
       
 14752             
       
 14753             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14754             {
       
 14755         
       
 14756                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14757                 
       
 14758                 if (IN_type_symbol == NULL)
       
 14759                   IN_type_symbol = last_type_symbol;
       
 14760                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14761                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14762                 function_type_prefix = return_type_symbol;
       
 14763                 function_type_suffix = IN_type_symbol;
       
 14764                 break;
       
 14765                 
       
 14766             }
       
 14767             
       
 14768             
       
 14769             ERROR;
       
 14770         }
       
 14771         
       
 14772     }/*function_int_to_sint*/
       
 14773     break;
       
 14774 
       
 14775 /****
       
 14776  *INT_TO_LINT
       
 14777  */
       
 14778     case function_int_to_lint :
       
 14779     {
       
 14780         symbol_c *last_type_symbol = NULL;
       
 14781 
       
 14782         {
       
 14783             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14785             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14786             symbol_c *IN_type_symbol = NULL;
       
 14787             
       
 14788             /* Get the value from a foo(<param_value>) style call */
       
 14789             if (IN_param_value == NULL)
       
 14790               IN_param_value = function_call_param_iterator.next_nf();
       
 14791             if (IN_param_value != NULL) {
       
 14792               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14793               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14794             }
       
 14795             
       
 14796             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14797             {
       
 14798         
       
 14799                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14800                 
       
 14801                 if (IN_type_symbol == NULL)
       
 14802                   IN_type_symbol = last_type_symbol;
       
 14803                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14804                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14805                 function_type_prefix = return_type_symbol;
       
 14806                 function_type_suffix = IN_type_symbol;
       
 14807                 break;
       
 14808                 
       
 14809             }
       
 14810             
       
 14811             
       
 14812             ERROR;
       
 14813         }
       
 14814         
       
 14815     }/*function_int_to_lint*/
       
 14816     break;
       
 14817 
       
 14818 /****
       
 14819  *INT_TO_DINT
       
 14820  */
       
 14821     case function_int_to_dint :
       
 14822     {
       
 14823         symbol_c *last_type_symbol = NULL;
       
 14824 
       
 14825         {
       
 14826             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14828             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14829             symbol_c *IN_type_symbol = NULL;
       
 14830             
       
 14831             /* Get the value from a foo(<param_value>) style call */
       
 14832             if (IN_param_value == NULL)
       
 14833               IN_param_value = function_call_param_iterator.next_nf();
       
 14834             if (IN_param_value != NULL) {
       
 14835               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14836               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14837             }
       
 14838             
       
 14839             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14840             {
       
 14841         
       
 14842                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14843                 
       
 14844                 if (IN_type_symbol == NULL)
       
 14845                   IN_type_symbol = last_type_symbol;
       
 14846                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14847                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14848                 function_type_prefix = return_type_symbol;
       
 14849                 function_type_suffix = IN_type_symbol;
       
 14850                 break;
       
 14851                 
       
 14852             }
       
 14853             
       
 14854             
       
 14855             ERROR;
       
 14856         }
       
 14857         
       
 14858     }/*function_int_to_dint*/
       
 14859     break;
       
 14860 
       
 14861 /****
       
 14862  *INT_TO_DATE
       
 14863  */
       
 14864     case function_int_to_date :
       
 14865     {
       
 14866         symbol_c *last_type_symbol = NULL;
       
 14867 
       
 14868         {
       
 14869             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14870             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14871             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14872             symbol_c *IN_type_symbol = NULL;
       
 14873             
       
 14874             /* Get the value from a foo(<param_value>) style call */
       
 14875             if (IN_param_value == NULL)
       
 14876               IN_param_value = function_call_param_iterator.next_nf();
       
 14877             if (IN_param_value != NULL) {
       
 14878               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14879               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14880             }
       
 14881             
       
 14882             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14883             {
       
 14884         
       
 14885                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 14886                 
       
 14887                 if (IN_type_symbol == NULL)
       
 14888                   IN_type_symbol = last_type_symbol;
       
 14889                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14890                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 14891                 function_type_prefix = return_type_symbol;
       
 14892                 break;
       
 14893                 
       
 14894             }
       
 14895             
       
 14896             
       
 14897             ERROR;
       
 14898         }
       
 14899         
       
 14900     }/*function_int_to_date*/
       
 14901     break;
       
 14902 
       
 14903 /****
       
 14904  *INT_TO_DWORD
       
 14905  */
       
 14906     case function_int_to_dword :
       
 14907     {
       
 14908         symbol_c *last_type_symbol = NULL;
       
 14909 
       
 14910         {
       
 14911             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14913             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14914             symbol_c *IN_type_symbol = NULL;
       
 14915             
       
 14916             /* Get the value from a foo(<param_value>) style call */
       
 14917             if (IN_param_value == NULL)
       
 14918               IN_param_value = function_call_param_iterator.next_nf();
       
 14919             if (IN_param_value != NULL) {
       
 14920               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14921               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14922             }
       
 14923             
       
 14924             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14925             {
       
 14926         
       
 14927                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 14928                 
       
 14929                 if (IN_type_symbol == NULL)
       
 14930                   IN_type_symbol = last_type_symbol;
       
 14931                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14932                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 14933                 function_type_prefix = return_type_symbol;
       
 14934                 function_type_suffix = IN_type_symbol;
       
 14935                 break;
       
 14936                 
       
 14937             }
       
 14938             
       
 14939             
       
 14940             ERROR;
       
 14941         }
       
 14942         
       
 14943     }/*function_int_to_dword*/
       
 14944     break;
       
 14945 
       
 14946 /****
       
 14947  *INT_TO_DT
       
 14948  */
       
 14949     case function_int_to_dt :
       
 14950     {
       
 14951         symbol_c *last_type_symbol = NULL;
       
 14952 
       
 14953         {
       
 14954             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14955             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14956             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14957             symbol_c *IN_type_symbol = NULL;
       
 14958             
       
 14959             /* Get the value from a foo(<param_value>) style call */
       
 14960             if (IN_param_value == NULL)
       
 14961               IN_param_value = function_call_param_iterator.next_nf();
       
 14962             if (IN_param_value != NULL) {
       
 14963               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14964               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14965             }
       
 14966             
       
 14967             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 14968             {
       
 14969         
       
 14970                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 14971                 
       
 14972                 if (IN_type_symbol == NULL)
       
 14973                   IN_type_symbol = last_type_symbol;
       
 14974                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 14975                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14976                 function_type_prefix = return_type_symbol;
       
 14977                 break;
       
 14978                 
       
 14979             }
       
 14980             
       
 14981             
       
 14982             ERROR;
       
 14983         }
       
 14984         
       
 14985     }/*function_int_to_dt*/
       
 14986     break;
       
 14987 
       
 14988 /****
       
 14989  *INT_TO_TOD
       
 14990  */
       
 14991     case function_int_to_tod :
       
 14992     {
       
 14993         symbol_c *last_type_symbol = NULL;
       
 14994 
       
 14995         {
       
 14996             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14997             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14998             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14999             symbol_c *IN_type_symbol = NULL;
       
 15000             
       
 15001             /* Get the value from a foo(<param_value>) style call */
       
 15002             if (IN_param_value == NULL)
       
 15003               IN_param_value = function_call_param_iterator.next_nf();
       
 15004             if (IN_param_value != NULL) {
       
 15005               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15006               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15007             }
       
 15008             
       
 15009             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15010             {
       
 15011         
       
 15012                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 15013                 
       
 15014                 if (IN_type_symbol == NULL)
       
 15015                   IN_type_symbol = last_type_symbol;
       
 15016                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15017                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15018                 function_type_prefix = return_type_symbol;
       
 15019                 break;
       
 15020                 
       
 15021             }
       
 15022             
       
 15023             
       
 15024             ERROR;
       
 15025         }
       
 15026         
       
 15027     }/*function_int_to_tod*/
       
 15028     break;
       
 15029 
       
 15030 /****
       
 15031  *INT_TO_UDINT
       
 15032  */
       
 15033     case function_int_to_udint :
       
 15034     {
       
 15035         symbol_c *last_type_symbol = NULL;
       
 15036 
       
 15037         {
       
 15038             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15040             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15041             symbol_c *IN_type_symbol = NULL;
       
 15042             
       
 15043             /* Get the value from a foo(<param_value>) style call */
       
 15044             if (IN_param_value == NULL)
       
 15045               IN_param_value = function_call_param_iterator.next_nf();
       
 15046             if (IN_param_value != NULL) {
       
 15047               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15048               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15049             }
       
 15050             
       
 15051             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15052             {
       
 15053         
       
 15054                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15055                 
       
 15056                 if (IN_type_symbol == NULL)
       
 15057                   IN_type_symbol = last_type_symbol;
       
 15058                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15059                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15060                 function_type_prefix = return_type_symbol;
       
 15061                 function_type_suffix = IN_type_symbol;
       
 15062                 break;
       
 15063                 
       
 15064             }
       
 15065             
       
 15066             
       
 15067             ERROR;
       
 15068         }
       
 15069         
       
 15070     }/*function_int_to_udint*/
       
 15071     break;
       
 15072 
       
 15073 /****
       
 15074  *INT_TO_WORD
       
 15075  */
       
 15076     case function_int_to_word :
       
 15077     {
       
 15078         symbol_c *last_type_symbol = NULL;
       
 15079 
       
 15080         {
       
 15081             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15082             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15083             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15084             symbol_c *IN_type_symbol = NULL;
       
 15085             
       
 15086             /* Get the value from a foo(<param_value>) style call */
       
 15087             if (IN_param_value == NULL)
       
 15088               IN_param_value = function_call_param_iterator.next_nf();
       
 15089             if (IN_param_value != NULL) {
       
 15090               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15091               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15092             }
       
 15093             
       
 15094             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15095             {
       
 15096         
       
 15097                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15098                 
       
 15099                 if (IN_type_symbol == NULL)
       
 15100                   IN_type_symbol = last_type_symbol;
       
 15101                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15102                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15103                 function_type_prefix = return_type_symbol;
       
 15104                 function_type_suffix = IN_type_symbol;
       
 15105                 break;
       
 15106                 
       
 15107             }
       
 15108             
       
 15109             
       
 15110             ERROR;
       
 15111         }
       
 15112         
       
 15113     }/*function_int_to_word*/
       
 15114     break;
       
 15115 
       
 15116 /****
       
 15117  *INT_TO_STRING
       
 15118  */
       
 15119     case function_int_to_string :
       
 15120     {
       
 15121         symbol_c *last_type_symbol = NULL;
       
 15122 
       
 15123         {
       
 15124             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15125             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15126             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15127             symbol_c *IN_type_symbol = NULL;
       
 15128             
       
 15129             /* Get the value from a foo(<param_value>) style call */
       
 15130             if (IN_param_value == NULL)
       
 15131               IN_param_value = function_call_param_iterator.next_nf();
       
 15132             if (IN_param_value != NULL) {
       
 15133               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15134               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15135             }
       
 15136             
       
 15137             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15138             {
       
 15139         
       
 15140                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
 15141                 
       
 15142                 if (IN_type_symbol == NULL)
       
 15143                   IN_type_symbol = last_type_symbol;
       
 15144                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15145                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15146                 function_type_prefix = return_type_symbol;
       
 15147                 break;
       
 15148                 
       
 15149             }
       
 15150             
       
 15151             
       
 15152             ERROR;
       
 15153         }
       
 15154         
       
 15155     }/*function_int_to_string*/
       
 15156     break;
       
 15157 
       
 15158 /****
       
 15159  *INT_TO_LWORD
       
 15160  */
       
 15161     case function_int_to_lword :
       
 15162     {
       
 15163         symbol_c *last_type_symbol = NULL;
       
 15164 
       
 15165         {
       
 15166             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15168             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15169             symbol_c *IN_type_symbol = NULL;
       
 15170             
       
 15171             /* Get the value from a foo(<param_value>) style call */
       
 15172             if (IN_param_value == NULL)
       
 15173               IN_param_value = function_call_param_iterator.next_nf();
       
 15174             if (IN_param_value != NULL) {
       
 15175               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15176               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15177             }
       
 15178             
       
 15179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15180             {
       
 15181         
       
 15182                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15183                 
       
 15184                 if (IN_type_symbol == NULL)
       
 15185                   IN_type_symbol = last_type_symbol;
       
 15186                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15187                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15188                 function_type_prefix = return_type_symbol;
       
 15189                 function_type_suffix = IN_type_symbol;
       
 15190                 break;
       
 15191                 
       
 15192             }
       
 15193             
       
 15194             
       
 15195             ERROR;
       
 15196         }
       
 15197         
       
 15198     }/*function_int_to_lword*/
       
 15199     break;
       
 15200 
       
 15201 /****
       
 15202  *INT_TO_UINT
       
 15203  */
       
 15204     case function_int_to_uint :
       
 15205     {
       
 15206         symbol_c *last_type_symbol = NULL;
       
 15207 
       
 15208         {
       
 15209             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15210             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15211             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15212             symbol_c *IN_type_symbol = NULL;
       
 15213             
       
 15214             /* Get the value from a foo(<param_value>) style call */
       
 15215             if (IN_param_value == NULL)
       
 15216               IN_param_value = function_call_param_iterator.next_nf();
       
 15217             if (IN_param_value != NULL) {
       
 15218               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15219               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15220             }
       
 15221             
       
 15222             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15223             {
       
 15224         
       
 15225                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15226                 
       
 15227                 if (IN_type_symbol == NULL)
       
 15228                   IN_type_symbol = last_type_symbol;
       
 15229                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15230                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15231                 function_type_prefix = return_type_symbol;
       
 15232                 function_type_suffix = IN_type_symbol;
       
 15233                 break;
       
 15234                 
       
 15235             }
       
 15236             
       
 15237             
       
 15238             ERROR;
       
 15239         }
       
 15240         
       
 15241     }/*function_int_to_uint*/
       
 15242     break;
       
 15243 
       
 15244 /****
       
 15245  *INT_TO_LREAL
       
 15246  */
       
 15247     case function_int_to_lreal :
       
 15248     {
       
 15249         symbol_c *last_type_symbol = NULL;
       
 15250 
       
 15251         {
       
 15252             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15253             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15254             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15255             symbol_c *IN_type_symbol = NULL;
       
 15256             
       
 15257             /* Get the value from a foo(<param_value>) style call */
       
 15258             if (IN_param_value == NULL)
       
 15259               IN_param_value = function_call_param_iterator.next_nf();
       
 15260             if (IN_param_value != NULL) {
       
 15261               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15262               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15263             }
       
 15264             
       
 15265             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15266             {
       
 15267         
       
 15268                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15269                 
       
 15270                 if (IN_type_symbol == NULL)
       
 15271                   IN_type_symbol = last_type_symbol;
       
 15272                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15273                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15274                 function_type_prefix = return_type_symbol;
       
 15275                 function_type_suffix = IN_type_symbol;
       
 15276                 break;
       
 15277                 
       
 15278             }
       
 15279             
       
 15280             
       
 15281             ERROR;
       
 15282         }
       
 15283         
       
 15284     }/*function_int_to_lreal*/
       
 15285     break;
       
 15286 
       
 15287 /****
       
 15288  *INT_TO_BYTE
       
 15289  */
       
 15290     case function_int_to_byte :
       
 15291     {
       
 15292         symbol_c *last_type_symbol = NULL;
       
 15293 
       
 15294         {
       
 15295             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15297             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15298             symbol_c *IN_type_symbol = NULL;
       
 15299             
       
 15300             /* Get the value from a foo(<param_value>) style call */
       
 15301             if (IN_param_value == NULL)
       
 15302               IN_param_value = function_call_param_iterator.next_nf();
       
 15303             if (IN_param_value != NULL) {
       
 15304               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15305               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15306             }
       
 15307             
       
 15308             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15309             {
       
 15310         
       
 15311                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15312                 
       
 15313                 if (IN_type_symbol == NULL)
       
 15314                   IN_type_symbol = last_type_symbol;
       
 15315                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15316                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15317                 function_type_prefix = return_type_symbol;
       
 15318                 function_type_suffix = IN_type_symbol;
       
 15319                 break;
       
 15320                 
       
 15321             }
       
 15322             
       
 15323             
       
 15324             ERROR;
       
 15325         }
       
 15326         
       
 15327     }/*function_int_to_byte*/
       
 15328     break;
       
 15329 
       
 15330 /****
       
 15331  *INT_TO_USINT
       
 15332  */
       
 15333     case function_int_to_usint :
       
 15334     {
       
 15335         symbol_c *last_type_symbol = NULL;
       
 15336 
       
 15337         {
       
 15338             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15339             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15340             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15341             symbol_c *IN_type_symbol = NULL;
       
 15342             
       
 15343             /* Get the value from a foo(<param_value>) style call */
       
 15344             if (IN_param_value == NULL)
       
 15345               IN_param_value = function_call_param_iterator.next_nf();
       
 15346             if (IN_param_value != NULL) {
       
 15347               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15348               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15349             }
       
 15350             
       
 15351             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15352             {
       
 15353         
       
 15354                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15355                 
       
 15356                 if (IN_type_symbol == NULL)
       
 15357                   IN_type_symbol = last_type_symbol;
       
 15358                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15359                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15360                 function_type_prefix = return_type_symbol;
       
 15361                 function_type_suffix = IN_type_symbol;
       
 15362                 break;
       
 15363                 
       
 15364             }
       
 15365             
       
 15366             
       
 15367             ERROR;
       
 15368         }
       
 15369         
       
 15370     }/*function_int_to_usint*/
       
 15371     break;
       
 15372 
       
 15373 /****
       
 15374  *INT_TO_ULINT
       
 15375  */
       
 15376     case function_int_to_ulint :
       
 15377     {
       
 15378         symbol_c *last_type_symbol = NULL;
       
 15379 
       
 15380         {
       
 15381             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15382             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15383             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15384             symbol_c *IN_type_symbol = NULL;
       
 15385             
       
 15386             /* Get the value from a foo(<param_value>) style call */
       
 15387             if (IN_param_value == NULL)
       
 15388               IN_param_value = function_call_param_iterator.next_nf();
       
 15389             if (IN_param_value != NULL) {
       
 15390               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15391               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15392             }
       
 15393             
       
 15394             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15395             {
       
 15396         
       
 15397                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15398                 
       
 15399                 if (IN_type_symbol == NULL)
       
 15400                   IN_type_symbol = last_type_symbol;
       
 15401                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15402                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15403                 function_type_prefix = return_type_symbol;
       
 15404                 function_type_suffix = IN_type_symbol;
       
 15405                 break;
       
 15406                 
       
 15407             }
       
 15408             
       
 15409             
       
 15410             ERROR;
       
 15411         }
       
 15412         
       
 15413     }/*function_int_to_ulint*/
       
 15414     break;
       
 15415 
       
 15416 /****
       
 15417  *INT_TO_BOOL
       
 15418  */
       
 15419     case function_int_to_bool :
       
 15420     {
       
 15421         symbol_c *last_type_symbol = NULL;
       
 15422 
       
 15423         {
       
 15424             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15426             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15427             symbol_c *IN_type_symbol = NULL;
       
 15428             
       
 15429             /* Get the value from a foo(<param_value>) style call */
       
 15430             if (IN_param_value == NULL)
       
 15431               IN_param_value = function_call_param_iterator.next_nf();
       
 15432             if (IN_param_value != NULL) {
       
 15433               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15434               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15435             }
       
 15436             
       
 15437             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15438             {
       
 15439         
       
 15440                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 15441                 
       
 15442                 if (IN_type_symbol == NULL)
       
 15443                   IN_type_symbol = last_type_symbol;
       
 15444                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15445                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15446                 function_type_prefix = return_type_symbol;
       
 15447                 function_type_suffix = IN_type_symbol;
       
 15448                 break;
       
 15449                 
       
 15450             }
       
 15451             
       
 15452             
       
 15453             ERROR;
       
 15454         }
       
 15455         
       
 15456     }/*function_int_to_bool*/
       
 15457     break;
       
 15458 
       
 15459 /****
       
 15460  *INT_TO_TIME
       
 15461  */
       
 15462     case function_int_to_time :
       
 15463     {
       
 15464         symbol_c *last_type_symbol = NULL;
       
 15465 
       
 15466         {
       
 15467             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15468             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15469             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15470             symbol_c *IN_type_symbol = NULL;
       
 15471             
       
 15472             /* Get the value from a foo(<param_value>) style call */
       
 15473             if (IN_param_value == NULL)
       
 15474               IN_param_value = function_call_param_iterator.next_nf();
       
 15475             if (IN_param_value != NULL) {
       
 15476               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15477               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15478             }
       
 15479             
       
 15480             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15481             {
       
 15482         
       
 15483                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
 15484                 
       
 15485                 if (IN_type_symbol == NULL)
       
 15486                   IN_type_symbol = last_type_symbol;
       
 15487                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 15488                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15489                 function_type_prefix = return_type_symbol;
       
 15490                 break;
       
 15491                 
       
 15492             }
       
 15493             
       
 15494             
       
 15495             ERROR;
       
 15496         }
       
 15497         
       
 15498     }/*function_int_to_time*/
       
 15499     break;
       
 15500 
       
 15501 /****
       
 15502  *TRUNC
       
 15503  */
       
 15504     case function_trunc :
       
 15505     {
       
 15506         symbol_c *last_type_symbol = NULL;
       
 15507 
       
 15508         {
       
 15509             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15510             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15511             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15512             symbol_c *IN_type_symbol = NULL;
       
 15513             
       
 15514             /* Get the value from a foo(<param_value>) style call */
       
 15515             if (IN_param_value == NULL)
       
 15516               IN_param_value = function_call_param_iterator.next_nf();
       
 15517             if (IN_param_value != NULL) {
       
 15518               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15519               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15520             }
       
 15521             
       
 15522             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 15523             {
       
 15524         
       
 15525                 
 15526                 
 15526                 if (IN_type_symbol == NULL)
 15527                 if (IN_type_symbol == NULL)
 15527                   IN_type_symbol = last_type_symbol;
 15528                   IN_type_symbol = last_type_symbol;
 15528                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 15529                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 15529                 symbol_c * return_type_symbol = &search_constant_type_c::integer;
 15530                 symbol_c * return_type_symbol = &search_constant_type_c::integer;
 15544 /****
 15545 /****
 15545  *BCD_TO_UDINT
 15546  *BCD_TO_UDINT
 15546  */
 15547  */
 15547     case function_bcd_to_udint :
 15548     case function_bcd_to_udint :
 15548     {
 15549     {
 15549         symbol_c *last_type_symbol = NULL;
 15550         symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name;
 15550 
 15551 
 15551         {
 15552         {
 15552             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15553             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15553             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15554             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15554             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15555             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15586 /****
 15587 /****
 15587  *BCD_TO_UINT
 15588  *BCD_TO_UINT
 15588  */
 15589  */
 15589     case function_bcd_to_uint :
 15590     case function_bcd_to_uint :
 15590     {
 15591     {
 15591         symbol_c *last_type_symbol = NULL;
 15592         symbol_c *last_type_symbol = &search_constant_type_c::word_type_name;
 15592 
 15593 
 15593         {
 15594         {
 15594             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15595             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15595             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15596             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15596             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15597             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15628 /****
 15629 /****
 15629  *BCD_TO_ULINT
 15630  *BCD_TO_ULINT
 15630  */
 15631  */
 15631     case function_bcd_to_ulint :
 15632     case function_bcd_to_ulint :
 15632     {
 15633     {
 15633         symbol_c *last_type_symbol = NULL;
 15634         symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name;
 15634 
 15635 
 15635         {
 15636         {
 15636             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15637             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15637             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15638             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15638             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15639             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15670 /****
 15671 /****
 15671  *BCD_TO_USINT
 15672  *BCD_TO_USINT
 15672  */
 15673  */
 15673     case function_bcd_to_usint :
 15674     case function_bcd_to_usint :
 15674     {
 15675     {
 15675         symbol_c *last_type_symbol = NULL;
 15676         symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name;
 15676 
 15677 
 15677         {
 15678         {
 15678             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15679             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15679             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15680             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15680             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15681             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15712 /****
 15713 /****
 15713  *UDINT_TO_BCD
 15714  *UDINT_TO_BCD
 15714  */
 15715  */
 15715     case function_udint_to_bcd :
 15716     case function_udint_to_bcd :
 15716     {
 15717     {
 15717         symbol_c *last_type_symbol = NULL;
 15718         symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name;
 15718 
 15719 
 15719         {
 15720         {
 15720             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15721             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15721             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15722             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15722             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15723             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15754 /****
 15755 /****
 15755  *UINT_TO_BCD
 15756  *UINT_TO_BCD
 15756  */
 15757  */
 15757     case function_uint_to_bcd :
 15758     case function_uint_to_bcd :
 15758     {
 15759     {
 15759         symbol_c *last_type_symbol = NULL;
 15760         symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name;
 15760 
 15761 
 15761         {
 15762         {
 15762             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15763             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15763             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15764             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15764             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15765             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15796 /****
 15797 /****
 15797  *USINT_TO_BCD
 15798  *USINT_TO_BCD
 15798  */
 15799  */
 15799     case function_usint_to_bcd :
 15800     case function_usint_to_bcd :
 15800     {
 15801     {
 15801         symbol_c *last_type_symbol = NULL;
 15802         symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name;
 15802 
 15803 
 15803         {
 15804         {
 15804             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15805             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15805             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15806             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15806             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15807             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15838 /****
 15839 /****
 15839  *ULINT_TO_BCD
 15840  *ULINT_TO_BCD
 15840  */
 15841  */
 15841     case function_ulint_to_bcd :
 15842     case function_ulint_to_bcd :
 15842     {
 15843     {
 15843         symbol_c *last_type_symbol = NULL;
 15844         symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name;
 15844 
 15845 
 15845         {
 15846         {
 15846             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15847             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15847             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15848             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15848             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15849             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15880 /****
 15881 /****
 15881  *DATE_AND_TIME_TO_TIME_OF_DAY
 15882  *DATE_AND_TIME_TO_TIME_OF_DAY
 15882  */
 15883  */
 15883     case function_date_and_time_to_time_of_day :
 15884     case function_date_and_time_to_time_of_day :
 15884     {
 15885     {
 15885         symbol_c *last_type_symbol = NULL;
 15886         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
 15886 
 15887 
 15887         {
 15888         {
 15888             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15889             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15889             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15890             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15890             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15891             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15921 /****
 15922 /****
 15922  *DATE_AND_TIME_TO_DATE
 15923  *DATE_AND_TIME_TO_DATE
 15923  */
 15924  */
 15924     case function_date_and_time_to_date :
 15925     case function_date_and_time_to_date :
 15925     {
 15926     {
 15926         symbol_c *last_type_symbol = NULL;
 15927         symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name;
 15927 
 15928 
 15928         {
 15929         {
 15929             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15930             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 15930             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15931             /* Get the value from a foo(<param_name> = <param_value>) style call */
 15931             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 15932             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 19810 /****
 19811 /****
 19811  *LEN
 19812  *LEN
 19812  */
 19813  */
 19813     case function_len :
 19814     case function_len :
 19814     {
 19815     {
 19815         symbol_c *last_type_symbol = NULL;
 19816         symbol_c *last_type_symbol = &search_constant_type_c::string_type_name;
 19816 
 19817 
 19817         {
 19818         {
 19818             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 19819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 19819             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19820             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19820             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 19821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);