stage4/generate_c/st_code_gen.c
changeset 314 41d4ac0b4821
parent 279 c0453b7f99df
child 316 baa7a1585585
equal deleted inserted replaced
313:90c3772e6547 314:41d4ac0b4821
    48             }
    48             }
    49             
    49             
    50             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
    50             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
    51             {
    51             {
    52         
    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             {
       
   556         
    53                 function_name = (symbol_c*)(new pragma_c("__move_"));
   557                 function_name = (symbol_c*)(new pragma_c("__move_"));
    54                 
   558                 
    55                 if (IN_type_symbol == NULL)
   559                 if (IN_type_symbol == NULL)
    56                   IN_type_symbol = last_type_symbol;
   560                   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)
   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)
    58                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1712                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    59                 function_type_prefix = return_type_symbol;
  1713                 function_type_prefix = return_type_symbol;
    60                 function_type_suffix = IN_type_symbol;
  1714                 function_type_suffix = IN_type_symbol;
    61                 break;
  1715                 break;
    62                 
  1716                 
    64             
  1718             
    65             
  1719             
    66             ERROR;
  1720             ERROR;
    67         }
  1721         }
    68         
  1722         
    69     }/*function_real_to_sint*/
  1723     }/*function_lint_to_sint*/
    70     break;
  1724     break;
    71 
  1725 
    72 /****
  1726 /****
    73  *REAL_TO_LINT
  1727  *LINT_TO_DINT
    74  */
  1728  */
    75     case function_real_to_lint :
  1729     case function_lint_to_dint :
    76     {
  1730     {
    77         symbol_c *last_type_symbol = NULL;
  1731         symbol_c *last_type_symbol = NULL;
    78 
  1732 
    79         {
  1733         {
    80             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
  1734             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
    81             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1735             /* Get the value from a foo(<param_name> = <param_value>) style call */
    82             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
  1736             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
    83             symbol_c *IN_type_symbol = NULL;
  1737             symbol_c *IN_type_symbol = NULL;
    84             
  1738             
    85             /* Get the value from a foo(<param_value>) style call */
  1739             /* Get the value from a foo(<param_value>) style call */
    86             if (IN_param_value == NULL)
  1740             if (IN_param_value == NULL)
    87               IN_param_value = function_call_param_iterator.next_nf();
  1741               IN_param_value = function_call_param_iterator.next_nf();
    88             if (IN_param_value != NULL) {
  1742             if (IN_param_value != NULL) {
    89               IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
    90               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  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 ;
    91             }
  1745             }
    92             
  1746             
    93             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  1747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
    94             {
  1748             {
    95         
  1749         
    96                 function_name = (symbol_c*)(new pragma_c("__move_"));
  1750                 function_name = (symbol_c*)(new pragma_c("__move_"));
    97                 
  1751                 
    98                 if (IN_type_symbol == NULL)
  1752                 if (IN_type_symbol == NULL)
    99                   IN_type_symbol = last_type_symbol;
  1753                   IN_type_symbol = last_type_symbol;
   100                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
  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)
   101                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   102                 function_type_prefix = return_type_symbol;
  2568                 function_type_prefix = return_type_symbol;
   103                 function_type_suffix = IN_type_symbol;
  2569                 function_type_suffix = IN_type_symbol;
   104                 break;
  2570                 break;
   105                 
  2571                 
   107             
  2573             
   108             
  2574             
   109             ERROR;
  2575             ERROR;
   110         }
  2576         }
   111         
  2577         
   112     }/*function_real_to_lint*/
  2578     }/*function_dint_to_lint*/
   113     break;
  2579     break;
   114 
  2580 
   115 /****
  2581 /****
   116  *REAL_TO_DINT
  2582  *DINT_TO_DATE
   117  */
  2583  */
   118     case function_real_to_dint :
  2584     case function_dint_to_date :
   119     {
  2585     {
   120         symbol_c *last_type_symbol = NULL;
  2586         symbol_c *last_type_symbol = NULL;
   121 
  2587 
   122         {
  2588         {
   123             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
  2589             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   124             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2590             /* Get the value from a foo(<param_name> = <param_value>) style call */
   125             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
  2591             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   126             symbol_c *IN_type_symbol = NULL;
  2592             symbol_c *IN_type_symbol = NULL;
   127             
  2593             
   128             /* Get the value from a foo(<param_value>) style call */
  2594             /* Get the value from a foo(<param_value>) style call */
   129             if (IN_param_value == NULL)
  2595             if (IN_param_value == NULL)
   130               IN_param_value = function_call_param_iterator.next_nf();
  2596               IN_param_value = function_call_param_iterator.next_nf();
   131             if (IN_param_value != NULL) {
  2597             if (IN_param_value != NULL) {
   132               IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2598               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   133               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  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 ;
   134             }
  2600             }
   135             
  2601             
   136             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  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))
   137             {
  2645             {
   138         
  2646         
   139                 function_name = (symbol_c*)(new pragma_c("__move_"));
  2647                 function_name = (symbol_c*)(new pragma_c("__move_"));
   140                 
  2648                 
   141                 if (IN_type_symbol == NULL)
  2649                 if (IN_type_symbol == NULL)
   142                   IN_type_symbol = last_type_symbol;
  2650                   IN_type_symbol = last_type_symbol;
   143                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
  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)
   144                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3419                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   145                 function_type_prefix = return_type_symbol;
  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;
   146                 function_type_suffix = IN_type_symbol;
  3925                 function_type_suffix = IN_type_symbol;
   147                 break;
  3926                 break;
   148                 
  3927                 
   149             }
  3928             }
   150             
  3929             
   151             
  3930             
   152             ERROR;
  3931             ERROR;
   153         }
  3932         }
   154         
  3933         
   155     }/*function_real_to_dint*/
  3934     }/*function_dword_to_real*/
   156     break;
  3935     break;
   157 
  3936 
   158 /****
  3937 /****
   159  *REAL_TO_DATE
  3938  *DWORD_TO_SINT
   160  */
  3939  */
   161     case function_real_to_date :
  3940     case function_dword_to_sint :
   162     {
  3941     {
   163         symbol_c *last_type_symbol = NULL;
  3942         symbol_c *last_type_symbol = NULL;
   164 
  3943 
   165         {
  3944         {
   166             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
  3945             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   167             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3946             /* Get the value from a foo(<param_name> = <param_value>) style call */
   168             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
  3947             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   169             symbol_c *IN_type_symbol = NULL;
  3948             symbol_c *IN_type_symbol = NULL;
   170             
  3949             
   171             /* Get the value from a foo(<param_value>) style call */
  3950             /* Get the value from a foo(<param_value>) style call */
   172             if (IN_param_value == NULL)
  3951             if (IN_param_value == NULL)
   173               IN_param_value = function_call_param_iterator.next_nf();
  3952               IN_param_value = function_call_param_iterator.next_nf();
   174             if (IN_param_value != NULL) {
  3953             if (IN_param_value != NULL) {
   175               IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3954               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   176               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  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 ;
   177             }
  3956             }
   178             
  3957             
   179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  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))
   180             {
 10203             {
   181         
 10204         
   182                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
 10205                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
   183                 
 10206                 
   184                 if (IN_type_symbol == NULL)
 10207                 if (IN_type_symbol == NULL)
   192             
 10215             
   193             
 10216             
   194             ERROR;
 10217             ERROR;
   195         }
 10218         }
   196         
 10219         
   197     }/*function_real_to_date*/
 10220     }/*function_lreal_to_date*/
   198     break;
 10221     break;
   199 
 10222 
   200 /****
 10223 /****
   201  *REAL_TO_DWORD
 10224  *LREAL_TO_DWORD
   202  */
 10225  */
   203     case function_real_to_dword :
 10226     case function_lreal_to_dword :
   204     {
 10227     {
   205         symbol_c *last_type_symbol = NULL;
 10228         symbol_c *last_type_symbol = NULL;
   206 
 10229 
   207         {
 10230         {
   208             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   209             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
   210             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   211             symbol_c *IN_type_symbol = NULL;
 10234             symbol_c *IN_type_symbol = NULL;
   212             
 10235             
   213             /* Get the value from a foo(<param_value>) style call */
 10236             /* Get the value from a foo(<param_value>) style call */
   214             if (IN_param_value == NULL)
 10237             if (IN_param_value == NULL)
   215               IN_param_value = function_call_param_iterator.next_nf();
 10238               IN_param_value = function_call_param_iterator.next_nf();
   216             if (IN_param_value != NULL) {
 10239             if (IN_param_value != NULL) {
   217               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   218               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   219             }
 10242             }
   220             
 10243             
   221             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   222             {
 10245             {
   223         
 10246         
   224                 function_name = (symbol_c*)(new pragma_c("__move_"));
 10247                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
   225                 
 10248                 
   226                 if (IN_type_symbol == NULL)
 10249                 if (IN_type_symbol == NULL)
   227                   IN_type_symbol = last_type_symbol;
 10250                   IN_type_symbol = last_type_symbol;
   228                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   229                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 10252                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   230                 function_type_prefix = return_type_symbol;
 10253                 function_type_prefix = return_type_symbol;
   231                 function_type_suffix = IN_type_symbol;
 10254                 break;
   232                 break;
 10255                 
   233                 
 10256             }
   234             }
 10257             
   235             
 10258             
   236             
 10259             ERROR;
   237             ERROR;
 10260         }
   238         }
 10261         
   239         
 10262     }/*function_lreal_to_dword*/
   240     }/*function_real_to_dword*/
 10263     break;
   241     break;
 10264 
   242 
 10265 /****
   243 /****
 10266  *LREAL_TO_DT
   244  *REAL_TO_DT
 10267  */
   245  */
 10268     case function_lreal_to_dt :
   246     case function_real_to_dt :
 10269     {
   247     {
 10270         symbol_c *last_type_symbol = NULL;
   248         symbol_c *last_type_symbol = NULL;
 10271 
   249 
 10272         {
   250         {
 10273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   251             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10274             /* Get the value from a foo(<param_name> = <param_value>) style call */
   252             /* 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);
   253             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10276             symbol_c *IN_type_symbol = NULL;
   254             symbol_c *IN_type_symbol = NULL;
 10277             
   255             
 10278             /* Get the value from a foo(<param_value>) style call */
   256             /* Get the value from a foo(<param_value>) style call */
 10279             if (IN_param_value == NULL)
   257             if (IN_param_value == NULL)
 10280               IN_param_value = function_call_param_iterator.next_nf();
   258               IN_param_value = function_call_param_iterator.next_nf();
 10281             if (IN_param_value != NULL) {
   259             if (IN_param_value != NULL) {
 10282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   260               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 ;
   261               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   262             }
 10285             
   263             
 10286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   264             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   265             {
 10287             {
   266         
 10288         
   267                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
 10289                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
   268                 
 10290                 
   269                 if (IN_type_symbol == NULL)
 10291                 if (IN_type_symbol == NULL)
   277             
 10299             
   278             
 10300             
   279             ERROR;
 10301             ERROR;
   280         }
 10302         }
   281         
 10303         
   282     }/*function_real_to_dt*/
 10304     }/*function_lreal_to_dt*/
   283     break;
 10305     break;
   284 
 10306 
   285 /****
 10307 /****
   286  *REAL_TO_TOD
 10308  *LREAL_TO_TOD
   287  */
 10309  */
   288     case function_real_to_tod :
 10310     case function_lreal_to_tod :
   289     {
 10311     {
   290         symbol_c *last_type_symbol = NULL;
 10312         symbol_c *last_type_symbol = NULL;
   291 
 10313 
   292         {
 10314         {
   293             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   294             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10316             /* Get the value from a foo(<param_name> = <param_value>) style call */
   295             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   296             symbol_c *IN_type_symbol = NULL;
 10318             symbol_c *IN_type_symbol = NULL;
   297             
 10319             
   298             /* Get the value from a foo(<param_value>) style call */
 10320             /* Get the value from a foo(<param_value>) style call */
   299             if (IN_param_value == NULL)
 10321             if (IN_param_value == NULL)
   300               IN_param_value = function_call_param_iterator.next_nf();
 10322               IN_param_value = function_call_param_iterator.next_nf();
   301             if (IN_param_value != NULL) {
 10323             if (IN_param_value != NULL) {
   302               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   303               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   304             }
 10326             }
   305             
 10327             
   306             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   307             {
 10329             {
   308         
 10330         
   309                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
 10331                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
   310                 
 10332                 
   311                 if (IN_type_symbol == NULL)
 10333                 if (IN_type_symbol == NULL)
   319             
 10341             
   320             
 10342             
   321             ERROR;
 10343             ERROR;
   322         }
 10344         }
   323         
 10345         
   324     }/*function_real_to_tod*/
 10346     }/*function_lreal_to_tod*/
   325     break;
 10347     break;
   326 
 10348 
   327 /****
 10349 /****
   328  *REAL_TO_UDINT
 10350  *LREAL_TO_UDINT
   329  */
 10351  */
   330     case function_real_to_udint :
 10352     case function_lreal_to_udint :
   331     {
 10353     {
   332         symbol_c *last_type_symbol = NULL;
 10354         symbol_c *last_type_symbol = NULL;
   333 
 10355 
   334         {
 10356         {
   335             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10357             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   336             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10358             /* Get the value from a foo(<param_name> = <param_value>) style call */
   337             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10359             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   338             symbol_c *IN_type_symbol = NULL;
 10360             symbol_c *IN_type_symbol = NULL;
   339             
 10361             
   340             /* Get the value from a foo(<param_value>) style call */
 10362             /* Get the value from a foo(<param_value>) style call */
   341             if (IN_param_value == NULL)
 10363             if (IN_param_value == NULL)
   342               IN_param_value = function_call_param_iterator.next_nf();
 10364               IN_param_value = function_call_param_iterator.next_nf();
   343             if (IN_param_value != NULL) {
 10365             if (IN_param_value != NULL) {
   344               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10366               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   345               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   346             }
 10368             }
   347             
 10369             
   348             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10370             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   349             {
 10371             {
   350         
 10372         
   351                 function_name = (symbol_c*)(new pragma_c("__move_"));
 10373                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
   352                 
 10374                 
   353                 if (IN_type_symbol == NULL)
 10375                 if (IN_type_symbol == NULL)
   354                   IN_type_symbol = last_type_symbol;
 10376                   IN_type_symbol = last_type_symbol;
   355                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10377                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   356                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 10378                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   357                 function_type_prefix = return_type_symbol;
 10379                 function_type_prefix = return_type_symbol;
   358                 function_type_suffix = IN_type_symbol;
 10380                 break;
   359                 break;
 10381                 
   360                 
 10382             }
   361             }
 10383             
   362             
 10384             
   363             
 10385             ERROR;
   364             ERROR;
 10386         }
   365         }
 10387         
   366         
 10388     }/*function_lreal_to_udint*/
   367     }/*function_real_to_udint*/
 10389     break;
   368     break;
 10390 
   369 
 10391 /****
   370 /****
 10392  *LREAL_TO_WORD
   371  *REAL_TO_WORD
 10393  */
   372  */
 10394     case function_lreal_to_word :
   373     case function_real_to_word :
 10395     {
   374     {
 10396         symbol_c *last_type_symbol = NULL;
   375         symbol_c *last_type_symbol = NULL;
 10397 
   376 
 10398         {
   377         {
 10399             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   378             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10400             /* Get the value from a foo(<param_name> = <param_value>) style call */
   379             /* 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);
   380             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10402             symbol_c *IN_type_symbol = NULL;
   381             symbol_c *IN_type_symbol = NULL;
 10403             
   382             
 10404             /* Get the value from a foo(<param_value>) style call */
   383             /* Get the value from a foo(<param_value>) style call */
 10405             if (IN_param_value == NULL)
   384             if (IN_param_value == NULL)
 10406               IN_param_value = function_call_param_iterator.next_nf();
   385               IN_param_value = function_call_param_iterator.next_nf();
 10407             if (IN_param_value != NULL) {
   386             if (IN_param_value != NULL) {
 10408               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   387               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 ;
   388               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   389             }
 10411             
   390             
 10412             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   391             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10413             {
   392             {
 10414         
   393         
 10415                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
   394                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   395                 
 10416                 
   396                 if (IN_type_symbol == NULL)
 10417                 if (IN_type_symbol == NULL)
   397                   IN_type_symbol = last_type_symbol;
 10418                   IN_type_symbol = last_type_symbol;
   398                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10419                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   399                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   400                 function_type_prefix = return_type_symbol;
 10421                 function_type_prefix = return_type_symbol;
   401                 function_type_suffix = IN_type_symbol;
 10422                 break;
   402                 break;
 10423                 
   403                 
 10424             }
   404             }
 10425             
   405             
 10426             
   406             
 10427             ERROR;
   407             ERROR;
 10428         }
   408         }
 10429         
   409         
 10430     }/*function_lreal_to_word*/
   410     }/*function_real_to_word*/
 10431     break;
   411     break;
 10432 
   412 
 10433 /****
   413 /****
 10434  *LREAL_TO_STRING
   414  *REAL_TO_STRING
 10435  */
   415  */
 10436     case function_lreal_to_string :
   416     case function_real_to_string :
 10437     {
   417     {
 10438         symbol_c *last_type_symbol = NULL;
   418         symbol_c *last_type_symbol = NULL;
 10439 
   419 
 10440         {
   420         {
 10441             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   421             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10442             /* Get the value from a foo(<param_name> = <param_value>) style call */
   422             /* 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);
   423             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10444             symbol_c *IN_type_symbol = NULL;
   424             symbol_c *IN_type_symbol = NULL;
 10445             
   425             
 10446             /* Get the value from a foo(<param_value>) style call */
   426             /* Get the value from a foo(<param_value>) style call */
 10447             if (IN_param_value == NULL)
   427             if (IN_param_value == NULL)
 10448               IN_param_value = function_call_param_iterator.next_nf();
   428               IN_param_value = function_call_param_iterator.next_nf();
 10449             if (IN_param_value != NULL) {
   429             if (IN_param_value != NULL) {
 10450               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   430               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 ;
   431               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   432             }
 10453             
   433             
 10454             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   434             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   435             {
 10455             {
   436         
 10456         
   437                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
 10457                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
   438                 
 10458                 
   439                 if (IN_type_symbol == NULL)
 10459                 if (IN_type_symbol == NULL)
   447             
 10467             
   448             
 10468             
   449             ERROR;
 10469             ERROR;
   450         }
 10470         }
   451         
 10471         
   452     }/*function_real_to_string*/
 10472     }/*function_lreal_to_string*/
   453     break;
 10473     break;
   454 
 10474 
   455 /****
 10475 /****
   456  *REAL_TO_LWORD
 10476  *LREAL_TO_LWORD
   457  */
 10477  */
   458     case function_real_to_lword :
 10478     case function_lreal_to_lword :
   459     {
 10479     {
   460         symbol_c *last_type_symbol = NULL;
 10480         symbol_c *last_type_symbol = NULL;
   461 
 10481 
   462         {
 10482         {
   463             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10483             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   464             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10484             /* Get the value from a foo(<param_name> = <param_value>) style call */
   465             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10485             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   466             symbol_c *IN_type_symbol = NULL;
 10486             symbol_c *IN_type_symbol = NULL;
   467             
 10487             
   468             /* Get the value from a foo(<param_value>) style call */
 10488             /* Get the value from a foo(<param_value>) style call */
   469             if (IN_param_value == NULL)
 10489             if (IN_param_value == NULL)
   470               IN_param_value = function_call_param_iterator.next_nf();
 10490               IN_param_value = function_call_param_iterator.next_nf();
   471             if (IN_param_value != NULL) {
 10491             if (IN_param_value != NULL) {
   472               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10492               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   473               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   474             }
 10494             }
   475             
 10495             
   476             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10496             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   477             {
 10497             {
   478         
 10498         
   479                 function_name = (symbol_c*)(new pragma_c("__move_"));
 10499                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
   480                 
 10500                 
   481                 if (IN_type_symbol == NULL)
 10501                 if (IN_type_symbol == NULL)
   482                   IN_type_symbol = last_type_symbol;
 10502                   IN_type_symbol = last_type_symbol;
   483                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10503                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   484                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 10504                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   485                 function_type_prefix = return_type_symbol;
 10505                 function_type_prefix = return_type_symbol;
   486                 function_type_suffix = IN_type_symbol;
 10506                 break;
   487                 break;
 10507                 
   488                 
 10508             }
   489             }
 10509             
   490             
 10510             
   491             
 10511             ERROR;
   492             ERROR;
 10512         }
   493         }
 10513         
   494         
 10514     }/*function_lreal_to_lword*/
   495     }/*function_real_to_lword*/
 10515     break;
   496     break;
 10516 
   497 
 10517 /****
   498 /****
 10518  *LREAL_TO_UINT
   499  *REAL_TO_UINT
 10519  */
   500  */
 10520     case function_lreal_to_uint :
   501     case function_real_to_uint :
 10521     {
   502     {
 10522         symbol_c *last_type_symbol = NULL;
   503         symbol_c *last_type_symbol = NULL;
 10523 
   504 
 10524         {
   505         {
 10525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   506             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10526             /* Get the value from a foo(<param_name> = <param_value>) style call */
   507             /* 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);
   508             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10528             symbol_c *IN_type_symbol = NULL;
   509             symbol_c *IN_type_symbol = NULL;
 10529             
   510             
 10530             /* Get the value from a foo(<param_value>) style call */
   511             /* Get the value from a foo(<param_value>) style call */
 10531             if (IN_param_value == NULL)
   512             if (IN_param_value == NULL)
 10532               IN_param_value = function_call_param_iterator.next_nf();
   513               IN_param_value = function_call_param_iterator.next_nf();
 10533             if (IN_param_value != NULL) {
   514             if (IN_param_value != NULL) {
 10534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   515               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 ;
   516               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   517             }
 10537             
   518             
 10538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   519             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10539             {
   520             {
 10540         
   521         
 10541                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
   522                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   523                 
 10542                 
   524                 if (IN_type_symbol == NULL)
 10543                 if (IN_type_symbol == NULL)
   525                   IN_type_symbol = last_type_symbol;
 10544                   IN_type_symbol = last_type_symbol;
   526                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   527                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 10546                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   528                 function_type_prefix = return_type_symbol;
 10547                 function_type_prefix = return_type_symbol;
   529                 function_type_suffix = IN_type_symbol;
 10548                 break;
   530                 break;
 10549                 
   531                 
 10550             }
   532             }
 10551             
   533             
 10552             
   534             
 10553             ERROR;
   535             ERROR;
 10554         }
   536         }
 10555         
   537         
 10556     }/*function_lreal_to_uint*/
   538     }/*function_real_to_uint*/
 10557     break;
   539     break;
 10558 
   540 
 10559 /****
   541 /****
 10560  *LREAL_TO_BYTE
   542  *REAL_TO_LREAL
 10561  */
   543  */
 10562     case function_lreal_to_byte :
   544     case function_real_to_lreal :
 10563     {
   545     {
 10564         symbol_c *last_type_symbol = NULL;
   546         symbol_c *last_type_symbol = NULL;
 10565 
   547 
 10566         {
   548         {
 10567             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   549             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10568             /* Get the value from a foo(<param_name> = <param_value>) style call */
   550             /* 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);
   551             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10570             symbol_c *IN_type_symbol = NULL;
   552             symbol_c *IN_type_symbol = NULL;
 10571             
   553             
 10572             /* Get the value from a foo(<param_value>) style call */
   554             /* Get the value from a foo(<param_value>) style call */
 10573             if (IN_param_value == NULL)
   555             if (IN_param_value == NULL)
 10574               IN_param_value = function_call_param_iterator.next_nf();
   556               IN_param_value = function_call_param_iterator.next_nf();
 10575             if (IN_param_value != NULL) {
   557             if (IN_param_value != NULL) {
 10576               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   558               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 ;
   559               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   560             }
 10579             
   561             
 10580             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   562             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10581             {
   563             {
 10582         
   564         
 10583                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
   565                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   566                 
       
   567                 if (IN_type_symbol == NULL)
       
   568                   IN_type_symbol = last_type_symbol;
       
   569                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   570                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   571                 function_type_prefix = return_type_symbol;
       
   572                 function_type_suffix = IN_type_symbol;
       
   573                 break;
       
   574                 
       
   575             }
       
   576             
       
   577             
       
   578             ERROR;
       
   579         }
       
   580         
       
   581     }/*function_real_to_lreal*/
       
   582     break;
       
   583 
       
   584 /****
       
   585  *REAL_TO_BYTE
       
   586  */
       
   587     case function_real_to_byte :
       
   588     {
       
   589         symbol_c *last_type_symbol = NULL;
       
   590 
       
   591         {
       
   592             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   593             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   594             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   595             symbol_c *IN_type_symbol = NULL;
       
   596             
       
   597             /* Get the value from a foo(<param_value>) style call */
       
   598             if (IN_param_value == NULL)
       
   599               IN_param_value = function_call_param_iterator.next_nf();
       
   600             if (IN_param_value != NULL) {
       
   601               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   602               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   603             }
       
   604             
       
   605             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   606             {
       
   607         
       
   608                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   609                 
 10584                 
   610                 if (IN_type_symbol == NULL)
 10585                 if (IN_type_symbol == NULL)
   611                   IN_type_symbol = last_type_symbol;
 10586                   IN_type_symbol = last_type_symbol;
   612                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10587                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   613                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 10588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   614                 function_type_prefix = return_type_symbol;
 10589                 function_type_prefix = return_type_symbol;
   615                 function_type_suffix = IN_type_symbol;
 10590                 break;
   616                 break;
 10591                 
   617                 
 10592             }
   618             }
 10593             
   619             
 10594             
   620             
 10595             ERROR;
   621             ERROR;
 10596         }
   622         }
 10597         
   623         
 10598     }/*function_lreal_to_byte*/
   624     }/*function_real_to_byte*/
 10599     break;
   625     break;
 10600 
   626 
 10601 /****
   627 /****
 10602  *LREAL_TO_USINT
   628  *REAL_TO_USINT
 10603  */
   629  */
 10604     case function_lreal_to_usint :
   630     case function_real_to_usint :
 10605     {
   631     {
 10606         symbol_c *last_type_symbol = NULL;
   632         symbol_c *last_type_symbol = NULL;
 10607 
   633 
 10608         {
   634         {
 10609             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   635             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10610             /* Get the value from a foo(<param_name> = <param_value>) style call */
   636             /* 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);
   637             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10612             symbol_c *IN_type_symbol = NULL;
   638             symbol_c *IN_type_symbol = NULL;
 10613             
   639             
 10614             /* Get the value from a foo(<param_value>) style call */
   640             /* Get the value from a foo(<param_value>) style call */
 10615             if (IN_param_value == NULL)
   641             if (IN_param_value == NULL)
 10616               IN_param_value = function_call_param_iterator.next_nf();
   642               IN_param_value = function_call_param_iterator.next_nf();
 10617             if (IN_param_value != NULL) {
   643             if (IN_param_value != NULL) {
 10618               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   644               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 ;
   645               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   646             }
 10621             
   647             
 10622             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   648             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10623             {
   649             {
 10624         
   650         
 10625                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
   651                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   652                 
 10626                 
   653                 if (IN_type_symbol == NULL)
 10627                 if (IN_type_symbol == NULL)
   654                   IN_type_symbol = last_type_symbol;
 10628                   IN_type_symbol = last_type_symbol;
   655                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10629                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   656                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 10630                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   657                 function_type_prefix = return_type_symbol;
 10631                 function_type_prefix = return_type_symbol;
   658                 function_type_suffix = IN_type_symbol;
 10632                 break;
   659                 break;
 10633                 
   660                 
 10634             }
   661             }
 10635             
   662             
 10636             
   663             
 10637             ERROR;
   664             ERROR;
 10638         }
   665         }
 10639         
   666         
 10640     }/*function_lreal_to_usint*/
   667     }/*function_real_to_usint*/
 10641     break;
   668     break;
 10642 
   669 
 10643 /****
   670 /****
 10644  *LREAL_TO_ULINT
   671  *REAL_TO_ULINT
 10645  */
   672  */
 10646     case function_lreal_to_ulint :
   673     case function_real_to_ulint :
 10647     {
   674     {
 10648         symbol_c *last_type_symbol = NULL;
   675         symbol_c *last_type_symbol = NULL;
 10649 
   676 
 10650         {
   677         {
 10651             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   678             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10652             /* Get the value from a foo(<param_name> = <param_value>) style call */
   679             /* 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);
   680             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10654             symbol_c *IN_type_symbol = NULL;
   681             symbol_c *IN_type_symbol = NULL;
 10655             
   682             
 10656             /* Get the value from a foo(<param_value>) style call */
   683             /* Get the value from a foo(<param_value>) style call */
 10657             if (IN_param_value == NULL)
   684             if (IN_param_value == NULL)
 10658               IN_param_value = function_call_param_iterator.next_nf();
   685               IN_param_value = function_call_param_iterator.next_nf();
 10659             if (IN_param_value != NULL) {
   686             if (IN_param_value != NULL) {
 10660               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   687               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 ;
   688               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   689             }
 10663             
   690             
 10664             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   691             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10665             {
   692             {
 10666         
   693         
 10667                 function_name = (symbol_c*)(new pragma_c("__real_to_uint"));
   694                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   695                 
 10668                 
   696                 if (IN_type_symbol == NULL)
 10669                 if (IN_type_symbol == NULL)
   697                   IN_type_symbol = last_type_symbol;
 10670                   IN_type_symbol = last_type_symbol;
   698                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10671                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   699                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 10672                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   700                 function_type_prefix = return_type_symbol;
 10673                 function_type_prefix = return_type_symbol;
   701                 function_type_suffix = IN_type_symbol;
 10674                 break;
   702                 break;
 10675                 
   703                 
 10676             }
   704             }
 10677             
   705             
 10678             
   706             
 10679             ERROR;
   707             ERROR;
 10680         }
   708         }
 10681         
   709         
 10682     }/*function_lreal_to_ulint*/
   710     }/*function_real_to_ulint*/
 10683     break;
   711     break;
 10684 
   712 
 10685 /****
   713 /****
 10686  *LREAL_TO_BOOL
   714  *REAL_TO_BOOL
 10687  */
   715  */
 10688     case function_lreal_to_bool :
   716     case function_real_to_bool :
 10689     {
   717     {
 10690         symbol_c *last_type_symbol = NULL;
   718         symbol_c *last_type_symbol = NULL;
 10691 
   719 
 10692         {
   720         {
 10693             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   721             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10694             /* Get the value from a foo(<param_name> = <param_value>) style call */
   722             /* 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);
   723             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10696             symbol_c *IN_type_symbol = NULL;
   724             symbol_c *IN_type_symbol = NULL;
 10697             
   725             
 10698             /* Get the value from a foo(<param_value>) style call */
   726             /* Get the value from a foo(<param_value>) style call */
 10699             if (IN_param_value == NULL)
   727             if (IN_param_value == NULL)
 10700               IN_param_value = function_call_param_iterator.next_nf();
   728               IN_param_value = function_call_param_iterator.next_nf();
 10701             if (IN_param_value != NULL) {
   729             if (IN_param_value != NULL) {
 10702               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   730               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 ;
   731               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   732             }
 10705             
   733             
 10706             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   734             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10707             {
   735             {
 10708         
   736         
 10709                 function_name = (symbol_c*)(new pragma_c("__real_to_bit"));
   737                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   738                 
 10710                 
   739                 if (IN_type_symbol == NULL)
 10711                 if (IN_type_symbol == NULL)
   740                   IN_type_symbol = last_type_symbol;
 10712                   IN_type_symbol = last_type_symbol;
   741                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10713                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   742                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 10714                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   743                 function_type_prefix = return_type_symbol;
 10715                 function_type_prefix = return_type_symbol;
   744                 function_type_suffix = IN_type_symbol;
 10716                 break;
   745                 break;
 10717                 
   746                 
 10718             }
   747             }
 10719             
   748             
 10720             
   749             
 10721             ERROR;
   750             ERROR;
 10722         }
   751         }
 10723         
   752         
 10724     }/*function_lreal_to_bool*/
   753     }/*function_real_to_bool*/
 10725     break;
   754     break;
 10726 
   755 
 10727 /****
   756 /****
 10728  *LREAL_TO_TIME
   757  *REAL_TO_TIME
 10729  */
   758  */
 10730     case function_lreal_to_time :
   759     case function_real_to_time :
 10731     {
   760     {
 10732         symbol_c *last_type_symbol = NULL;
   761         symbol_c *last_type_symbol = NULL;
 10733 
   762 
 10734         {
   763         {
 10735             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   764             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10736             /* Get the value from a foo(<param_name> = <param_value>) style call */
   765             /* 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);
   766             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10738             symbol_c *IN_type_symbol = NULL;
   767             symbol_c *IN_type_symbol = NULL;
 10739             
   768             
 10740             /* Get the value from a foo(<param_value>) style call */
   769             /* Get the value from a foo(<param_value>) style call */
 10741             if (IN_param_value == NULL)
   770             if (IN_param_value == NULL)
 10742               IN_param_value = function_call_param_iterator.next_nf();
   771               IN_param_value = function_call_param_iterator.next_nf();
 10743             if (IN_param_value != NULL) {
   772             if (IN_param_value != NULL) {
 10744               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   773               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 ;
   774               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_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             }
   775             }
 10747             
   776             
 10748             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   777             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   778             {
 10749             {
   779         
 10750         
   780                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
 10751                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
   781                 
 10752                 
   782                 if (IN_type_symbol == NULL)
 10753                 if (IN_type_symbol == NULL)
   790             
 10761             
   791             
 10762             
   792             ERROR;
 10763             ERROR;
   793         }
 10764         }
   794         
 10765         
   795     }/*function_real_to_time*/
 10766     }/*function_lreal_to_time*/
   796     break;
 10767     break;
   797 
 10768 
   798 /****
 10769 /****
   799  *REAL_TO_INT
 10770  *LREAL_TO_INT
   800  */
 10771  */
   801     case function_real_to_int :
 10772     case function_lreal_to_int :
   802     {
 10773     {
   803         symbol_c *last_type_symbol = NULL;
 10774         symbol_c *last_type_symbol = NULL;
   804 
 10775 
   805         {
 10776         {
   806             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
 10777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
   807             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10778             /* Get the value from a foo(<param_name> = <param_value>) style call */
   808             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
 10779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
   809             symbol_c *IN_type_symbol = NULL;
 10780             symbol_c *IN_type_symbol = NULL;
   810             
 10781             
   811             /* Get the value from a foo(<param_value>) style call */
 10782             /* Get the value from a foo(<param_value>) style call */
   812             if (IN_param_value == NULL)
 10783             if (IN_param_value == NULL)
   813               IN_param_value = function_call_param_iterator.next_nf();
 10784               IN_param_value = function_call_param_iterator.next_nf();
   814             if (IN_param_value != NULL) {
 10785             if (IN_param_value != NULL) {
   815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
   816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   817             }
 10788             }
   818             
 10789             
   819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 10790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
   820             {
 10791             {
   821         
 10792         
   822                 function_name = (symbol_c*)(new pragma_c("__move_"));
 10793                 function_name = (symbol_c*)(new pragma_c("__real_to_sint"));
   823                 
 10794                 
   824                 if (IN_type_symbol == NULL)
 10795                 if (IN_type_symbol == NULL)
   825                   IN_type_symbol = last_type_symbol;
 10796                   IN_type_symbol = last_type_symbol;
   826                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 10797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
   827                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 10798                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   828                 function_type_prefix = return_type_symbol;
 10799                 function_type_prefix = return_type_symbol;
   829                 function_type_suffix = IN_type_symbol;
       
   830                 break;
       
   831                 
       
   832             }
       
   833             
       
   834             
       
   835             ERROR;
       
   836         }
       
   837         
       
   838     }/*function_real_to_int*/
       
   839     break;
       
   840 
       
   841 /****
       
   842  *SINT_TO_REAL
       
   843  */
       
   844     case function_sint_to_real :
       
   845     {
       
   846         symbol_c *last_type_symbol = NULL;
       
   847 
       
   848         {
       
   849             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   850             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   851             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   852             symbol_c *IN_type_symbol = NULL;
       
   853             
       
   854             /* Get the value from a foo(<param_value>) style call */
       
   855             if (IN_param_value == NULL)
       
   856               IN_param_value = function_call_param_iterator.next_nf();
       
   857             if (IN_param_value != NULL) {
       
   858               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   859               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   860             }
       
   861             
       
   862             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   863             {
       
   864         
       
   865                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   866                 
       
   867                 if (IN_type_symbol == NULL)
       
   868                   IN_type_symbol = last_type_symbol;
       
   869                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   870                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   871                 function_type_prefix = return_type_symbol;
       
   872                 function_type_suffix = IN_type_symbol;
       
   873                 break;
       
   874                 
       
   875             }
       
   876             
       
   877             
       
   878             ERROR;
       
   879         }
       
   880         
       
   881     }/*function_sint_to_real*/
       
   882     break;
       
   883 
       
   884 /****
       
   885  *SINT_TO_LINT
       
   886  */
       
   887     case function_sint_to_lint :
       
   888     {
       
   889         symbol_c *last_type_symbol = NULL;
       
   890 
       
   891         {
       
   892             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   894             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   895             symbol_c *IN_type_symbol = NULL;
       
   896             
       
   897             /* Get the value from a foo(<param_value>) style call */
       
   898             if (IN_param_value == NULL)
       
   899               IN_param_value = function_call_param_iterator.next_nf();
       
   900             if (IN_param_value != NULL) {
       
   901               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   902               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   903             }
       
   904             
       
   905             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   906             {
       
   907         
       
   908                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   909                 
       
   910                 if (IN_type_symbol == NULL)
       
   911                   IN_type_symbol = last_type_symbol;
       
   912                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   913                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   914                 function_type_prefix = return_type_symbol;
       
   915                 function_type_suffix = IN_type_symbol;
       
   916                 break;
       
   917                 
       
   918             }
       
   919             
       
   920             
       
   921             ERROR;
       
   922         }
       
   923         
       
   924     }/*function_sint_to_lint*/
       
   925     break;
       
   926 
       
   927 /****
       
   928  *SINT_TO_DINT
       
   929  */
       
   930     case function_sint_to_dint :
       
   931     {
       
   932         symbol_c *last_type_symbol = NULL;
       
   933 
       
   934         {
       
   935             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   937             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   938             symbol_c *IN_type_symbol = NULL;
       
   939             
       
   940             /* Get the value from a foo(<param_value>) style call */
       
   941             if (IN_param_value == NULL)
       
   942               IN_param_value = function_call_param_iterator.next_nf();
       
   943             if (IN_param_value != NULL) {
       
   944               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   945               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   946             }
       
   947             
       
   948             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   949             {
       
   950         
       
   951                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
   952                 
       
   953                 if (IN_type_symbol == NULL)
       
   954                   IN_type_symbol = last_type_symbol;
       
   955                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   956                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   957                 function_type_prefix = return_type_symbol;
       
   958                 function_type_suffix = IN_type_symbol;
       
   959                 break;
       
   960                 
       
   961             }
       
   962             
       
   963             
       
   964             ERROR;
       
   965         }
       
   966         
       
   967     }/*function_sint_to_dint*/
       
   968     break;
       
   969 
       
   970 /****
       
   971  *SINT_TO_DATE
       
   972  */
       
   973     case function_sint_to_date :
       
   974     {
       
   975         symbol_c *last_type_symbol = NULL;
       
   976 
       
   977         {
       
   978             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
   979             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   980             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
   981             symbol_c *IN_type_symbol = NULL;
       
   982             
       
   983             /* Get the value from a foo(<param_value>) style call */
       
   984             if (IN_param_value == NULL)
       
   985               IN_param_value = function_call_param_iterator.next_nf();
       
   986             if (IN_param_value != NULL) {
       
   987               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   988               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   989             }
       
   990             
       
   991             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   992             {
       
   993         
       
   994                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
   995                 
       
   996                 if (IN_type_symbol == NULL)
       
   997                   IN_type_symbol = last_type_symbol;
       
   998                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
   999                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1000                 function_type_prefix = return_type_symbol;
       
  1001                 break;
       
  1002                 
       
  1003             }
       
  1004             
       
  1005             
       
  1006             ERROR;
       
  1007         }
       
  1008         
       
  1009     }/*function_sint_to_date*/
       
  1010     break;
       
  1011 
       
  1012 /****
       
  1013  *SINT_TO_DWORD
       
  1014  */
       
  1015     case function_sint_to_dword :
       
  1016     {
       
  1017         symbol_c *last_type_symbol = NULL;
       
  1018 
       
  1019         {
       
  1020             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1021             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1022             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1023             symbol_c *IN_type_symbol = NULL;
       
  1024             
       
  1025             /* Get the value from a foo(<param_value>) style call */
       
  1026             if (IN_param_value == NULL)
       
  1027               IN_param_value = function_call_param_iterator.next_nf();
       
  1028             if (IN_param_value != NULL) {
       
  1029               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1030               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1031             }
       
  1032             
       
  1033             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1034             {
       
  1035         
       
  1036                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1037                 
       
  1038                 if (IN_type_symbol == NULL)
       
  1039                   IN_type_symbol = last_type_symbol;
       
  1040                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1041                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1042                 function_type_prefix = return_type_symbol;
       
  1043                 function_type_suffix = IN_type_symbol;
       
  1044                 break;
       
  1045                 
       
  1046             }
       
  1047             
       
  1048             
       
  1049             ERROR;
       
  1050         }
       
  1051         
       
  1052     }/*function_sint_to_dword*/
       
  1053     break;
       
  1054 
       
  1055 /****
       
  1056  *SINT_TO_DT
       
  1057  */
       
  1058     case function_sint_to_dt :
       
  1059     {
       
  1060         symbol_c *last_type_symbol = NULL;
       
  1061 
       
  1062         {
       
  1063             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1065             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1066             symbol_c *IN_type_symbol = NULL;
       
  1067             
       
  1068             /* Get the value from a foo(<param_value>) style call */
       
  1069             if (IN_param_value == NULL)
       
  1070               IN_param_value = function_call_param_iterator.next_nf();
       
  1071             if (IN_param_value != NULL) {
       
  1072               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1073               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1074             }
       
  1075             
       
  1076             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1077             {
       
  1078         
       
  1079                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1080                 
       
  1081                 if (IN_type_symbol == NULL)
       
  1082                   IN_type_symbol = last_type_symbol;
       
  1083                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1084                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1085                 function_type_prefix = return_type_symbol;
       
  1086                 break;
       
  1087                 
       
  1088             }
       
  1089             
       
  1090             
       
  1091             ERROR;
       
  1092         }
       
  1093         
       
  1094     }/*function_sint_to_dt*/
       
  1095     break;
       
  1096 
       
  1097 /****
       
  1098  *SINT_TO_TOD
       
  1099  */
       
  1100     case function_sint_to_tod :
       
  1101     {
       
  1102         symbol_c *last_type_symbol = NULL;
       
  1103 
       
  1104         {
       
  1105             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1106             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1107             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1108             symbol_c *IN_type_symbol = NULL;
       
  1109             
       
  1110             /* Get the value from a foo(<param_value>) style call */
       
  1111             if (IN_param_value == NULL)
       
  1112               IN_param_value = function_call_param_iterator.next_nf();
       
  1113             if (IN_param_value != NULL) {
       
  1114               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1115               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1116             }
       
  1117             
       
  1118             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1119             {
       
  1120         
       
  1121                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1122                 
       
  1123                 if (IN_type_symbol == NULL)
       
  1124                   IN_type_symbol = last_type_symbol;
       
  1125                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1126                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1127                 function_type_prefix = return_type_symbol;
       
  1128                 break;
       
  1129                 
       
  1130             }
       
  1131             
       
  1132             
       
  1133             ERROR;
       
  1134         }
       
  1135         
       
  1136     }/*function_sint_to_tod*/
       
  1137     break;
       
  1138 
       
  1139 /****
       
  1140  *SINT_TO_UDINT
       
  1141  */
       
  1142     case function_sint_to_udint :
       
  1143     {
       
  1144         symbol_c *last_type_symbol = NULL;
       
  1145 
       
  1146         {
       
  1147             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1148             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1149             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1150             symbol_c *IN_type_symbol = NULL;
       
  1151             
       
  1152             /* Get the value from a foo(<param_value>) style call */
       
  1153             if (IN_param_value == NULL)
       
  1154               IN_param_value = function_call_param_iterator.next_nf();
       
  1155             if (IN_param_value != NULL) {
       
  1156               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1157               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1158             }
       
  1159             
       
  1160             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1161             {
       
  1162         
       
  1163                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1164                 
       
  1165                 if (IN_type_symbol == NULL)
       
  1166                   IN_type_symbol = last_type_symbol;
       
  1167                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1168                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1169                 function_type_prefix = return_type_symbol;
       
  1170                 function_type_suffix = IN_type_symbol;
       
  1171                 break;
       
  1172                 
       
  1173             }
       
  1174             
       
  1175             
       
  1176             ERROR;
       
  1177         }
       
  1178         
       
  1179     }/*function_sint_to_udint*/
       
  1180     break;
       
  1181 
       
  1182 /****
       
  1183  *SINT_TO_WORD
       
  1184  */
       
  1185     case function_sint_to_word :
       
  1186     {
       
  1187         symbol_c *last_type_symbol = NULL;
       
  1188 
       
  1189         {
       
  1190             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1191             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1192             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1193             symbol_c *IN_type_symbol = NULL;
       
  1194             
       
  1195             /* Get the value from a foo(<param_value>) style call */
       
  1196             if (IN_param_value == NULL)
       
  1197               IN_param_value = function_call_param_iterator.next_nf();
       
  1198             if (IN_param_value != NULL) {
       
  1199               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1200               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1201             }
       
  1202             
       
  1203             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1204             {
       
  1205         
       
  1206                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1207                 
       
  1208                 if (IN_type_symbol == NULL)
       
  1209                   IN_type_symbol = last_type_symbol;
       
  1210                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1211                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1212                 function_type_prefix = return_type_symbol;
       
  1213                 function_type_suffix = IN_type_symbol;
       
  1214                 break;
       
  1215                 
       
  1216             }
       
  1217             
       
  1218             
       
  1219             ERROR;
       
  1220         }
       
  1221         
       
  1222     }/*function_sint_to_word*/
       
  1223     break;
       
  1224 
       
  1225 /****
       
  1226  *SINT_TO_STRING
       
  1227  */
       
  1228     case function_sint_to_string :
       
  1229     {
       
  1230         symbol_c *last_type_symbol = NULL;
       
  1231 
       
  1232         {
       
  1233             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1234             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1235             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1236             symbol_c *IN_type_symbol = NULL;
       
  1237             
       
  1238             /* Get the value from a foo(<param_value>) style call */
       
  1239             if (IN_param_value == NULL)
       
  1240               IN_param_value = function_call_param_iterator.next_nf();
       
  1241             if (IN_param_value != NULL) {
       
  1242               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1243               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1244             }
       
  1245             
       
  1246             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1247             {
       
  1248         
       
  1249                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  1250                 
       
  1251                 if (IN_type_symbol == NULL)
       
  1252                   IN_type_symbol = last_type_symbol;
       
  1253                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1254                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1255                 function_type_prefix = return_type_symbol;
       
  1256                 break;
       
  1257                 
       
  1258             }
       
  1259             
       
  1260             
       
  1261             ERROR;
       
  1262         }
       
  1263         
       
  1264     }/*function_sint_to_string*/
       
  1265     break;
       
  1266 
       
  1267 /****
       
  1268  *SINT_TO_LWORD
       
  1269  */
       
  1270     case function_sint_to_lword :
       
  1271     {
       
  1272         symbol_c *last_type_symbol = NULL;
       
  1273 
       
  1274         {
       
  1275             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1276             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1277             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1278             symbol_c *IN_type_symbol = NULL;
       
  1279             
       
  1280             /* Get the value from a foo(<param_value>) style call */
       
  1281             if (IN_param_value == NULL)
       
  1282               IN_param_value = function_call_param_iterator.next_nf();
       
  1283             if (IN_param_value != NULL) {
       
  1284               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1285               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1286             }
       
  1287             
       
  1288             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1289             {
       
  1290         
       
  1291                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1292                 
       
  1293                 if (IN_type_symbol == NULL)
       
  1294                   IN_type_symbol = last_type_symbol;
       
  1295                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1296                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1297                 function_type_prefix = return_type_symbol;
       
  1298                 function_type_suffix = IN_type_symbol;
       
  1299                 break;
       
  1300                 
       
  1301             }
       
  1302             
       
  1303             
       
  1304             ERROR;
       
  1305         }
       
  1306         
       
  1307     }/*function_sint_to_lword*/
       
  1308     break;
       
  1309 
       
  1310 /****
       
  1311  *SINT_TO_UINT
       
  1312  */
       
  1313     case function_sint_to_uint :
       
  1314     {
       
  1315         symbol_c *last_type_symbol = NULL;
       
  1316 
       
  1317         {
       
  1318             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1319             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1320             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1321             symbol_c *IN_type_symbol = NULL;
       
  1322             
       
  1323             /* Get the value from a foo(<param_value>) style call */
       
  1324             if (IN_param_value == NULL)
       
  1325               IN_param_value = function_call_param_iterator.next_nf();
       
  1326             if (IN_param_value != NULL) {
       
  1327               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1328               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1329             }
       
  1330             
       
  1331             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1332             {
       
  1333         
       
  1334                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1335                 
       
  1336                 if (IN_type_symbol == NULL)
       
  1337                   IN_type_symbol = last_type_symbol;
       
  1338                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1339                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1340                 function_type_prefix = return_type_symbol;
       
  1341                 function_type_suffix = IN_type_symbol;
       
  1342                 break;
       
  1343                 
       
  1344             }
       
  1345             
       
  1346             
       
  1347             ERROR;
       
  1348         }
       
  1349         
       
  1350     }/*function_sint_to_uint*/
       
  1351     break;
       
  1352 
       
  1353 /****
       
  1354  *SINT_TO_LREAL
       
  1355  */
       
  1356     case function_sint_to_lreal :
       
  1357     {
       
  1358         symbol_c *last_type_symbol = NULL;
       
  1359 
       
  1360         {
       
  1361             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1363             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1364             symbol_c *IN_type_symbol = NULL;
       
  1365             
       
  1366             /* Get the value from a foo(<param_value>) style call */
       
  1367             if (IN_param_value == NULL)
       
  1368               IN_param_value = function_call_param_iterator.next_nf();
       
  1369             if (IN_param_value != NULL) {
       
  1370               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1371               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1372             }
       
  1373             
       
  1374             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1375             {
       
  1376         
       
  1377                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1378                 
       
  1379                 if (IN_type_symbol == NULL)
       
  1380                   IN_type_symbol = last_type_symbol;
       
  1381                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1382                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1383                 function_type_prefix = return_type_symbol;
       
  1384                 function_type_suffix = IN_type_symbol;
       
  1385                 break;
       
  1386                 
       
  1387             }
       
  1388             
       
  1389             
       
  1390             ERROR;
       
  1391         }
       
  1392         
       
  1393     }/*function_sint_to_lreal*/
       
  1394     break;
       
  1395 
       
  1396 /****
       
  1397  *SINT_TO_BYTE
       
  1398  */
       
  1399     case function_sint_to_byte :
       
  1400     {
       
  1401         symbol_c *last_type_symbol = NULL;
       
  1402 
       
  1403         {
       
  1404             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1405             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1406             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1407             symbol_c *IN_type_symbol = NULL;
       
  1408             
       
  1409             /* Get the value from a foo(<param_value>) style call */
       
  1410             if (IN_param_value == NULL)
       
  1411               IN_param_value = function_call_param_iterator.next_nf();
       
  1412             if (IN_param_value != NULL) {
       
  1413               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1414               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1415             }
       
  1416             
       
  1417             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1418             {
       
  1419         
       
  1420                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1421                 
       
  1422                 if (IN_type_symbol == NULL)
       
  1423                   IN_type_symbol = last_type_symbol;
       
  1424                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1425                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1426                 function_type_prefix = return_type_symbol;
       
  1427                 function_type_suffix = IN_type_symbol;
       
  1428                 break;
       
  1429                 
       
  1430             }
       
  1431             
       
  1432             
       
  1433             ERROR;
       
  1434         }
       
  1435         
       
  1436     }/*function_sint_to_byte*/
       
  1437     break;
       
  1438 
       
  1439 /****
       
  1440  *SINT_TO_USINT
       
  1441  */
       
  1442     case function_sint_to_usint :
       
  1443     {
       
  1444         symbol_c *last_type_symbol = NULL;
       
  1445 
       
  1446         {
       
  1447             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1449             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1450             symbol_c *IN_type_symbol = NULL;
       
  1451             
       
  1452             /* Get the value from a foo(<param_value>) style call */
       
  1453             if (IN_param_value == NULL)
       
  1454               IN_param_value = function_call_param_iterator.next_nf();
       
  1455             if (IN_param_value != NULL) {
       
  1456               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1457               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1458             }
       
  1459             
       
  1460             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1461             {
       
  1462         
       
  1463                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1464                 
       
  1465                 if (IN_type_symbol == NULL)
       
  1466                   IN_type_symbol = last_type_symbol;
       
  1467                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1468                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1469                 function_type_prefix = return_type_symbol;
       
  1470                 function_type_suffix = IN_type_symbol;
       
  1471                 break;
       
  1472                 
       
  1473             }
       
  1474             
       
  1475             
       
  1476             ERROR;
       
  1477         }
       
  1478         
       
  1479     }/*function_sint_to_usint*/
       
  1480     break;
       
  1481 
       
  1482 /****
       
  1483  *SINT_TO_ULINT
       
  1484  */
       
  1485     case function_sint_to_ulint :
       
  1486     {
       
  1487         symbol_c *last_type_symbol = NULL;
       
  1488 
       
  1489         {
       
  1490             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1491             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1492             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1493             symbol_c *IN_type_symbol = NULL;
       
  1494             
       
  1495             /* Get the value from a foo(<param_value>) style call */
       
  1496             if (IN_param_value == NULL)
       
  1497               IN_param_value = function_call_param_iterator.next_nf();
       
  1498             if (IN_param_value != NULL) {
       
  1499               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1500               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1501             }
       
  1502             
       
  1503             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1504             {
       
  1505         
       
  1506                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1507                 
       
  1508                 if (IN_type_symbol == NULL)
       
  1509                   IN_type_symbol = last_type_symbol;
       
  1510                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1511                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1512                 function_type_prefix = return_type_symbol;
       
  1513                 function_type_suffix = IN_type_symbol;
       
  1514                 break;
       
  1515                 
       
  1516             }
       
  1517             
       
  1518             
       
  1519             ERROR;
       
  1520         }
       
  1521         
       
  1522     }/*function_sint_to_ulint*/
       
  1523     break;
       
  1524 
       
  1525 /****
       
  1526  *SINT_TO_BOOL
       
  1527  */
       
  1528     case function_sint_to_bool :
       
  1529     {
       
  1530         symbol_c *last_type_symbol = NULL;
       
  1531 
       
  1532         {
       
  1533             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1534             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1535             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1536             symbol_c *IN_type_symbol = NULL;
       
  1537             
       
  1538             /* Get the value from a foo(<param_value>) style call */
       
  1539             if (IN_param_value == NULL)
       
  1540               IN_param_value = function_call_param_iterator.next_nf();
       
  1541             if (IN_param_value != NULL) {
       
  1542               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1543               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1544             }
       
  1545             
       
  1546             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1547             {
       
  1548         
       
  1549                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1550                 
       
  1551                 if (IN_type_symbol == NULL)
       
  1552                   IN_type_symbol = last_type_symbol;
       
  1553                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1554                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1555                 function_type_prefix = return_type_symbol;
       
  1556                 function_type_suffix = IN_type_symbol;
       
  1557                 break;
       
  1558                 
       
  1559             }
       
  1560             
       
  1561             
       
  1562             ERROR;
       
  1563         }
       
  1564         
       
  1565     }/*function_sint_to_bool*/
       
  1566     break;
       
  1567 
       
  1568 /****
       
  1569  *SINT_TO_TIME
       
  1570  */
       
  1571     case function_sint_to_time :
       
  1572     {
       
  1573         symbol_c *last_type_symbol = NULL;
       
  1574 
       
  1575         {
       
  1576             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1577             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1578             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1579             symbol_c *IN_type_symbol = NULL;
       
  1580             
       
  1581             /* Get the value from a foo(<param_value>) style call */
       
  1582             if (IN_param_value == NULL)
       
  1583               IN_param_value = function_call_param_iterator.next_nf();
       
  1584             if (IN_param_value != NULL) {
       
  1585               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1586               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1587             }
       
  1588             
       
  1589             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1590             {
       
  1591         
       
  1592                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1593                 
       
  1594                 if (IN_type_symbol == NULL)
       
  1595                   IN_type_symbol = last_type_symbol;
       
  1596                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1597                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1598                 function_type_prefix = return_type_symbol;
       
  1599                 break;
       
  1600                 
       
  1601             }
       
  1602             
       
  1603             
       
  1604             ERROR;
       
  1605         }
       
  1606         
       
  1607     }/*function_sint_to_time*/
       
  1608     break;
       
  1609 
       
  1610 /****
       
  1611  *SINT_TO_INT
       
  1612  */
       
  1613     case function_sint_to_int :
       
  1614     {
       
  1615         symbol_c *last_type_symbol = NULL;
       
  1616 
       
  1617         {
       
  1618             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1619             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1620             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1621             symbol_c *IN_type_symbol = NULL;
       
  1622             
       
  1623             /* Get the value from a foo(<param_value>) style call */
       
  1624             if (IN_param_value == NULL)
       
  1625               IN_param_value = function_call_param_iterator.next_nf();
       
  1626             if (IN_param_value != NULL) {
       
  1627               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1628               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1629             }
       
  1630             
       
  1631             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1632             {
       
  1633         
       
  1634                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1635                 
       
  1636                 if (IN_type_symbol == NULL)
       
  1637                   IN_type_symbol = last_type_symbol;
       
  1638                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1639                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1640                 function_type_prefix = return_type_symbol;
       
  1641                 function_type_suffix = IN_type_symbol;
       
  1642                 break;
       
  1643                 
       
  1644             }
       
  1645             
       
  1646             
       
  1647             ERROR;
       
  1648         }
       
  1649         
       
  1650     }/*function_sint_to_int*/
       
  1651     break;
       
  1652 
       
  1653 /****
       
  1654  *LINT_TO_REAL
       
  1655  */
       
  1656     case function_lint_to_real :
       
  1657     {
       
  1658         symbol_c *last_type_symbol = NULL;
       
  1659 
       
  1660         {
       
  1661             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1662             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1663             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1664             symbol_c *IN_type_symbol = NULL;
       
  1665             
       
  1666             /* Get the value from a foo(<param_value>) style call */
       
  1667             if (IN_param_value == NULL)
       
  1668               IN_param_value = function_call_param_iterator.next_nf();
       
  1669             if (IN_param_value != NULL) {
       
  1670               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1671               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1672             }
       
  1673             
       
  1674             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1675             {
       
  1676         
       
  1677                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1678                 
       
  1679                 if (IN_type_symbol == NULL)
       
  1680                   IN_type_symbol = last_type_symbol;
       
  1681                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1682                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1683                 function_type_prefix = return_type_symbol;
       
  1684                 function_type_suffix = IN_type_symbol;
       
  1685                 break;
       
  1686                 
       
  1687             }
       
  1688             
       
  1689             
       
  1690             ERROR;
       
  1691         }
       
  1692         
       
  1693     }/*function_lint_to_real*/
       
  1694     break;
       
  1695 
       
  1696 /****
       
  1697  *LINT_TO_SINT
       
  1698  */
       
  1699     case function_lint_to_sint :
       
  1700     {
       
  1701         symbol_c *last_type_symbol = NULL;
       
  1702 
       
  1703         {
       
  1704             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1705             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1706             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1707             symbol_c *IN_type_symbol = NULL;
       
  1708             
       
  1709             /* Get the value from a foo(<param_value>) style call */
       
  1710             if (IN_param_value == NULL)
       
  1711               IN_param_value = function_call_param_iterator.next_nf();
       
  1712             if (IN_param_value != NULL) {
       
  1713               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1714               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1715             }
       
  1716             
       
  1717             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1718             {
       
  1719         
       
  1720                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1721                 
       
  1722                 if (IN_type_symbol == NULL)
       
  1723                   IN_type_symbol = last_type_symbol;
       
  1724                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1725                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1726                 function_type_prefix = return_type_symbol;
       
  1727                 function_type_suffix = IN_type_symbol;
       
  1728                 break;
       
  1729                 
       
  1730             }
       
  1731             
       
  1732             
       
  1733             ERROR;
       
  1734         }
       
  1735         
       
  1736     }/*function_lint_to_sint*/
       
  1737     break;
       
  1738 
       
  1739 /****
       
  1740  *LINT_TO_DINT
       
  1741  */
       
  1742     case function_lint_to_dint :
       
  1743     {
       
  1744         symbol_c *last_type_symbol = NULL;
       
  1745 
       
  1746         {
       
  1747             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1748             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1749             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1750             symbol_c *IN_type_symbol = NULL;
       
  1751             
       
  1752             /* Get the value from a foo(<param_value>) style call */
       
  1753             if (IN_param_value == NULL)
       
  1754               IN_param_value = function_call_param_iterator.next_nf();
       
  1755             if (IN_param_value != NULL) {
       
  1756               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1757               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1758             }
       
  1759             
       
  1760             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1761             {
       
  1762         
       
  1763                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1764                 
       
  1765                 if (IN_type_symbol == NULL)
       
  1766                   IN_type_symbol = last_type_symbol;
       
  1767                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1768                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1769                 function_type_prefix = return_type_symbol;
       
  1770                 function_type_suffix = IN_type_symbol;
       
  1771                 break;
       
  1772                 
       
  1773             }
       
  1774             
       
  1775             
       
  1776             ERROR;
       
  1777         }
       
  1778         
       
  1779     }/*function_lint_to_dint*/
       
  1780     break;
       
  1781 
       
  1782 /****
       
  1783  *LINT_TO_DATE
       
  1784  */
       
  1785     case function_lint_to_date :
       
  1786     {
       
  1787         symbol_c *last_type_symbol = NULL;
       
  1788 
       
  1789         {
       
  1790             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1791             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1792             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1793             symbol_c *IN_type_symbol = NULL;
       
  1794             
       
  1795             /* Get the value from a foo(<param_value>) style call */
       
  1796             if (IN_param_value == NULL)
       
  1797               IN_param_value = function_call_param_iterator.next_nf();
       
  1798             if (IN_param_value != NULL) {
       
  1799               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1800               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1801             }
       
  1802             
       
  1803             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1804             {
       
  1805         
       
  1806                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1807                 
       
  1808                 if (IN_type_symbol == NULL)
       
  1809                   IN_type_symbol = last_type_symbol;
       
  1810                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1811                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1812                 function_type_prefix = return_type_symbol;
       
  1813                 break;
       
  1814                 
       
  1815             }
       
  1816             
       
  1817             
       
  1818             ERROR;
       
  1819         }
       
  1820         
       
  1821     }/*function_lint_to_date*/
       
  1822     break;
       
  1823 
       
  1824 /****
       
  1825  *LINT_TO_DWORD
       
  1826  */
       
  1827     case function_lint_to_dword :
       
  1828     {
       
  1829         symbol_c *last_type_symbol = NULL;
       
  1830 
       
  1831         {
       
  1832             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1833             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1834             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1835             symbol_c *IN_type_symbol = NULL;
       
  1836             
       
  1837             /* Get the value from a foo(<param_value>) style call */
       
  1838             if (IN_param_value == NULL)
       
  1839               IN_param_value = function_call_param_iterator.next_nf();
       
  1840             if (IN_param_value != NULL) {
       
  1841               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1842               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1843             }
       
  1844             
       
  1845             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1846             {
       
  1847         
       
  1848                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1849                 
       
  1850                 if (IN_type_symbol == NULL)
       
  1851                   IN_type_symbol = last_type_symbol;
       
  1852                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1853                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1854                 function_type_prefix = return_type_symbol;
       
  1855                 function_type_suffix = IN_type_symbol;
       
  1856                 break;
       
  1857                 
       
  1858             }
       
  1859             
       
  1860             
       
  1861             ERROR;
       
  1862         }
       
  1863         
       
  1864     }/*function_lint_to_dword*/
       
  1865     break;
       
  1866 
       
  1867 /****
       
  1868  *LINT_TO_DT
       
  1869  */
       
  1870     case function_lint_to_dt :
       
  1871     {
       
  1872         symbol_c *last_type_symbol = NULL;
       
  1873 
       
  1874         {
       
  1875             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1876             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1877             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1878             symbol_c *IN_type_symbol = NULL;
       
  1879             
       
  1880             /* Get the value from a foo(<param_value>) style call */
       
  1881             if (IN_param_value == NULL)
       
  1882               IN_param_value = function_call_param_iterator.next_nf();
       
  1883             if (IN_param_value != NULL) {
       
  1884               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1885               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1886             }
       
  1887             
       
  1888             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1889             {
       
  1890         
       
  1891                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1892                 
       
  1893                 if (IN_type_symbol == NULL)
       
  1894                   IN_type_symbol = last_type_symbol;
       
  1895                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1896                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1897                 function_type_prefix = return_type_symbol;
       
  1898                 break;
       
  1899                 
       
  1900             }
       
  1901             
       
  1902             
       
  1903             ERROR;
       
  1904         }
       
  1905         
       
  1906     }/*function_lint_to_dt*/
       
  1907     break;
       
  1908 
       
  1909 /****
       
  1910  *LINT_TO_TOD
       
  1911  */
       
  1912     case function_lint_to_tod :
       
  1913     {
       
  1914         symbol_c *last_type_symbol = NULL;
       
  1915 
       
  1916         {
       
  1917             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1918             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1919             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1920             symbol_c *IN_type_symbol = NULL;
       
  1921             
       
  1922             /* Get the value from a foo(<param_value>) style call */
       
  1923             if (IN_param_value == NULL)
       
  1924               IN_param_value = function_call_param_iterator.next_nf();
       
  1925             if (IN_param_value != NULL) {
       
  1926               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1927               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1928             }
       
  1929             
       
  1930             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1931             {
       
  1932         
       
  1933                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  1934                 
       
  1935                 if (IN_type_symbol == NULL)
       
  1936                   IN_type_symbol = last_type_symbol;
       
  1937                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1938                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1939                 function_type_prefix = return_type_symbol;
       
  1940                 break;
       
  1941                 
       
  1942             }
       
  1943             
       
  1944             
       
  1945             ERROR;
       
  1946         }
       
  1947         
       
  1948     }/*function_lint_to_tod*/
       
  1949     break;
       
  1950 
       
  1951 /****
       
  1952  *LINT_TO_UDINT
       
  1953  */
       
  1954     case function_lint_to_udint :
       
  1955     {
       
  1956         symbol_c *last_type_symbol = NULL;
       
  1957 
       
  1958         {
       
  1959             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  1960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1961             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  1962             symbol_c *IN_type_symbol = NULL;
       
  1963             
       
  1964             /* Get the value from a foo(<param_value>) style call */
       
  1965             if (IN_param_value == NULL)
       
  1966               IN_param_value = function_call_param_iterator.next_nf();
       
  1967             if (IN_param_value != NULL) {
       
  1968               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1969               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1970             }
       
  1971             
       
  1972             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1973             {
       
  1974         
       
  1975                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  1976                 
       
  1977                 if (IN_type_symbol == NULL)
       
  1978                   IN_type_symbol = last_type_symbol;
       
  1979                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  1980                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1981                 function_type_prefix = return_type_symbol;
       
  1982                 function_type_suffix = IN_type_symbol;
       
  1983                 break;
       
  1984                 
       
  1985             }
       
  1986             
       
  1987             
       
  1988             ERROR;
       
  1989         }
       
  1990         
       
  1991     }/*function_lint_to_udint*/
       
  1992     break;
       
  1993 
       
  1994 /****
       
  1995  *LINT_TO_WORD
       
  1996  */
       
  1997     case function_lint_to_word :
       
  1998     {
       
  1999         symbol_c *last_type_symbol = NULL;
       
  2000 
       
  2001         {
       
  2002             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2003             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2004             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2005             symbol_c *IN_type_symbol = NULL;
       
  2006             
       
  2007             /* Get the value from a foo(<param_value>) style call */
       
  2008             if (IN_param_value == NULL)
       
  2009               IN_param_value = function_call_param_iterator.next_nf();
       
  2010             if (IN_param_value != NULL) {
       
  2011               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2012               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2013             }
       
  2014             
       
  2015             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2016             {
       
  2017         
       
  2018                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2019                 
       
  2020                 if (IN_type_symbol == NULL)
       
  2021                   IN_type_symbol = last_type_symbol;
       
  2022                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2023                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2024                 function_type_prefix = return_type_symbol;
       
  2025                 function_type_suffix = IN_type_symbol;
       
  2026                 break;
       
  2027                 
       
  2028             }
       
  2029             
       
  2030             
       
  2031             ERROR;
       
  2032         }
       
  2033         
       
  2034     }/*function_lint_to_word*/
       
  2035     break;
       
  2036 
       
  2037 /****
       
  2038  *LINT_TO_STRING
       
  2039  */
       
  2040     case function_lint_to_string :
       
  2041     {
       
  2042         symbol_c *last_type_symbol = NULL;
       
  2043 
       
  2044         {
       
  2045             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2046             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2047             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2048             symbol_c *IN_type_symbol = NULL;
       
  2049             
       
  2050             /* Get the value from a foo(<param_value>) style call */
       
  2051             if (IN_param_value == NULL)
       
  2052               IN_param_value = function_call_param_iterator.next_nf();
       
  2053             if (IN_param_value != NULL) {
       
  2054               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2055               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2056             }
       
  2057             
       
  2058             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2059             {
       
  2060         
       
  2061                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2062                 
       
  2063                 if (IN_type_symbol == NULL)
       
  2064                   IN_type_symbol = last_type_symbol;
       
  2065                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2066                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2067                 function_type_prefix = return_type_symbol;
       
  2068                 break;
       
  2069                 
       
  2070             }
       
  2071             
       
  2072             
       
  2073             ERROR;
       
  2074         }
       
  2075         
       
  2076     }/*function_lint_to_string*/
       
  2077     break;
       
  2078 
       
  2079 /****
       
  2080  *LINT_TO_LWORD
       
  2081  */
       
  2082     case function_lint_to_lword :
       
  2083     {
       
  2084         symbol_c *last_type_symbol = NULL;
       
  2085 
       
  2086         {
       
  2087             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2089             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2090             symbol_c *IN_type_symbol = NULL;
       
  2091             
       
  2092             /* Get the value from a foo(<param_value>) style call */
       
  2093             if (IN_param_value == NULL)
       
  2094               IN_param_value = function_call_param_iterator.next_nf();
       
  2095             if (IN_param_value != NULL) {
       
  2096               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2097               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2098             }
       
  2099             
       
  2100             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2101             {
       
  2102         
       
  2103                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2104                 
       
  2105                 if (IN_type_symbol == NULL)
       
  2106                   IN_type_symbol = last_type_symbol;
       
  2107                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2108                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2109                 function_type_prefix = return_type_symbol;
       
  2110                 function_type_suffix = IN_type_symbol;
       
  2111                 break;
       
  2112                 
       
  2113             }
       
  2114             
       
  2115             
       
  2116             ERROR;
       
  2117         }
       
  2118         
       
  2119     }/*function_lint_to_lword*/
       
  2120     break;
       
  2121 
       
  2122 /****
       
  2123  *LINT_TO_UINT
       
  2124  */
       
  2125     case function_lint_to_uint :
       
  2126     {
       
  2127         symbol_c *last_type_symbol = NULL;
       
  2128 
       
  2129         {
       
  2130             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2131             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2132             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2133             symbol_c *IN_type_symbol = NULL;
       
  2134             
       
  2135             /* Get the value from a foo(<param_value>) style call */
       
  2136             if (IN_param_value == NULL)
       
  2137               IN_param_value = function_call_param_iterator.next_nf();
       
  2138             if (IN_param_value != NULL) {
       
  2139               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2140               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2141             }
       
  2142             
       
  2143             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2144             {
       
  2145         
       
  2146                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2147                 
       
  2148                 if (IN_type_symbol == NULL)
       
  2149                   IN_type_symbol = last_type_symbol;
       
  2150                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2151                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2152                 function_type_prefix = return_type_symbol;
       
  2153                 function_type_suffix = IN_type_symbol;
       
  2154                 break;
       
  2155                 
       
  2156             }
       
  2157             
       
  2158             
       
  2159             ERROR;
       
  2160         }
       
  2161         
       
  2162     }/*function_lint_to_uint*/
       
  2163     break;
       
  2164 
       
  2165 /****
       
  2166  *LINT_TO_LREAL
       
  2167  */
       
  2168     case function_lint_to_lreal :
       
  2169     {
       
  2170         symbol_c *last_type_symbol = NULL;
       
  2171 
       
  2172         {
       
  2173             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2174             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2175             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2176             symbol_c *IN_type_symbol = NULL;
       
  2177             
       
  2178             /* Get the value from a foo(<param_value>) style call */
       
  2179             if (IN_param_value == NULL)
       
  2180               IN_param_value = function_call_param_iterator.next_nf();
       
  2181             if (IN_param_value != NULL) {
       
  2182               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2183               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2184             }
       
  2185             
       
  2186             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2187             {
       
  2188         
       
  2189                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2190                 
       
  2191                 if (IN_type_symbol == NULL)
       
  2192                   IN_type_symbol = last_type_symbol;
       
  2193                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2194                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2195                 function_type_prefix = return_type_symbol;
       
  2196                 function_type_suffix = IN_type_symbol;
       
  2197                 break;
       
  2198                 
       
  2199             }
       
  2200             
       
  2201             
       
  2202             ERROR;
       
  2203         }
       
  2204         
       
  2205     }/*function_lint_to_lreal*/
       
  2206     break;
       
  2207 
       
  2208 /****
       
  2209  *LINT_TO_BYTE
       
  2210  */
       
  2211     case function_lint_to_byte :
       
  2212     {
       
  2213         symbol_c *last_type_symbol = NULL;
       
  2214 
       
  2215         {
       
  2216             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2217             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2218             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2219             symbol_c *IN_type_symbol = NULL;
       
  2220             
       
  2221             /* Get the value from a foo(<param_value>) style call */
       
  2222             if (IN_param_value == NULL)
       
  2223               IN_param_value = function_call_param_iterator.next_nf();
       
  2224             if (IN_param_value != NULL) {
       
  2225               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2226               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2227             }
       
  2228             
       
  2229             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2230             {
       
  2231         
       
  2232                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2233                 
       
  2234                 if (IN_type_symbol == NULL)
       
  2235                   IN_type_symbol = last_type_symbol;
       
  2236                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2237                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2238                 function_type_prefix = return_type_symbol;
       
  2239                 function_type_suffix = IN_type_symbol;
       
  2240                 break;
       
  2241                 
       
  2242             }
       
  2243             
       
  2244             
       
  2245             ERROR;
       
  2246         }
       
  2247         
       
  2248     }/*function_lint_to_byte*/
       
  2249     break;
       
  2250 
       
  2251 /****
       
  2252  *LINT_TO_USINT
       
  2253  */
       
  2254     case function_lint_to_usint :
       
  2255     {
       
  2256         symbol_c *last_type_symbol = NULL;
       
  2257 
       
  2258         {
       
  2259             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2261             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2262             symbol_c *IN_type_symbol = NULL;
       
  2263             
       
  2264             /* Get the value from a foo(<param_value>) style call */
       
  2265             if (IN_param_value == NULL)
       
  2266               IN_param_value = function_call_param_iterator.next_nf();
       
  2267             if (IN_param_value != NULL) {
       
  2268               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2269               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2270             }
       
  2271             
       
  2272             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2273             {
       
  2274         
       
  2275                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2276                 
       
  2277                 if (IN_type_symbol == NULL)
       
  2278                   IN_type_symbol = last_type_symbol;
       
  2279                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2280                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2281                 function_type_prefix = return_type_symbol;
       
  2282                 function_type_suffix = IN_type_symbol;
       
  2283                 break;
       
  2284                 
       
  2285             }
       
  2286             
       
  2287             
       
  2288             ERROR;
       
  2289         }
       
  2290         
       
  2291     }/*function_lint_to_usint*/
       
  2292     break;
       
  2293 
       
  2294 /****
       
  2295  *LINT_TO_ULINT
       
  2296  */
       
  2297     case function_lint_to_ulint :
       
  2298     {
       
  2299         symbol_c *last_type_symbol = NULL;
       
  2300 
       
  2301         {
       
  2302             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2304             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2305             symbol_c *IN_type_symbol = NULL;
       
  2306             
       
  2307             /* Get the value from a foo(<param_value>) style call */
       
  2308             if (IN_param_value == NULL)
       
  2309               IN_param_value = function_call_param_iterator.next_nf();
       
  2310             if (IN_param_value != NULL) {
       
  2311               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2312               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2313             }
       
  2314             
       
  2315             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2316             {
       
  2317         
       
  2318                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2319                 
       
  2320                 if (IN_type_symbol == NULL)
       
  2321                   IN_type_symbol = last_type_symbol;
       
  2322                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2323                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2324                 function_type_prefix = return_type_symbol;
       
  2325                 function_type_suffix = IN_type_symbol;
       
  2326                 break;
       
  2327                 
       
  2328             }
       
  2329             
       
  2330             
       
  2331             ERROR;
       
  2332         }
       
  2333         
       
  2334     }/*function_lint_to_ulint*/
       
  2335     break;
       
  2336 
       
  2337 /****
       
  2338  *LINT_TO_BOOL
       
  2339  */
       
  2340     case function_lint_to_bool :
       
  2341     {
       
  2342         symbol_c *last_type_symbol = NULL;
       
  2343 
       
  2344         {
       
  2345             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2346             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2347             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2348             symbol_c *IN_type_symbol = NULL;
       
  2349             
       
  2350             /* Get the value from a foo(<param_value>) style call */
       
  2351             if (IN_param_value == NULL)
       
  2352               IN_param_value = function_call_param_iterator.next_nf();
       
  2353             if (IN_param_value != NULL) {
       
  2354               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2355               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2356             }
       
  2357             
       
  2358             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2359             {
       
  2360         
       
  2361                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2362                 
       
  2363                 if (IN_type_symbol == NULL)
       
  2364                   IN_type_symbol = last_type_symbol;
       
  2365                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2366                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2367                 function_type_prefix = return_type_symbol;
       
  2368                 function_type_suffix = IN_type_symbol;
       
  2369                 break;
       
  2370                 
       
  2371             }
       
  2372             
       
  2373             
       
  2374             ERROR;
       
  2375         }
       
  2376         
       
  2377     }/*function_lint_to_bool*/
       
  2378     break;
       
  2379 
       
  2380 /****
       
  2381  *LINT_TO_TIME
       
  2382  */
       
  2383     case function_lint_to_time :
       
  2384     {
       
  2385         symbol_c *last_type_symbol = NULL;
       
  2386 
       
  2387         {
       
  2388             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2389             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2390             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2391             symbol_c *IN_type_symbol = NULL;
       
  2392             
       
  2393             /* Get the value from a foo(<param_value>) style call */
       
  2394             if (IN_param_value == NULL)
       
  2395               IN_param_value = function_call_param_iterator.next_nf();
       
  2396             if (IN_param_value != NULL) {
       
  2397               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2398               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2399             }
       
  2400             
       
  2401             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2402             {
       
  2403         
       
  2404                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2405                 
       
  2406                 if (IN_type_symbol == NULL)
       
  2407                   IN_type_symbol = last_type_symbol;
       
  2408                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2409                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2410                 function_type_prefix = return_type_symbol;
       
  2411                 break;
       
  2412                 
       
  2413             }
       
  2414             
       
  2415             
       
  2416             ERROR;
       
  2417         }
       
  2418         
       
  2419     }/*function_lint_to_time*/
       
  2420     break;
       
  2421 
       
  2422 /****
       
  2423  *LINT_TO_INT
       
  2424  */
       
  2425     case function_lint_to_int :
       
  2426     {
       
  2427         symbol_c *last_type_symbol = NULL;
       
  2428 
       
  2429         {
       
  2430             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2431             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2432             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2433             symbol_c *IN_type_symbol = NULL;
       
  2434             
       
  2435             /* Get the value from a foo(<param_value>) style call */
       
  2436             if (IN_param_value == NULL)
       
  2437               IN_param_value = function_call_param_iterator.next_nf();
       
  2438             if (IN_param_value != NULL) {
       
  2439               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2440               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2441             }
       
  2442             
       
  2443             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2444             {
       
  2445         
       
  2446                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2447                 
       
  2448                 if (IN_type_symbol == NULL)
       
  2449                   IN_type_symbol = last_type_symbol;
       
  2450                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2451                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2452                 function_type_prefix = return_type_symbol;
       
  2453                 function_type_suffix = IN_type_symbol;
       
  2454                 break;
       
  2455                 
       
  2456             }
       
  2457             
       
  2458             
       
  2459             ERROR;
       
  2460         }
       
  2461         
       
  2462     }/*function_lint_to_int*/
       
  2463     break;
       
  2464 
       
  2465 /****
       
  2466  *DINT_TO_REAL
       
  2467  */
       
  2468     case function_dint_to_real :
       
  2469     {
       
  2470         symbol_c *last_type_symbol = NULL;
       
  2471 
       
  2472         {
       
  2473             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2474             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2475             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2476             symbol_c *IN_type_symbol = NULL;
       
  2477             
       
  2478             /* Get the value from a foo(<param_value>) style call */
       
  2479             if (IN_param_value == NULL)
       
  2480               IN_param_value = function_call_param_iterator.next_nf();
       
  2481             if (IN_param_value != NULL) {
       
  2482               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2483               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2484             }
       
  2485             
       
  2486             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2487             {
       
  2488         
       
  2489                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2490                 
       
  2491                 if (IN_type_symbol == NULL)
       
  2492                   IN_type_symbol = last_type_symbol;
       
  2493                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2494                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2495                 function_type_prefix = return_type_symbol;
       
  2496                 function_type_suffix = IN_type_symbol;
       
  2497                 break;
       
  2498                 
       
  2499             }
       
  2500             
       
  2501             
       
  2502             ERROR;
       
  2503         }
       
  2504         
       
  2505     }/*function_dint_to_real*/
       
  2506     break;
       
  2507 
       
  2508 /****
       
  2509  *DINT_TO_SINT
       
  2510  */
       
  2511     case function_dint_to_sint :
       
  2512     {
       
  2513         symbol_c *last_type_symbol = NULL;
       
  2514 
       
  2515         {
       
  2516             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2517             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2518             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2519             symbol_c *IN_type_symbol = NULL;
       
  2520             
       
  2521             /* Get the value from a foo(<param_value>) style call */
       
  2522             if (IN_param_value == NULL)
       
  2523               IN_param_value = function_call_param_iterator.next_nf();
       
  2524             if (IN_param_value != NULL) {
       
  2525               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2526               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2527             }
       
  2528             
       
  2529             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2530             {
       
  2531         
       
  2532                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2533                 
       
  2534                 if (IN_type_symbol == NULL)
       
  2535                   IN_type_symbol = last_type_symbol;
       
  2536                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2537                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2538                 function_type_prefix = return_type_symbol;
       
  2539                 function_type_suffix = IN_type_symbol;
       
  2540                 break;
       
  2541                 
       
  2542             }
       
  2543             
       
  2544             
       
  2545             ERROR;
       
  2546         }
       
  2547         
       
  2548     }/*function_dint_to_sint*/
       
  2549     break;
       
  2550 
       
  2551 /****
       
  2552  *DINT_TO_LINT
       
  2553  */
       
  2554     case function_dint_to_lint :
       
  2555     {
       
  2556         symbol_c *last_type_symbol = NULL;
       
  2557 
       
  2558         {
       
  2559             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2561             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2562             symbol_c *IN_type_symbol = NULL;
       
  2563             
       
  2564             /* Get the value from a foo(<param_value>) style call */
       
  2565             if (IN_param_value == NULL)
       
  2566               IN_param_value = function_call_param_iterator.next_nf();
       
  2567             if (IN_param_value != NULL) {
       
  2568               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2569               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2570             }
       
  2571             
       
  2572             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2573             {
       
  2574         
       
  2575                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2576                 
       
  2577                 if (IN_type_symbol == NULL)
       
  2578                   IN_type_symbol = last_type_symbol;
       
  2579                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2580                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2581                 function_type_prefix = return_type_symbol;
       
  2582                 function_type_suffix = IN_type_symbol;
       
  2583                 break;
       
  2584                 
       
  2585             }
       
  2586             
       
  2587             
       
  2588             ERROR;
       
  2589         }
       
  2590         
       
  2591     }/*function_dint_to_lint*/
       
  2592     break;
       
  2593 
       
  2594 /****
       
  2595  *DINT_TO_DATE
       
  2596  */
       
  2597     case function_dint_to_date :
       
  2598     {
       
  2599         symbol_c *last_type_symbol = NULL;
       
  2600 
       
  2601         {
       
  2602             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2603             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2604             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2605             symbol_c *IN_type_symbol = NULL;
       
  2606             
       
  2607             /* Get the value from a foo(<param_value>) style call */
       
  2608             if (IN_param_value == NULL)
       
  2609               IN_param_value = function_call_param_iterator.next_nf();
       
  2610             if (IN_param_value != NULL) {
       
  2611               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2612               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2613             }
       
  2614             
       
  2615             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2616             {
       
  2617         
       
  2618                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2619                 
       
  2620                 if (IN_type_symbol == NULL)
       
  2621                   IN_type_symbol = last_type_symbol;
       
  2622                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2623                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2624                 function_type_prefix = return_type_symbol;
       
  2625                 break;
       
  2626                 
       
  2627             }
       
  2628             
       
  2629             
       
  2630             ERROR;
       
  2631         }
       
  2632         
       
  2633     }/*function_dint_to_date*/
       
  2634     break;
       
  2635 
       
  2636 /****
       
  2637  *DINT_TO_DWORD
       
  2638  */
       
  2639     case function_dint_to_dword :
       
  2640     {
       
  2641         symbol_c *last_type_symbol = NULL;
       
  2642 
       
  2643         {
       
  2644             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2645             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2646             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2647             symbol_c *IN_type_symbol = NULL;
       
  2648             
       
  2649             /* Get the value from a foo(<param_value>) style call */
       
  2650             if (IN_param_value == NULL)
       
  2651               IN_param_value = function_call_param_iterator.next_nf();
       
  2652             if (IN_param_value != NULL) {
       
  2653               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2654               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2655             }
       
  2656             
       
  2657             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2658             {
       
  2659         
       
  2660                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2661                 
       
  2662                 if (IN_type_symbol == NULL)
       
  2663                   IN_type_symbol = last_type_symbol;
       
  2664                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2665                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2666                 function_type_prefix = return_type_symbol;
       
  2667                 function_type_suffix = IN_type_symbol;
       
  2668                 break;
       
  2669                 
       
  2670             }
       
  2671             
       
  2672             
       
  2673             ERROR;
       
  2674         }
       
  2675         
       
  2676     }/*function_dint_to_dword*/
       
  2677     break;
       
  2678 
       
  2679 /****
       
  2680  *DINT_TO_DT
       
  2681  */
       
  2682     case function_dint_to_dt :
       
  2683     {
       
  2684         symbol_c *last_type_symbol = NULL;
       
  2685 
       
  2686         {
       
  2687             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2689             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2690             symbol_c *IN_type_symbol = NULL;
       
  2691             
       
  2692             /* Get the value from a foo(<param_value>) style call */
       
  2693             if (IN_param_value == NULL)
       
  2694               IN_param_value = function_call_param_iterator.next_nf();
       
  2695             if (IN_param_value != NULL) {
       
  2696               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2697               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2698             }
       
  2699             
       
  2700             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2701             {
       
  2702         
       
  2703                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2704                 
       
  2705                 if (IN_type_symbol == NULL)
       
  2706                   IN_type_symbol = last_type_symbol;
       
  2707                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2708                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2709                 function_type_prefix = return_type_symbol;
       
  2710                 break;
       
  2711                 
       
  2712             }
       
  2713             
       
  2714             
       
  2715             ERROR;
       
  2716         }
       
  2717         
       
  2718     }/*function_dint_to_dt*/
       
  2719     break;
       
  2720 
       
  2721 /****
       
  2722  *DINT_TO_TOD
       
  2723  */
       
  2724     case function_dint_to_tod :
       
  2725     {
       
  2726         symbol_c *last_type_symbol = NULL;
       
  2727 
       
  2728         {
       
  2729             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2730             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2731             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2732             symbol_c *IN_type_symbol = NULL;
       
  2733             
       
  2734             /* Get the value from a foo(<param_value>) style call */
       
  2735             if (IN_param_value == NULL)
       
  2736               IN_param_value = function_call_param_iterator.next_nf();
       
  2737             if (IN_param_value != NULL) {
       
  2738               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2739               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2740             }
       
  2741             
       
  2742             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2743             {
       
  2744         
       
  2745                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  2746                 
       
  2747                 if (IN_type_symbol == NULL)
       
  2748                   IN_type_symbol = last_type_symbol;
       
  2749                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2750                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2751                 function_type_prefix = return_type_symbol;
       
  2752                 break;
       
  2753                 
       
  2754             }
       
  2755             
       
  2756             
       
  2757             ERROR;
       
  2758         }
       
  2759         
       
  2760     }/*function_dint_to_tod*/
       
  2761     break;
       
  2762 
       
  2763 /****
       
  2764  *DINT_TO_UDINT
       
  2765  */
       
  2766     case function_dint_to_udint :
       
  2767     {
       
  2768         symbol_c *last_type_symbol = NULL;
       
  2769 
       
  2770         {
       
  2771             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2772             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2773             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2774             symbol_c *IN_type_symbol = NULL;
       
  2775             
       
  2776             /* Get the value from a foo(<param_value>) style call */
       
  2777             if (IN_param_value == NULL)
       
  2778               IN_param_value = function_call_param_iterator.next_nf();
       
  2779             if (IN_param_value != NULL) {
       
  2780               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2781               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2782             }
       
  2783             
       
  2784             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2785             {
       
  2786         
       
  2787                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2788                 
       
  2789                 if (IN_type_symbol == NULL)
       
  2790                   IN_type_symbol = last_type_symbol;
       
  2791                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2792                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2793                 function_type_prefix = return_type_symbol;
       
  2794                 function_type_suffix = IN_type_symbol;
       
  2795                 break;
       
  2796                 
       
  2797             }
       
  2798             
       
  2799             
       
  2800             ERROR;
       
  2801         }
       
  2802         
       
  2803     }/*function_dint_to_udint*/
       
  2804     break;
       
  2805 
       
  2806 /****
       
  2807  *DINT_TO_WORD
       
  2808  */
       
  2809     case function_dint_to_word :
       
  2810     {
       
  2811         symbol_c *last_type_symbol = NULL;
       
  2812 
       
  2813         {
       
  2814             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2815             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2816             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2817             symbol_c *IN_type_symbol = NULL;
       
  2818             
       
  2819             /* Get the value from a foo(<param_value>) style call */
       
  2820             if (IN_param_value == NULL)
       
  2821               IN_param_value = function_call_param_iterator.next_nf();
       
  2822             if (IN_param_value != NULL) {
       
  2823               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2824               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2825             }
       
  2826             
       
  2827             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2828             {
       
  2829         
       
  2830                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2831                 
       
  2832                 if (IN_type_symbol == NULL)
       
  2833                   IN_type_symbol = last_type_symbol;
       
  2834                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2835                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2836                 function_type_prefix = return_type_symbol;
       
  2837                 function_type_suffix = IN_type_symbol;
       
  2838                 break;
       
  2839                 
       
  2840             }
       
  2841             
       
  2842             
       
  2843             ERROR;
       
  2844         }
       
  2845         
       
  2846     }/*function_dint_to_word*/
       
  2847     break;
       
  2848 
       
  2849 /****
       
  2850  *DINT_TO_STRING
       
  2851  */
       
  2852     case function_dint_to_string :
       
  2853     {
       
  2854         symbol_c *last_type_symbol = NULL;
       
  2855 
       
  2856         {
       
  2857             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2858             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2859             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2860             symbol_c *IN_type_symbol = NULL;
       
  2861             
       
  2862             /* Get the value from a foo(<param_value>) style call */
       
  2863             if (IN_param_value == NULL)
       
  2864               IN_param_value = function_call_param_iterator.next_nf();
       
  2865             if (IN_param_value != NULL) {
       
  2866               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2867               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2868             }
       
  2869             
       
  2870             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2871             {
       
  2872         
       
  2873                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
       
  2874                 
       
  2875                 if (IN_type_symbol == NULL)
       
  2876                   IN_type_symbol = last_type_symbol;
       
  2877                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2878                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2879                 function_type_prefix = return_type_symbol;
       
  2880                 break;
       
  2881                 
       
  2882             }
       
  2883             
       
  2884             
       
  2885             ERROR;
       
  2886         }
       
  2887         
       
  2888     }/*function_dint_to_string*/
       
  2889     break;
       
  2890 
       
  2891 /****
       
  2892  *DINT_TO_LWORD
       
  2893  */
       
  2894     case function_dint_to_lword :
       
  2895     {
       
  2896         symbol_c *last_type_symbol = NULL;
       
  2897 
       
  2898         {
       
  2899             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2900             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2901             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2902             symbol_c *IN_type_symbol = NULL;
       
  2903             
       
  2904             /* Get the value from a foo(<param_value>) style call */
       
  2905             if (IN_param_value == NULL)
       
  2906               IN_param_value = function_call_param_iterator.next_nf();
       
  2907             if (IN_param_value != NULL) {
       
  2908               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2909               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2910             }
       
  2911             
       
  2912             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2913             {
       
  2914         
       
  2915                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2916                 
       
  2917                 if (IN_type_symbol == NULL)
       
  2918                   IN_type_symbol = last_type_symbol;
       
  2919                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2920                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2921                 function_type_prefix = return_type_symbol;
       
  2922                 function_type_suffix = IN_type_symbol;
       
  2923                 break;
       
  2924                 
       
  2925             }
       
  2926             
       
  2927             
       
  2928             ERROR;
       
  2929         }
       
  2930         
       
  2931     }/*function_dint_to_lword*/
       
  2932     break;
       
  2933 
       
  2934 /****
       
  2935  *DINT_TO_UINT
       
  2936  */
       
  2937     case function_dint_to_uint :
       
  2938     {
       
  2939         symbol_c *last_type_symbol = NULL;
       
  2940 
       
  2941         {
       
  2942             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2944             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2945             symbol_c *IN_type_symbol = NULL;
       
  2946             
       
  2947             /* Get the value from a foo(<param_value>) style call */
       
  2948             if (IN_param_value == NULL)
       
  2949               IN_param_value = function_call_param_iterator.next_nf();
       
  2950             if (IN_param_value != NULL) {
       
  2951               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2952               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2953             }
       
  2954             
       
  2955             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2956             {
       
  2957         
       
  2958                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  2959                 
       
  2960                 if (IN_type_symbol == NULL)
       
  2961                   IN_type_symbol = last_type_symbol;
       
  2962                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  2963                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2964                 function_type_prefix = return_type_symbol;
       
  2965                 function_type_suffix = IN_type_symbol;
       
  2966                 break;
       
  2967                 
       
  2968             }
       
  2969             
       
  2970             
       
  2971             ERROR;
       
  2972         }
       
  2973         
       
  2974     }/*function_dint_to_uint*/
       
  2975     break;
       
  2976 
       
  2977 /****
       
  2978  *DINT_TO_LREAL
       
  2979  */
       
  2980     case function_dint_to_lreal :
       
  2981     {
       
  2982         symbol_c *last_type_symbol = NULL;
       
  2983 
       
  2984         {
       
  2985             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  2986             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2987             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  2988             symbol_c *IN_type_symbol = NULL;
       
  2989             
       
  2990             /* Get the value from a foo(<param_value>) style call */
       
  2991             if (IN_param_value == NULL)
       
  2992               IN_param_value = function_call_param_iterator.next_nf();
       
  2993             if (IN_param_value != NULL) {
       
  2994               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2995               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2996             }
       
  2997             
       
  2998             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2999             {
       
  3000         
       
  3001                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3002                 
       
  3003                 if (IN_type_symbol == NULL)
       
  3004                   IN_type_symbol = last_type_symbol;
       
  3005                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3006                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3007                 function_type_prefix = return_type_symbol;
       
  3008                 function_type_suffix = IN_type_symbol;
       
  3009                 break;
       
  3010                 
       
  3011             }
       
  3012             
       
  3013             
       
  3014             ERROR;
       
  3015         }
       
  3016         
       
  3017     }/*function_dint_to_lreal*/
       
  3018     break;
       
  3019 
       
  3020 /****
       
  3021  *DINT_TO_BYTE
       
  3022  */
       
  3023     case function_dint_to_byte :
       
  3024     {
       
  3025         symbol_c *last_type_symbol = NULL;
       
  3026 
       
  3027         {
       
  3028             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3029             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3030             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3031             symbol_c *IN_type_symbol = NULL;
       
  3032             
       
  3033             /* Get the value from a foo(<param_value>) style call */
       
  3034             if (IN_param_value == NULL)
       
  3035               IN_param_value = function_call_param_iterator.next_nf();
       
  3036             if (IN_param_value != NULL) {
       
  3037               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3038               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3039             }
       
  3040             
       
  3041             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3042             {
       
  3043         
       
  3044                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3045                 
       
  3046                 if (IN_type_symbol == NULL)
       
  3047                   IN_type_symbol = last_type_symbol;
       
  3048                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3049                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3050                 function_type_prefix = return_type_symbol;
       
  3051                 function_type_suffix = IN_type_symbol;
       
  3052                 break;
       
  3053                 
       
  3054             }
       
  3055             
       
  3056             
       
  3057             ERROR;
       
  3058         }
       
  3059         
       
  3060     }/*function_dint_to_byte*/
       
  3061     break;
       
  3062 
       
  3063 /****
       
  3064  *DINT_TO_USINT
       
  3065  */
       
  3066     case function_dint_to_usint :
       
  3067     {
       
  3068         symbol_c *last_type_symbol = NULL;
       
  3069 
       
  3070         {
       
  3071             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3073             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3074             symbol_c *IN_type_symbol = NULL;
       
  3075             
       
  3076             /* Get the value from a foo(<param_value>) style call */
       
  3077             if (IN_param_value == NULL)
       
  3078               IN_param_value = function_call_param_iterator.next_nf();
       
  3079             if (IN_param_value != NULL) {
       
  3080               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3081               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3082             }
       
  3083             
       
  3084             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3085             {
       
  3086         
       
  3087                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3088                 
       
  3089                 if (IN_type_symbol == NULL)
       
  3090                   IN_type_symbol = last_type_symbol;
       
  3091                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3092                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3093                 function_type_prefix = return_type_symbol;
       
  3094                 function_type_suffix = IN_type_symbol;
       
  3095                 break;
       
  3096                 
       
  3097             }
       
  3098             
       
  3099             
       
  3100             ERROR;
       
  3101         }
       
  3102         
       
  3103     }/*function_dint_to_usint*/
       
  3104     break;
       
  3105 
       
  3106 /****
       
  3107  *DINT_TO_ULINT
       
  3108  */
       
  3109     case function_dint_to_ulint :
       
  3110     {
       
  3111         symbol_c *last_type_symbol = NULL;
       
  3112 
       
  3113         {
       
  3114             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3115             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3116             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3117             symbol_c *IN_type_symbol = NULL;
       
  3118             
       
  3119             /* Get the value from a foo(<param_value>) style call */
       
  3120             if (IN_param_value == NULL)
       
  3121               IN_param_value = function_call_param_iterator.next_nf();
       
  3122             if (IN_param_value != NULL) {
       
  3123               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3124               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3125             }
       
  3126             
       
  3127             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3128             {
       
  3129         
       
  3130                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3131                 
       
  3132                 if (IN_type_symbol == NULL)
       
  3133                   IN_type_symbol = last_type_symbol;
       
  3134                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3135                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3136                 function_type_prefix = return_type_symbol;
       
  3137                 function_type_suffix = IN_type_symbol;
       
  3138                 break;
       
  3139                 
       
  3140             }
       
  3141             
       
  3142             
       
  3143             ERROR;
       
  3144         }
       
  3145         
       
  3146     }/*function_dint_to_ulint*/
       
  3147     break;
       
  3148 
       
  3149 /****
       
  3150  *DINT_TO_BOOL
       
  3151  */
       
  3152     case function_dint_to_bool :
       
  3153     {
       
  3154         symbol_c *last_type_symbol = NULL;
       
  3155 
       
  3156         {
       
  3157             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3158             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3159             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3160             symbol_c *IN_type_symbol = NULL;
       
  3161             
       
  3162             /* Get the value from a foo(<param_value>) style call */
       
  3163             if (IN_param_value == NULL)
       
  3164               IN_param_value = function_call_param_iterator.next_nf();
       
  3165             if (IN_param_value != NULL) {
       
  3166               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3167               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3168             }
       
  3169             
       
  3170             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3171             {
       
  3172         
       
  3173                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3174                 
       
  3175                 if (IN_type_symbol == NULL)
       
  3176                   IN_type_symbol = last_type_symbol;
       
  3177                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3178                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3179                 function_type_prefix = return_type_symbol;
       
  3180                 function_type_suffix = IN_type_symbol;
       
  3181                 break;
       
  3182                 
       
  3183             }
       
  3184             
       
  3185             
       
  3186             ERROR;
       
  3187         }
       
  3188         
       
  3189     }/*function_dint_to_bool*/
       
  3190     break;
       
  3191 
       
  3192 /****
       
  3193  *DINT_TO_TIME
       
  3194  */
       
  3195     case function_dint_to_time :
       
  3196     {
       
  3197         symbol_c *last_type_symbol = NULL;
       
  3198 
       
  3199         {
       
  3200             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3202             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3203             symbol_c *IN_type_symbol = NULL;
       
  3204             
       
  3205             /* Get the value from a foo(<param_value>) style call */
       
  3206             if (IN_param_value == NULL)
       
  3207               IN_param_value = function_call_param_iterator.next_nf();
       
  3208             if (IN_param_value != NULL) {
       
  3209               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3210               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3211             }
       
  3212             
       
  3213             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3214             {
       
  3215         
       
  3216                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  3217                 
       
  3218                 if (IN_type_symbol == NULL)
       
  3219                   IN_type_symbol = last_type_symbol;
       
  3220                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3221                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3222                 function_type_prefix = return_type_symbol;
       
  3223                 break;
       
  3224                 
       
  3225             }
       
  3226             
       
  3227             
       
  3228             ERROR;
       
  3229         }
       
  3230         
       
  3231     }/*function_dint_to_time*/
       
  3232     break;
       
  3233 
       
  3234 /****
       
  3235  *DINT_TO_INT
       
  3236  */
       
  3237     case function_dint_to_int :
       
  3238     {
       
  3239         symbol_c *last_type_symbol = NULL;
       
  3240 
       
  3241         {
       
  3242             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3243             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3244             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3245             symbol_c *IN_type_symbol = NULL;
       
  3246             
       
  3247             /* Get the value from a foo(<param_value>) style call */
       
  3248             if (IN_param_value == NULL)
       
  3249               IN_param_value = function_call_param_iterator.next_nf();
       
  3250             if (IN_param_value != NULL) {
       
  3251               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3252               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3253             }
       
  3254             
       
  3255             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  3256             {
       
  3257         
       
  3258                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3259                 
       
  3260                 if (IN_type_symbol == NULL)
       
  3261                   IN_type_symbol = last_type_symbol;
       
  3262                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3263                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3264                 function_type_prefix = return_type_symbol;
       
  3265                 function_type_suffix = IN_type_symbol;
       
  3266                 break;
       
  3267                 
       
  3268             }
       
  3269             
       
  3270             
       
  3271             ERROR;
       
  3272         }
       
  3273         
       
  3274     }/*function_dint_to_int*/
       
  3275     break;
       
  3276 
       
  3277 /****
       
  3278  *DATE_TO_REAL
       
  3279  */
       
  3280     case function_date_to_real :
       
  3281     {
       
  3282         symbol_c *last_type_symbol = NULL;
       
  3283 
       
  3284         {
       
  3285             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3286             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3287             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3288             symbol_c *IN_type_symbol = NULL;
       
  3289             
       
  3290             /* Get the value from a foo(<param_value>) style call */
       
  3291             if (IN_param_value == NULL)
       
  3292               IN_param_value = function_call_param_iterator.next_nf();
       
  3293             if (IN_param_value != NULL) {
       
  3294               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3295               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3296             }
       
  3297             
       
  3298             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3299             {
       
  3300         
       
  3301                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3302                 
       
  3303                 if (IN_type_symbol == NULL)
       
  3304                   IN_type_symbol = last_type_symbol;
       
  3305                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3306                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3307                 function_type_prefix = return_type_symbol;
       
  3308                 break;
       
  3309                 
       
  3310             }
       
  3311             
       
  3312             
       
  3313             ERROR;
       
  3314         }
       
  3315         
       
  3316     }/*function_date_to_real*/
       
  3317     break;
       
  3318 
       
  3319 /****
       
  3320  *DATE_TO_SINT
       
  3321  */
       
  3322     case function_date_to_sint :
       
  3323     {
       
  3324         symbol_c *last_type_symbol = NULL;
       
  3325 
       
  3326         {
       
  3327             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3329             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3330             symbol_c *IN_type_symbol = NULL;
       
  3331             
       
  3332             /* Get the value from a foo(<param_value>) style call */
       
  3333             if (IN_param_value == NULL)
       
  3334               IN_param_value = function_call_param_iterator.next_nf();
       
  3335             if (IN_param_value != NULL) {
       
  3336               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3337               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3338             }
       
  3339             
       
  3340             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3341             {
       
  3342         
       
  3343                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3344                 
       
  3345                 if (IN_type_symbol == NULL)
       
  3346                   IN_type_symbol = last_type_symbol;
       
  3347                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3348                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3349                 function_type_prefix = return_type_symbol;
       
  3350                 break;
       
  3351                 
       
  3352             }
       
  3353             
       
  3354             
       
  3355             ERROR;
       
  3356         }
       
  3357         
       
  3358     }/*function_date_to_sint*/
       
  3359     break;
       
  3360 
       
  3361 /****
       
  3362  *DATE_TO_LINT
       
  3363  */
       
  3364     case function_date_to_lint :
       
  3365     {
       
  3366         symbol_c *last_type_symbol = NULL;
       
  3367 
       
  3368         {
       
  3369             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3370             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3371             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3372             symbol_c *IN_type_symbol = NULL;
       
  3373             
       
  3374             /* Get the value from a foo(<param_value>) style call */
       
  3375             if (IN_param_value == NULL)
       
  3376               IN_param_value = function_call_param_iterator.next_nf();
       
  3377             if (IN_param_value != NULL) {
       
  3378               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3379               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3380             }
       
  3381             
       
  3382             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3383             {
       
  3384         
       
  3385                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3386                 
       
  3387                 if (IN_type_symbol == NULL)
       
  3388                   IN_type_symbol = last_type_symbol;
       
  3389                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3390                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3391                 function_type_prefix = return_type_symbol;
       
  3392                 break;
       
  3393                 
       
  3394             }
       
  3395             
       
  3396             
       
  3397             ERROR;
       
  3398         }
       
  3399         
       
  3400     }/*function_date_to_lint*/
       
  3401     break;
       
  3402 
       
  3403 /****
       
  3404  *DATE_TO_DINT
       
  3405  */
       
  3406     case function_date_to_dint :
       
  3407     {
       
  3408         symbol_c *last_type_symbol = NULL;
       
  3409 
       
  3410         {
       
  3411             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3412             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3413             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3414             symbol_c *IN_type_symbol = NULL;
       
  3415             
       
  3416             /* Get the value from a foo(<param_value>) style call */
       
  3417             if (IN_param_value == NULL)
       
  3418               IN_param_value = function_call_param_iterator.next_nf();
       
  3419             if (IN_param_value != NULL) {
       
  3420               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3421               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3422             }
       
  3423             
       
  3424             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3425             {
       
  3426         
       
  3427                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3428                 
       
  3429                 if (IN_type_symbol == NULL)
       
  3430                   IN_type_symbol = last_type_symbol;
       
  3431                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3432                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3433                 function_type_prefix = return_type_symbol;
       
  3434                 break;
       
  3435                 
       
  3436             }
       
  3437             
       
  3438             
       
  3439             ERROR;
       
  3440         }
       
  3441         
       
  3442     }/*function_date_to_dint*/
       
  3443     break;
       
  3444 
       
  3445 /****
       
  3446  *DATE_TO_DWORD
       
  3447  */
       
  3448     case function_date_to_dword :
       
  3449     {
       
  3450         symbol_c *last_type_symbol = NULL;
       
  3451 
       
  3452         {
       
  3453             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3454             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3455             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3456             symbol_c *IN_type_symbol = NULL;
       
  3457             
       
  3458             /* Get the value from a foo(<param_value>) style call */
       
  3459             if (IN_param_value == NULL)
       
  3460               IN_param_value = function_call_param_iterator.next_nf();
       
  3461             if (IN_param_value != NULL) {
       
  3462               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3463               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3464             }
       
  3465             
       
  3466             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3467             {
       
  3468         
       
  3469                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3470                 
       
  3471                 if (IN_type_symbol == NULL)
       
  3472                   IN_type_symbol = last_type_symbol;
       
  3473                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3475                 function_type_prefix = return_type_symbol;
       
  3476                 break;
       
  3477                 
       
  3478             }
       
  3479             
       
  3480             
       
  3481             ERROR;
       
  3482         }
       
  3483         
       
  3484     }/*function_date_to_dword*/
       
  3485     break;
       
  3486 
       
  3487 /****
       
  3488  *DATE_TO_UDINT
       
  3489  */
       
  3490     case function_date_to_udint :
       
  3491     {
       
  3492         symbol_c *last_type_symbol = NULL;
       
  3493 
       
  3494         {
       
  3495             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3497             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3498             symbol_c *IN_type_symbol = NULL;
       
  3499             
       
  3500             /* Get the value from a foo(<param_value>) style call */
       
  3501             if (IN_param_value == NULL)
       
  3502               IN_param_value = function_call_param_iterator.next_nf();
       
  3503             if (IN_param_value != NULL) {
       
  3504               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3505               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3506             }
       
  3507             
       
  3508             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3509             {
       
  3510         
       
  3511                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3512                 
       
  3513                 if (IN_type_symbol == NULL)
       
  3514                   IN_type_symbol = last_type_symbol;
       
  3515                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3516                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3517                 function_type_prefix = return_type_symbol;
       
  3518                 break;
       
  3519                 
       
  3520             }
       
  3521             
       
  3522             
       
  3523             ERROR;
       
  3524         }
       
  3525         
       
  3526     }/*function_date_to_udint*/
       
  3527     break;
       
  3528 
       
  3529 /****
       
  3530  *DATE_TO_WORD
       
  3531  */
       
  3532     case function_date_to_word :
       
  3533     {
       
  3534         symbol_c *last_type_symbol = NULL;
       
  3535 
       
  3536         {
       
  3537             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3538             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3539             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3540             symbol_c *IN_type_symbol = NULL;
       
  3541             
       
  3542             /* Get the value from a foo(<param_value>) style call */
       
  3543             if (IN_param_value == NULL)
       
  3544               IN_param_value = function_call_param_iterator.next_nf();
       
  3545             if (IN_param_value != NULL) {
       
  3546               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3547               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3548             }
       
  3549             
       
  3550             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3551             {
       
  3552         
       
  3553                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3554                 
       
  3555                 if (IN_type_symbol == NULL)
       
  3556                   IN_type_symbol = last_type_symbol;
       
  3557                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3558                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3559                 function_type_prefix = return_type_symbol;
       
  3560                 break;
       
  3561                 
       
  3562             }
       
  3563             
       
  3564             
       
  3565             ERROR;
       
  3566         }
       
  3567         
       
  3568     }/*function_date_to_word*/
       
  3569     break;
       
  3570 
       
  3571 /****
       
  3572  *DATE_TO_STRING
       
  3573  */
       
  3574     case function_date_to_string :
       
  3575     {
       
  3576         symbol_c *last_type_symbol = NULL;
       
  3577 
       
  3578         {
       
  3579             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3580             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3581             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3582             symbol_c *IN_type_symbol = NULL;
       
  3583             
       
  3584             /* Get the value from a foo(<param_value>) style call */
       
  3585             if (IN_param_value == NULL)
       
  3586               IN_param_value = function_call_param_iterator.next_nf();
       
  3587             if (IN_param_value != NULL) {
       
  3588               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3589               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3590             }
       
  3591             
       
  3592             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3593             {
       
  3594         
       
  3595                 function_name = (symbol_c*)(new pragma_c("__date_to_string"));
       
  3596                 
       
  3597                 if (IN_type_symbol == NULL)
       
  3598                   IN_type_symbol = last_type_symbol;
       
  3599                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3600                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3601                 function_type_prefix = return_type_symbol;
       
  3602                 break;
       
  3603                 
       
  3604             }
       
  3605             
       
  3606             
       
  3607             ERROR;
       
  3608         }
       
  3609         
       
  3610     }/*function_date_to_string*/
       
  3611     break;
       
  3612 
       
  3613 /****
       
  3614  *DATE_TO_LWORD
       
  3615  */
       
  3616     case function_date_to_lword :
       
  3617     {
       
  3618         symbol_c *last_type_symbol = NULL;
       
  3619 
       
  3620         {
       
  3621             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3622             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3623             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3624             symbol_c *IN_type_symbol = NULL;
       
  3625             
       
  3626             /* Get the value from a foo(<param_value>) style call */
       
  3627             if (IN_param_value == NULL)
       
  3628               IN_param_value = function_call_param_iterator.next_nf();
       
  3629             if (IN_param_value != NULL) {
       
  3630               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3631               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3632             }
       
  3633             
       
  3634             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3635             {
       
  3636         
       
  3637                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3638                 
       
  3639                 if (IN_type_symbol == NULL)
       
  3640                   IN_type_symbol = last_type_symbol;
       
  3641                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3642                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3643                 function_type_prefix = return_type_symbol;
       
  3644                 break;
       
  3645                 
       
  3646             }
       
  3647             
       
  3648             
       
  3649             ERROR;
       
  3650         }
       
  3651         
       
  3652     }/*function_date_to_lword*/
       
  3653     break;
       
  3654 
       
  3655 /****
       
  3656  *DATE_TO_UINT
       
  3657  */
       
  3658     case function_date_to_uint :
       
  3659     {
       
  3660         symbol_c *last_type_symbol = NULL;
       
  3661 
       
  3662         {
       
  3663             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3665             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3666             symbol_c *IN_type_symbol = NULL;
       
  3667             
       
  3668             /* Get the value from a foo(<param_value>) style call */
       
  3669             if (IN_param_value == NULL)
       
  3670               IN_param_value = function_call_param_iterator.next_nf();
       
  3671             if (IN_param_value != NULL) {
       
  3672               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3673               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3674             }
       
  3675             
       
  3676             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3677             {
       
  3678         
       
  3679                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3680                 
       
  3681                 if (IN_type_symbol == NULL)
       
  3682                   IN_type_symbol = last_type_symbol;
       
  3683                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3685                 function_type_prefix = return_type_symbol;
       
  3686                 break;
       
  3687                 
       
  3688             }
       
  3689             
       
  3690             
       
  3691             ERROR;
       
  3692         }
       
  3693         
       
  3694     }/*function_date_to_uint*/
       
  3695     break;
       
  3696 
       
  3697 /****
       
  3698  *DATE_TO_LREAL
       
  3699  */
       
  3700     case function_date_to_lreal :
       
  3701     {
       
  3702         symbol_c *last_type_symbol = NULL;
       
  3703 
       
  3704         {
       
  3705             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3706             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3707             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3708             symbol_c *IN_type_symbol = NULL;
       
  3709             
       
  3710             /* Get the value from a foo(<param_value>) style call */
       
  3711             if (IN_param_value == NULL)
       
  3712               IN_param_value = function_call_param_iterator.next_nf();
       
  3713             if (IN_param_value != NULL) {
       
  3714               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3715               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3716             }
       
  3717             
       
  3718             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3719             {
       
  3720         
       
  3721                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  3722                 
       
  3723                 if (IN_type_symbol == NULL)
       
  3724                   IN_type_symbol = last_type_symbol;
       
  3725                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3726                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3727                 function_type_prefix = return_type_symbol;
       
  3728                 break;
       
  3729                 
       
  3730             }
       
  3731             
       
  3732             
       
  3733             ERROR;
       
  3734         }
       
  3735         
       
  3736     }/*function_date_to_lreal*/
       
  3737     break;
       
  3738 
       
  3739 /****
       
  3740  *DATE_TO_BYTE
       
  3741  */
       
  3742     case function_date_to_byte :
       
  3743     {
       
  3744         symbol_c *last_type_symbol = NULL;
       
  3745 
       
  3746         {
       
  3747             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3748             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3749             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3750             symbol_c *IN_type_symbol = NULL;
       
  3751             
       
  3752             /* Get the value from a foo(<param_value>) style call */
       
  3753             if (IN_param_value == NULL)
       
  3754               IN_param_value = function_call_param_iterator.next_nf();
       
  3755             if (IN_param_value != NULL) {
       
  3756               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3757               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3758             }
       
  3759             
       
  3760             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3761             {
       
  3762         
       
  3763                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3764                 
       
  3765                 if (IN_type_symbol == NULL)
       
  3766                   IN_type_symbol = last_type_symbol;
       
  3767                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3768                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3769                 function_type_prefix = return_type_symbol;
       
  3770                 break;
       
  3771                 
       
  3772             }
       
  3773             
       
  3774             
       
  3775             ERROR;
       
  3776         }
       
  3777         
       
  3778     }/*function_date_to_byte*/
       
  3779     break;
       
  3780 
       
  3781 /****
       
  3782  *DATE_TO_USINT
       
  3783  */
       
  3784     case function_date_to_usint :
       
  3785     {
       
  3786         symbol_c *last_type_symbol = NULL;
       
  3787 
       
  3788         {
       
  3789             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3790             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3791             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3792             symbol_c *IN_type_symbol = NULL;
       
  3793             
       
  3794             /* Get the value from a foo(<param_value>) style call */
       
  3795             if (IN_param_value == NULL)
       
  3796               IN_param_value = function_call_param_iterator.next_nf();
       
  3797             if (IN_param_value != NULL) {
       
  3798               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3799               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3800             }
       
  3801             
       
  3802             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3803             {
       
  3804         
       
  3805                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3806                 
       
  3807                 if (IN_type_symbol == NULL)
       
  3808                   IN_type_symbol = last_type_symbol;
       
  3809                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3810                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3811                 function_type_prefix = return_type_symbol;
       
  3812                 break;
       
  3813                 
       
  3814             }
       
  3815             
       
  3816             
       
  3817             ERROR;
       
  3818         }
       
  3819         
       
  3820     }/*function_date_to_usint*/
       
  3821     break;
       
  3822 
       
  3823 /****
       
  3824  *DATE_TO_ULINT
       
  3825  */
       
  3826     case function_date_to_ulint :
       
  3827     {
       
  3828         symbol_c *last_type_symbol = NULL;
       
  3829 
       
  3830         {
       
  3831             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3833             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3834             symbol_c *IN_type_symbol = NULL;
       
  3835             
       
  3836             /* Get the value from a foo(<param_value>) style call */
       
  3837             if (IN_param_value == NULL)
       
  3838               IN_param_value = function_call_param_iterator.next_nf();
       
  3839             if (IN_param_value != NULL) {
       
  3840               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3841               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3842             }
       
  3843             
       
  3844             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3845             {
       
  3846         
       
  3847                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3848                 
       
  3849                 if (IN_type_symbol == NULL)
       
  3850                   IN_type_symbol = last_type_symbol;
       
  3851                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3852                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3853                 function_type_prefix = return_type_symbol;
       
  3854                 break;
       
  3855                 
       
  3856             }
       
  3857             
       
  3858             
       
  3859             ERROR;
       
  3860         }
       
  3861         
       
  3862     }/*function_date_to_ulint*/
       
  3863     break;
       
  3864 
       
  3865 /****
       
  3866  *DATE_TO_INT
       
  3867  */
       
  3868     case function_date_to_int :
       
  3869     {
       
  3870         symbol_c *last_type_symbol = NULL;
       
  3871 
       
  3872         {
       
  3873             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3874             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3875             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3876             symbol_c *IN_type_symbol = NULL;
       
  3877             
       
  3878             /* Get the value from a foo(<param_value>) style call */
       
  3879             if (IN_param_value == NULL)
       
  3880               IN_param_value = function_call_param_iterator.next_nf();
       
  3881             if (IN_param_value != NULL) {
       
  3882               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3883               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3884             }
       
  3885             
       
  3886             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3887             {
       
  3888         
       
  3889                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  3890                 
       
  3891                 if (IN_type_symbol == NULL)
       
  3892                   IN_type_symbol = last_type_symbol;
       
  3893                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3894                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3895                 function_type_prefix = return_type_symbol;
       
  3896                 break;
       
  3897                 
       
  3898             }
       
  3899             
       
  3900             
       
  3901             ERROR;
       
  3902         }
       
  3903         
       
  3904     }/*function_date_to_int*/
       
  3905     break;
       
  3906 
       
  3907 /****
       
  3908  *DWORD_TO_REAL
       
  3909  */
       
  3910     case function_dword_to_real :
       
  3911     {
       
  3912         symbol_c *last_type_symbol = NULL;
       
  3913 
       
  3914         {
       
  3915             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3916             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3917             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3918             symbol_c *IN_type_symbol = NULL;
       
  3919             
       
  3920             /* Get the value from a foo(<param_value>) style call */
       
  3921             if (IN_param_value == NULL)
       
  3922               IN_param_value = function_call_param_iterator.next_nf();
       
  3923             if (IN_param_value != NULL) {
       
  3924               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3925               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3926             }
       
  3927             
       
  3928             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3929             {
       
  3930         
       
  3931                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3932                 
       
  3933                 if (IN_type_symbol == NULL)
       
  3934                   IN_type_symbol = last_type_symbol;
       
  3935                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3936                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3937                 function_type_prefix = return_type_symbol;
       
  3938                 function_type_suffix = IN_type_symbol;
       
  3939                 break;
       
  3940                 
       
  3941             }
       
  3942             
       
  3943             
       
  3944             ERROR;
       
  3945         }
       
  3946         
       
  3947     }/*function_dword_to_real*/
       
  3948     break;
       
  3949 
       
  3950 /****
       
  3951  *DWORD_TO_SINT
       
  3952  */
       
  3953     case function_dword_to_sint :
       
  3954     {
       
  3955         symbol_c *last_type_symbol = NULL;
       
  3956 
       
  3957         {
       
  3958             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  3959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3960             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  3961             symbol_c *IN_type_symbol = NULL;
       
  3962             
       
  3963             /* Get the value from a foo(<param_value>) style call */
       
  3964             if (IN_param_value == NULL)
       
  3965               IN_param_value = function_call_param_iterator.next_nf();
       
  3966             if (IN_param_value != NULL) {
       
  3967               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3968               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3969             }
       
  3970             
       
  3971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3972             {
       
  3973         
       
  3974                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  3975                 
       
  3976                 if (IN_type_symbol == NULL)
       
  3977                   IN_type_symbol = last_type_symbol;
       
  3978                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  3979                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3980                 function_type_prefix = return_type_symbol;
       
  3981                 function_type_suffix = IN_type_symbol;
       
  3982                 break;
       
  3983                 
       
  3984             }
       
  3985             
       
  3986             
       
  3987             ERROR;
       
  3988         }
       
  3989         
       
  3990     }/*function_dword_to_sint*/
       
  3991     break;
       
  3992 
       
  3993 /****
       
  3994  *DWORD_TO_LINT
       
  3995  */
       
  3996     case function_dword_to_lint :
       
  3997     {
       
  3998         symbol_c *last_type_symbol = NULL;
       
  3999 
       
  4000         {
       
  4001             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4002             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4003             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4004             symbol_c *IN_type_symbol = NULL;
       
  4005             
       
  4006             /* Get the value from a foo(<param_value>) style call */
       
  4007             if (IN_param_value == NULL)
       
  4008               IN_param_value = function_call_param_iterator.next_nf();
       
  4009             if (IN_param_value != NULL) {
       
  4010               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4011               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4012             }
       
  4013             
       
  4014             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4015             {
       
  4016         
       
  4017                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4018                 
       
  4019                 if (IN_type_symbol == NULL)
       
  4020                   IN_type_symbol = last_type_symbol;
       
  4021                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4022                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4023                 function_type_prefix = return_type_symbol;
       
  4024                 function_type_suffix = IN_type_symbol;
       
  4025                 break;
       
  4026                 
       
  4027             }
       
  4028             
       
  4029             
       
  4030             ERROR;
       
  4031         }
       
  4032         
       
  4033     }/*function_dword_to_lint*/
       
  4034     break;
       
  4035 
       
  4036 /****
       
  4037  *DWORD_TO_DINT
       
  4038  */
       
  4039     case function_dword_to_dint :
       
  4040     {
       
  4041         symbol_c *last_type_symbol = NULL;
       
  4042 
       
  4043         {
       
  4044             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4045             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4046             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4047             symbol_c *IN_type_symbol = NULL;
       
  4048             
       
  4049             /* Get the value from a foo(<param_value>) style call */
       
  4050             if (IN_param_value == NULL)
       
  4051               IN_param_value = function_call_param_iterator.next_nf();
       
  4052             if (IN_param_value != NULL) {
       
  4053               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4054               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4055             }
       
  4056             
       
  4057             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4058             {
       
  4059         
       
  4060                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4061                 
       
  4062                 if (IN_type_symbol == NULL)
       
  4063                   IN_type_symbol = last_type_symbol;
       
  4064                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4065                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4066                 function_type_prefix = return_type_symbol;
       
  4067                 function_type_suffix = IN_type_symbol;
       
  4068                 break;
       
  4069                 
       
  4070             }
       
  4071             
       
  4072             
       
  4073             ERROR;
       
  4074         }
       
  4075         
       
  4076     }/*function_dword_to_dint*/
       
  4077     break;
       
  4078 
       
  4079 /****
       
  4080  *DWORD_TO_DATE
       
  4081  */
       
  4082     case function_dword_to_date :
       
  4083     {
       
  4084         symbol_c *last_type_symbol = NULL;
       
  4085 
       
  4086         {
       
  4087             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4089             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4090             symbol_c *IN_type_symbol = NULL;
       
  4091             
       
  4092             /* Get the value from a foo(<param_value>) style call */
       
  4093             if (IN_param_value == NULL)
       
  4094               IN_param_value = function_call_param_iterator.next_nf();
       
  4095             if (IN_param_value != NULL) {
       
  4096               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4097               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4098             }
       
  4099             
       
  4100             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4101             {
       
  4102         
       
  4103                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4104                 
       
  4105                 if (IN_type_symbol == NULL)
       
  4106                   IN_type_symbol = last_type_symbol;
       
  4107                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4108                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4109                 function_type_prefix = return_type_symbol;
       
  4110                 break;
       
  4111                 
       
  4112             }
       
  4113             
       
  4114             
       
  4115             ERROR;
       
  4116         }
       
  4117         
       
  4118     }/*function_dword_to_date*/
       
  4119     break;
       
  4120 
       
  4121 /****
       
  4122  *DWORD_TO_DT
       
  4123  */
       
  4124     case function_dword_to_dt :
       
  4125     {
       
  4126         symbol_c *last_type_symbol = NULL;
       
  4127 
       
  4128         {
       
  4129             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4130             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4131             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4132             symbol_c *IN_type_symbol = NULL;
       
  4133             
       
  4134             /* Get the value from a foo(<param_value>) style call */
       
  4135             if (IN_param_value == NULL)
       
  4136               IN_param_value = function_call_param_iterator.next_nf();
       
  4137             if (IN_param_value != NULL) {
       
  4138               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4139               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4140             }
       
  4141             
       
  4142             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4143             {
       
  4144         
       
  4145                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4146                 
       
  4147                 if (IN_type_symbol == NULL)
       
  4148                   IN_type_symbol = last_type_symbol;
       
  4149                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4150                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4151                 function_type_prefix = return_type_symbol;
       
  4152                 break;
       
  4153                 
       
  4154             }
       
  4155             
       
  4156             
       
  4157             ERROR;
       
  4158         }
       
  4159         
       
  4160     }/*function_dword_to_dt*/
       
  4161     break;
       
  4162 
       
  4163 /****
       
  4164  *DWORD_TO_TOD
       
  4165  */
       
  4166     case function_dword_to_tod :
       
  4167     {
       
  4168         symbol_c *last_type_symbol = NULL;
       
  4169 
       
  4170         {
       
  4171             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4172             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4173             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4174             symbol_c *IN_type_symbol = NULL;
       
  4175             
       
  4176             /* Get the value from a foo(<param_value>) style call */
       
  4177             if (IN_param_value == NULL)
       
  4178               IN_param_value = function_call_param_iterator.next_nf();
       
  4179             if (IN_param_value != NULL) {
       
  4180               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4181               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4182             }
       
  4183             
       
  4184             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4185             {
       
  4186         
       
  4187                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4188                 
       
  4189                 if (IN_type_symbol == NULL)
       
  4190                   IN_type_symbol = last_type_symbol;
       
  4191                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4192                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4193                 function_type_prefix = return_type_symbol;
       
  4194                 break;
       
  4195                 
       
  4196             }
       
  4197             
       
  4198             
       
  4199             ERROR;
       
  4200         }
       
  4201         
       
  4202     }/*function_dword_to_tod*/
       
  4203     break;
       
  4204 
       
  4205 /****
       
  4206  *DWORD_TO_UDINT
       
  4207  */
       
  4208     case function_dword_to_udint :
       
  4209     {
       
  4210         symbol_c *last_type_symbol = NULL;
       
  4211 
       
  4212         {
       
  4213             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4214             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4215             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4216             symbol_c *IN_type_symbol = NULL;
       
  4217             
       
  4218             /* Get the value from a foo(<param_value>) style call */
       
  4219             if (IN_param_value == NULL)
       
  4220               IN_param_value = function_call_param_iterator.next_nf();
       
  4221             if (IN_param_value != NULL) {
       
  4222               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4223               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4224             }
       
  4225             
       
  4226             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4227             {
       
  4228         
       
  4229                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4230                 
       
  4231                 if (IN_type_symbol == NULL)
       
  4232                   IN_type_symbol = last_type_symbol;
       
  4233                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4234                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4235                 function_type_prefix = return_type_symbol;
       
  4236                 function_type_suffix = IN_type_symbol;
       
  4237                 break;
       
  4238                 
       
  4239             }
       
  4240             
       
  4241             
       
  4242             ERROR;
       
  4243         }
       
  4244         
       
  4245     }/*function_dword_to_udint*/
       
  4246     break;
       
  4247 
       
  4248 /****
       
  4249  *DWORD_TO_WORD
       
  4250  */
       
  4251     case function_dword_to_word :
       
  4252     {
       
  4253         symbol_c *last_type_symbol = NULL;
       
  4254 
       
  4255         {
       
  4256             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4257             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4258             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4259             symbol_c *IN_type_symbol = NULL;
       
  4260             
       
  4261             /* Get the value from a foo(<param_value>) style call */
       
  4262             if (IN_param_value == NULL)
       
  4263               IN_param_value = function_call_param_iterator.next_nf();
       
  4264             if (IN_param_value != NULL) {
       
  4265               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4266               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4267             }
       
  4268             
       
  4269             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4270             {
       
  4271         
       
  4272                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4273                 
       
  4274                 if (IN_type_symbol == NULL)
       
  4275                   IN_type_symbol = last_type_symbol;
       
  4276                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4277                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4278                 function_type_prefix = return_type_symbol;
       
  4279                 function_type_suffix = IN_type_symbol;
       
  4280                 break;
       
  4281                 
       
  4282             }
       
  4283             
       
  4284             
       
  4285             ERROR;
       
  4286         }
       
  4287         
       
  4288     }/*function_dword_to_word*/
       
  4289     break;
       
  4290 
       
  4291 /****
       
  4292  *DWORD_TO_STRING
       
  4293  */
       
  4294     case function_dword_to_string :
       
  4295     {
       
  4296         symbol_c *last_type_symbol = NULL;
       
  4297 
       
  4298         {
       
  4299             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4300             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4301             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4302             symbol_c *IN_type_symbol = NULL;
       
  4303             
       
  4304             /* Get the value from a foo(<param_value>) style call */
       
  4305             if (IN_param_value == NULL)
       
  4306               IN_param_value = function_call_param_iterator.next_nf();
       
  4307             if (IN_param_value != NULL) {
       
  4308               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4309               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4310             }
       
  4311             
       
  4312             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4313             {
       
  4314         
       
  4315                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  4316                 
       
  4317                 if (IN_type_symbol == NULL)
       
  4318                   IN_type_symbol = last_type_symbol;
       
  4319                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4320                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4321                 function_type_prefix = return_type_symbol;
       
  4322                 break;
       
  4323                 
       
  4324             }
       
  4325             
       
  4326             
       
  4327             ERROR;
       
  4328         }
       
  4329         
       
  4330     }/*function_dword_to_string*/
       
  4331     break;
       
  4332 
       
  4333 /****
       
  4334  *DWORD_TO_LWORD
       
  4335  */
       
  4336     case function_dword_to_lword :
       
  4337     {
       
  4338         symbol_c *last_type_symbol = NULL;
       
  4339 
       
  4340         {
       
  4341             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4343             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4344             symbol_c *IN_type_symbol = NULL;
       
  4345             
       
  4346             /* Get the value from a foo(<param_value>) style call */
       
  4347             if (IN_param_value == NULL)
       
  4348               IN_param_value = function_call_param_iterator.next_nf();
       
  4349             if (IN_param_value != NULL) {
       
  4350               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4351               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4352             }
       
  4353             
       
  4354             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4355             {
       
  4356         
       
  4357                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4358                 
       
  4359                 if (IN_type_symbol == NULL)
       
  4360                   IN_type_symbol = last_type_symbol;
       
  4361                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4362                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4363                 function_type_prefix = return_type_symbol;
       
  4364                 function_type_suffix = IN_type_symbol;
       
  4365                 break;
       
  4366                 
       
  4367             }
       
  4368             
       
  4369             
       
  4370             ERROR;
       
  4371         }
       
  4372         
       
  4373     }/*function_dword_to_lword*/
       
  4374     break;
       
  4375 
       
  4376 /****
       
  4377  *DWORD_TO_UINT
       
  4378  */
       
  4379     case function_dword_to_uint :
       
  4380     {
       
  4381         symbol_c *last_type_symbol = NULL;
       
  4382 
       
  4383         {
       
  4384             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4386             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4387             symbol_c *IN_type_symbol = NULL;
       
  4388             
       
  4389             /* Get the value from a foo(<param_value>) style call */
       
  4390             if (IN_param_value == NULL)
       
  4391               IN_param_value = function_call_param_iterator.next_nf();
       
  4392             if (IN_param_value != NULL) {
       
  4393               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4394               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4395             }
       
  4396             
       
  4397             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4398             {
       
  4399         
       
  4400                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4401                 
       
  4402                 if (IN_type_symbol == NULL)
       
  4403                   IN_type_symbol = last_type_symbol;
       
  4404                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4405                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4406                 function_type_prefix = return_type_symbol;
       
  4407                 function_type_suffix = IN_type_symbol;
       
  4408                 break;
       
  4409                 
       
  4410             }
       
  4411             
       
  4412             
       
  4413             ERROR;
       
  4414         }
       
  4415         
       
  4416     }/*function_dword_to_uint*/
       
  4417     break;
       
  4418 
       
  4419 /****
       
  4420  *DWORD_TO_LREAL
       
  4421  */
       
  4422     case function_dword_to_lreal :
       
  4423     {
       
  4424         symbol_c *last_type_symbol = NULL;
       
  4425 
       
  4426         {
       
  4427             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4429             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4430             symbol_c *IN_type_symbol = NULL;
       
  4431             
       
  4432             /* Get the value from a foo(<param_value>) style call */
       
  4433             if (IN_param_value == NULL)
       
  4434               IN_param_value = function_call_param_iterator.next_nf();
       
  4435             if (IN_param_value != NULL) {
       
  4436               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4437               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4438             }
       
  4439             
       
  4440             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4441             {
       
  4442         
       
  4443                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4444                 
       
  4445                 if (IN_type_symbol == NULL)
       
  4446                   IN_type_symbol = last_type_symbol;
       
  4447                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4448                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4449                 function_type_prefix = return_type_symbol;
       
  4450                 function_type_suffix = IN_type_symbol;
       
  4451                 break;
       
  4452                 
       
  4453             }
       
  4454             
       
  4455             
       
  4456             ERROR;
       
  4457         }
       
  4458         
       
  4459     }/*function_dword_to_lreal*/
       
  4460     break;
       
  4461 
       
  4462 /****
       
  4463  *DWORD_TO_BYTE
       
  4464  */
       
  4465     case function_dword_to_byte :
       
  4466     {
       
  4467         symbol_c *last_type_symbol = NULL;
       
  4468 
       
  4469         {
       
  4470             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4472             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4473             symbol_c *IN_type_symbol = NULL;
       
  4474             
       
  4475             /* Get the value from a foo(<param_value>) style call */
       
  4476             if (IN_param_value == NULL)
       
  4477               IN_param_value = function_call_param_iterator.next_nf();
       
  4478             if (IN_param_value != NULL) {
       
  4479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4481             }
       
  4482             
       
  4483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4484             {
       
  4485         
       
  4486                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4487                 
       
  4488                 if (IN_type_symbol == NULL)
       
  4489                   IN_type_symbol = last_type_symbol;
       
  4490                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4491                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4492                 function_type_prefix = return_type_symbol;
       
  4493                 function_type_suffix = IN_type_symbol;
       
  4494                 break;
       
  4495                 
       
  4496             }
       
  4497             
       
  4498             
       
  4499             ERROR;
       
  4500         }
       
  4501         
       
  4502     }/*function_dword_to_byte*/
       
  4503     break;
       
  4504 
       
  4505 /****
       
  4506  *DWORD_TO_USINT
       
  4507  */
       
  4508     case function_dword_to_usint :
       
  4509     {
       
  4510         symbol_c *last_type_symbol = NULL;
       
  4511 
       
  4512         {
       
  4513             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4515             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4516             symbol_c *IN_type_symbol = NULL;
       
  4517             
       
  4518             /* Get the value from a foo(<param_value>) style call */
       
  4519             if (IN_param_value == NULL)
       
  4520               IN_param_value = function_call_param_iterator.next_nf();
       
  4521             if (IN_param_value != NULL) {
       
  4522               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4523               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4524             }
       
  4525             
       
  4526             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4527             {
       
  4528         
       
  4529                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4530                 
       
  4531                 if (IN_type_symbol == NULL)
       
  4532                   IN_type_symbol = last_type_symbol;
       
  4533                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4534                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4535                 function_type_prefix = return_type_symbol;
       
  4536                 function_type_suffix = IN_type_symbol;
       
  4537                 break;
       
  4538                 
       
  4539             }
       
  4540             
       
  4541             
       
  4542             ERROR;
       
  4543         }
       
  4544         
       
  4545     }/*function_dword_to_usint*/
       
  4546     break;
       
  4547 
       
  4548 /****
       
  4549  *DWORD_TO_ULINT
       
  4550  */
       
  4551     case function_dword_to_ulint :
       
  4552     {
       
  4553         symbol_c *last_type_symbol = NULL;
       
  4554 
       
  4555         {
       
  4556             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4557             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4558             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4559             symbol_c *IN_type_symbol = NULL;
       
  4560             
       
  4561             /* Get the value from a foo(<param_value>) style call */
       
  4562             if (IN_param_value == NULL)
       
  4563               IN_param_value = function_call_param_iterator.next_nf();
       
  4564             if (IN_param_value != NULL) {
       
  4565               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4566               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4567             }
       
  4568             
       
  4569             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4570             {
       
  4571         
       
  4572                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4573                 
       
  4574                 if (IN_type_symbol == NULL)
       
  4575                   IN_type_symbol = last_type_symbol;
       
  4576                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4577                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4578                 function_type_prefix = return_type_symbol;
       
  4579                 function_type_suffix = IN_type_symbol;
       
  4580                 break;
       
  4581                 
       
  4582             }
       
  4583             
       
  4584             
       
  4585             ERROR;
       
  4586         }
       
  4587         
       
  4588     }/*function_dword_to_ulint*/
       
  4589     break;
       
  4590 
       
  4591 /****
       
  4592  *DWORD_TO_BOOL
       
  4593  */
       
  4594     case function_dword_to_bool :
       
  4595     {
       
  4596         symbol_c *last_type_symbol = NULL;
       
  4597 
       
  4598         {
       
  4599             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4601             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4602             symbol_c *IN_type_symbol = NULL;
       
  4603             
       
  4604             /* Get the value from a foo(<param_value>) style call */
       
  4605             if (IN_param_value == NULL)
       
  4606               IN_param_value = function_call_param_iterator.next_nf();
       
  4607             if (IN_param_value != NULL) {
       
  4608               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4609               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4610             }
       
  4611             
       
  4612             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4613             {
       
  4614         
       
  4615                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4616                 
       
  4617                 if (IN_type_symbol == NULL)
       
  4618                   IN_type_symbol = last_type_symbol;
       
  4619                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4620                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4621                 function_type_prefix = return_type_symbol;
       
  4622                 function_type_suffix = IN_type_symbol;
       
  4623                 break;
       
  4624                 
       
  4625             }
       
  4626             
       
  4627             
       
  4628             ERROR;
       
  4629         }
       
  4630         
       
  4631     }/*function_dword_to_bool*/
       
  4632     break;
       
  4633 
       
  4634 /****
       
  4635  *DWORD_TO_TIME
       
  4636  */
       
  4637     case function_dword_to_time :
       
  4638     {
       
  4639         symbol_c *last_type_symbol = NULL;
       
  4640 
       
  4641         {
       
  4642             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4643             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4644             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4645             symbol_c *IN_type_symbol = NULL;
       
  4646             
       
  4647             /* Get the value from a foo(<param_value>) style call */
       
  4648             if (IN_param_value == NULL)
       
  4649               IN_param_value = function_call_param_iterator.next_nf();
       
  4650             if (IN_param_value != NULL) {
       
  4651               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4652               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4653             }
       
  4654             
       
  4655             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4656             {
       
  4657         
       
  4658                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  4659                 
       
  4660                 if (IN_type_symbol == NULL)
       
  4661                   IN_type_symbol = last_type_symbol;
       
  4662                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4663                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4664                 function_type_prefix = return_type_symbol;
       
  4665                 break;
       
  4666                 
       
  4667             }
       
  4668             
       
  4669             
       
  4670             ERROR;
       
  4671         }
       
  4672         
       
  4673     }/*function_dword_to_time*/
       
  4674     break;
       
  4675 
       
  4676 /****
       
  4677  *DWORD_TO_INT
       
  4678  */
       
  4679     case function_dword_to_int :
       
  4680     {
       
  4681         symbol_c *last_type_symbol = NULL;
       
  4682 
       
  4683         {
       
  4684             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4685             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4686             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4687             symbol_c *IN_type_symbol = NULL;
       
  4688             
       
  4689             /* Get the value from a foo(<param_value>) style call */
       
  4690             if (IN_param_value == NULL)
       
  4691               IN_param_value = function_call_param_iterator.next_nf();
       
  4692             if (IN_param_value != NULL) {
       
  4693               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4694               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4695             }
       
  4696             
       
  4697             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  4698             {
       
  4699         
       
  4700                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  4701                 
       
  4702                 if (IN_type_symbol == NULL)
       
  4703                   IN_type_symbol = last_type_symbol;
       
  4704                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4705                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4706                 function_type_prefix = return_type_symbol;
       
  4707                 function_type_suffix = IN_type_symbol;
       
  4708                 break;
       
  4709                 
       
  4710             }
       
  4711             
       
  4712             
       
  4713             ERROR;
       
  4714         }
       
  4715         
       
  4716     }/*function_dword_to_int*/
       
  4717     break;
       
  4718 
       
  4719 /****
       
  4720  *DT_TO_REAL
       
  4721  */
       
  4722     case function_dt_to_real :
       
  4723     {
       
  4724         symbol_c *last_type_symbol = NULL;
       
  4725 
       
  4726         {
       
  4727             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4729             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4730             symbol_c *IN_type_symbol = NULL;
       
  4731             
       
  4732             /* Get the value from a foo(<param_value>) style call */
       
  4733             if (IN_param_value == NULL)
       
  4734               IN_param_value = function_call_param_iterator.next_nf();
       
  4735             if (IN_param_value != NULL) {
       
  4736               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4737               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4738             }
       
  4739             
       
  4740             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4741             {
       
  4742         
       
  4743                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  4744                 
       
  4745                 if (IN_type_symbol == NULL)
       
  4746                   IN_type_symbol = last_type_symbol;
       
  4747                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4748                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4749                 function_type_prefix = return_type_symbol;
       
  4750                 break;
       
  4751                 
       
  4752             }
       
  4753             
       
  4754             
       
  4755             ERROR;
       
  4756         }
       
  4757         
       
  4758     }/*function_dt_to_real*/
       
  4759     break;
       
  4760 
       
  4761 /****
       
  4762  *DT_TO_SINT
       
  4763  */
       
  4764     case function_dt_to_sint :
       
  4765     {
       
  4766         symbol_c *last_type_symbol = NULL;
       
  4767 
       
  4768         {
       
  4769             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4770             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4771             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4772             symbol_c *IN_type_symbol = NULL;
       
  4773             
       
  4774             /* Get the value from a foo(<param_value>) style call */
       
  4775             if (IN_param_value == NULL)
       
  4776               IN_param_value = function_call_param_iterator.next_nf();
       
  4777             if (IN_param_value != NULL) {
       
  4778               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4779               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4780             }
       
  4781             
       
  4782             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4783             {
       
  4784         
       
  4785                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4786                 
       
  4787                 if (IN_type_symbol == NULL)
       
  4788                   IN_type_symbol = last_type_symbol;
       
  4789                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4790                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4791                 function_type_prefix = return_type_symbol;
       
  4792                 break;
       
  4793                 
       
  4794             }
       
  4795             
       
  4796             
       
  4797             ERROR;
       
  4798         }
       
  4799         
       
  4800     }/*function_dt_to_sint*/
       
  4801     break;
       
  4802 
       
  4803 /****
       
  4804  *DT_TO_LINT
       
  4805  */
       
  4806     case function_dt_to_lint :
       
  4807     {
       
  4808         symbol_c *last_type_symbol = NULL;
       
  4809 
       
  4810         {
       
  4811             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4812             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4813             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4814             symbol_c *IN_type_symbol = NULL;
       
  4815             
       
  4816             /* Get the value from a foo(<param_value>) style call */
       
  4817             if (IN_param_value == NULL)
       
  4818               IN_param_value = function_call_param_iterator.next_nf();
       
  4819             if (IN_param_value != NULL) {
       
  4820               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4821               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4822             }
       
  4823             
       
  4824             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4825             {
       
  4826         
       
  4827                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4828                 
       
  4829                 if (IN_type_symbol == NULL)
       
  4830                   IN_type_symbol = last_type_symbol;
       
  4831                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4832                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4833                 function_type_prefix = return_type_symbol;
       
  4834                 break;
       
  4835                 
       
  4836             }
       
  4837             
       
  4838             
       
  4839             ERROR;
       
  4840         }
       
  4841         
       
  4842     }/*function_dt_to_lint*/
       
  4843     break;
       
  4844 
       
  4845 /****
       
  4846  *DT_TO_DINT
       
  4847  */
       
  4848     case function_dt_to_dint :
       
  4849     {
       
  4850         symbol_c *last_type_symbol = NULL;
       
  4851 
       
  4852         {
       
  4853             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4855             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4856             symbol_c *IN_type_symbol = NULL;
       
  4857             
       
  4858             /* Get the value from a foo(<param_value>) style call */
       
  4859             if (IN_param_value == NULL)
       
  4860               IN_param_value = function_call_param_iterator.next_nf();
       
  4861             if (IN_param_value != NULL) {
       
  4862               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4863               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4864             }
       
  4865             
       
  4866             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4867             {
       
  4868         
       
  4869                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4870                 
       
  4871                 if (IN_type_symbol == NULL)
       
  4872                   IN_type_symbol = last_type_symbol;
       
  4873                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4874                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4875                 function_type_prefix = return_type_symbol;
       
  4876                 break;
       
  4877                 
       
  4878             }
       
  4879             
       
  4880             
       
  4881             ERROR;
       
  4882         }
       
  4883         
       
  4884     }/*function_dt_to_dint*/
       
  4885     break;
       
  4886 
       
  4887 /****
       
  4888  *DT_TO_DWORD
       
  4889  */
       
  4890     case function_dt_to_dword :
       
  4891     {
       
  4892         symbol_c *last_type_symbol = NULL;
       
  4893 
       
  4894         {
       
  4895             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4897             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4898             symbol_c *IN_type_symbol = NULL;
       
  4899             
       
  4900             /* Get the value from a foo(<param_value>) style call */
       
  4901             if (IN_param_value == NULL)
       
  4902               IN_param_value = function_call_param_iterator.next_nf();
       
  4903             if (IN_param_value != NULL) {
       
  4904               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4905               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4906             }
       
  4907             
       
  4908             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4909             {
       
  4910         
       
  4911                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4912                 
       
  4913                 if (IN_type_symbol == NULL)
       
  4914                   IN_type_symbol = last_type_symbol;
       
  4915                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4916                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4917                 function_type_prefix = return_type_symbol;
       
  4918                 break;
       
  4919                 
       
  4920             }
       
  4921             
       
  4922             
       
  4923             ERROR;
       
  4924         }
       
  4925         
       
  4926     }/*function_dt_to_dword*/
       
  4927     break;
       
  4928 
       
  4929 /****
       
  4930  *DT_TO_UDINT
       
  4931  */
       
  4932     case function_dt_to_udint :
       
  4933     {
       
  4934         symbol_c *last_type_symbol = NULL;
       
  4935 
       
  4936         {
       
  4937             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4938             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4939             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4940             symbol_c *IN_type_symbol = NULL;
       
  4941             
       
  4942             /* Get the value from a foo(<param_value>) style call */
       
  4943             if (IN_param_value == NULL)
       
  4944               IN_param_value = function_call_param_iterator.next_nf();
       
  4945             if (IN_param_value != NULL) {
       
  4946               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4947               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4948             }
       
  4949             
       
  4950             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4951             {
       
  4952         
       
  4953                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4954                 
       
  4955                 if (IN_type_symbol == NULL)
       
  4956                   IN_type_symbol = last_type_symbol;
       
  4957                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  4958                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4959                 function_type_prefix = return_type_symbol;
       
  4960                 break;
       
  4961                 
       
  4962             }
       
  4963             
       
  4964             
       
  4965             ERROR;
       
  4966         }
       
  4967         
       
  4968     }/*function_dt_to_udint*/
       
  4969     break;
       
  4970 
       
  4971 /****
       
  4972  *DT_TO_WORD
       
  4973  */
       
  4974     case function_dt_to_word :
       
  4975     {
       
  4976         symbol_c *last_type_symbol = NULL;
       
  4977 
       
  4978         {
       
  4979             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  4980             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4981             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  4982             symbol_c *IN_type_symbol = NULL;
       
  4983             
       
  4984             /* Get the value from a foo(<param_value>) style call */
       
  4985             if (IN_param_value == NULL)
       
  4986               IN_param_value = function_call_param_iterator.next_nf();
       
  4987             if (IN_param_value != NULL) {
       
  4988               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4989               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4990             }
       
  4991             
       
  4992             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4993             {
       
  4994         
       
  4995                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  4996                 
       
  4997                 if (IN_type_symbol == NULL)
       
  4998                   IN_type_symbol = last_type_symbol;
       
  4999                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5000                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5001                 function_type_prefix = return_type_symbol;
       
  5002                 break;
       
  5003                 
       
  5004             }
       
  5005             
       
  5006             
       
  5007             ERROR;
       
  5008         }
       
  5009         
       
  5010     }/*function_dt_to_word*/
       
  5011     break;
       
  5012 
       
  5013 /****
       
  5014  *DT_TO_STRING
       
  5015  */
       
  5016     case function_dt_to_string :
       
  5017     {
       
  5018         symbol_c *last_type_symbol = NULL;
       
  5019 
       
  5020         {
       
  5021             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5022             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5023             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5024             symbol_c *IN_type_symbol = NULL;
       
  5025             
       
  5026             /* Get the value from a foo(<param_value>) style call */
       
  5027             if (IN_param_value == NULL)
       
  5028               IN_param_value = function_call_param_iterator.next_nf();
       
  5029             if (IN_param_value != NULL) {
       
  5030               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5031               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5032             }
       
  5033             
       
  5034             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5035             {
       
  5036         
       
  5037                 function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
       
  5038                 
       
  5039                 if (IN_type_symbol == NULL)
       
  5040                   IN_type_symbol = last_type_symbol;
       
  5041                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5042                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5043                 function_type_prefix = return_type_symbol;
       
  5044                 break;
       
  5045                 
       
  5046             }
       
  5047             
       
  5048             
       
  5049             ERROR;
       
  5050         }
       
  5051         
       
  5052     }/*function_dt_to_string*/
       
  5053     break;
       
  5054 
       
  5055 /****
       
  5056  *DT_TO_LWORD
       
  5057  */
       
  5058     case function_dt_to_lword :
       
  5059     {
       
  5060         symbol_c *last_type_symbol = NULL;
       
  5061 
       
  5062         {
       
  5063             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5065             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5066             symbol_c *IN_type_symbol = NULL;
       
  5067             
       
  5068             /* Get the value from a foo(<param_value>) style call */
       
  5069             if (IN_param_value == NULL)
       
  5070               IN_param_value = function_call_param_iterator.next_nf();
       
  5071             if (IN_param_value != NULL) {
       
  5072               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5073               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5074             }
       
  5075             
       
  5076             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5077             {
       
  5078         
       
  5079                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5080                 
       
  5081                 if (IN_type_symbol == NULL)
       
  5082                   IN_type_symbol = last_type_symbol;
       
  5083                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5084                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5085                 function_type_prefix = return_type_symbol;
       
  5086                 break;
       
  5087                 
       
  5088             }
       
  5089             
       
  5090             
       
  5091             ERROR;
       
  5092         }
       
  5093         
       
  5094     }/*function_dt_to_lword*/
       
  5095     break;
       
  5096 
       
  5097 /****
       
  5098  *DT_TO_UINT
       
  5099  */
       
  5100     case function_dt_to_uint :
       
  5101     {
       
  5102         symbol_c *last_type_symbol = NULL;
       
  5103 
       
  5104         {
       
  5105             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5106             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5107             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5108             symbol_c *IN_type_symbol = NULL;
       
  5109             
       
  5110             /* Get the value from a foo(<param_value>) style call */
       
  5111             if (IN_param_value == NULL)
       
  5112               IN_param_value = function_call_param_iterator.next_nf();
       
  5113             if (IN_param_value != NULL) {
       
  5114               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5115               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5116             }
       
  5117             
       
  5118             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5119             {
       
  5120         
       
  5121                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5122                 
       
  5123                 if (IN_type_symbol == NULL)
       
  5124                   IN_type_symbol = last_type_symbol;
       
  5125                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5126                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5127                 function_type_prefix = return_type_symbol;
       
  5128                 break;
       
  5129                 
       
  5130             }
       
  5131             
       
  5132             
       
  5133             ERROR;
       
  5134         }
       
  5135         
       
  5136     }/*function_dt_to_uint*/
       
  5137     break;
       
  5138 
       
  5139 /****
       
  5140  *DT_TO_LREAL
       
  5141  */
       
  5142     case function_dt_to_lreal :
       
  5143     {
       
  5144         symbol_c *last_type_symbol = NULL;
       
  5145 
       
  5146         {
       
  5147             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5148             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5149             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5150             symbol_c *IN_type_symbol = NULL;
       
  5151             
       
  5152             /* Get the value from a foo(<param_value>) style call */
       
  5153             if (IN_param_value == NULL)
       
  5154               IN_param_value = function_call_param_iterator.next_nf();
       
  5155             if (IN_param_value != NULL) {
       
  5156               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5157               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5158             }
       
  5159             
       
  5160             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5161             {
       
  5162         
       
  5163                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5164                 
       
  5165                 if (IN_type_symbol == NULL)
       
  5166                   IN_type_symbol = last_type_symbol;
       
  5167                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5168                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5169                 function_type_prefix = return_type_symbol;
       
  5170                 break;
       
  5171                 
       
  5172             }
       
  5173             
       
  5174             
       
  5175             ERROR;
       
  5176         }
       
  5177         
       
  5178     }/*function_dt_to_lreal*/
       
  5179     break;
       
  5180 
       
  5181 /****
       
  5182  *DT_TO_BYTE
       
  5183  */
       
  5184     case function_dt_to_byte :
       
  5185     {
       
  5186         symbol_c *last_type_symbol = NULL;
       
  5187 
       
  5188         {
       
  5189             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5190             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5191             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5192             symbol_c *IN_type_symbol = NULL;
       
  5193             
       
  5194             /* Get the value from a foo(<param_value>) style call */
       
  5195             if (IN_param_value == NULL)
       
  5196               IN_param_value = function_call_param_iterator.next_nf();
       
  5197             if (IN_param_value != NULL) {
       
  5198               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5199               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5200             }
       
  5201             
       
  5202             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5203             {
       
  5204         
       
  5205                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5206                 
       
  5207                 if (IN_type_symbol == NULL)
       
  5208                   IN_type_symbol = last_type_symbol;
       
  5209                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5210                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5211                 function_type_prefix = return_type_symbol;
       
  5212                 break;
       
  5213                 
       
  5214             }
       
  5215             
       
  5216             
       
  5217             ERROR;
       
  5218         }
       
  5219         
       
  5220     }/*function_dt_to_byte*/
       
  5221     break;
       
  5222 
       
  5223 /****
       
  5224  *DT_TO_USINT
       
  5225  */
       
  5226     case function_dt_to_usint :
       
  5227     {
       
  5228         symbol_c *last_type_symbol = NULL;
       
  5229 
       
  5230         {
       
  5231             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5233             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5234             symbol_c *IN_type_symbol = NULL;
       
  5235             
       
  5236             /* Get the value from a foo(<param_value>) style call */
       
  5237             if (IN_param_value == NULL)
       
  5238               IN_param_value = function_call_param_iterator.next_nf();
       
  5239             if (IN_param_value != NULL) {
       
  5240               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5241               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5242             }
       
  5243             
       
  5244             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5245             {
       
  5246         
       
  5247                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5248                 
       
  5249                 if (IN_type_symbol == NULL)
       
  5250                   IN_type_symbol = last_type_symbol;
       
  5251                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5253                 function_type_prefix = return_type_symbol;
       
  5254                 break;
       
  5255                 
       
  5256             }
       
  5257             
       
  5258             
       
  5259             ERROR;
       
  5260         }
       
  5261         
       
  5262     }/*function_dt_to_usint*/
       
  5263     break;
       
  5264 
       
  5265 /****
       
  5266  *DT_TO_ULINT
       
  5267  */
       
  5268     case function_dt_to_ulint :
       
  5269     {
       
  5270         symbol_c *last_type_symbol = NULL;
       
  5271 
       
  5272         {
       
  5273             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5275             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5276             symbol_c *IN_type_symbol = NULL;
       
  5277             
       
  5278             /* Get the value from a foo(<param_value>) style call */
       
  5279             if (IN_param_value == NULL)
       
  5280               IN_param_value = function_call_param_iterator.next_nf();
       
  5281             if (IN_param_value != NULL) {
       
  5282               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5283               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5284             }
       
  5285             
       
  5286             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5287             {
       
  5288         
       
  5289                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5290                 
       
  5291                 if (IN_type_symbol == NULL)
       
  5292                   IN_type_symbol = last_type_symbol;
       
  5293                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5294                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5295                 function_type_prefix = return_type_symbol;
       
  5296                 break;
       
  5297                 
       
  5298             }
       
  5299             
       
  5300             
       
  5301             ERROR;
       
  5302         }
       
  5303         
       
  5304     }/*function_dt_to_ulint*/
       
  5305     break;
       
  5306 
       
  5307 /****
       
  5308  *DT_TO_INT
       
  5309  */
       
  5310     case function_dt_to_int :
       
  5311     {
       
  5312         symbol_c *last_type_symbol = NULL;
       
  5313 
       
  5314         {
       
  5315             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5317             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5318             symbol_c *IN_type_symbol = NULL;
       
  5319             
       
  5320             /* Get the value from a foo(<param_value>) style call */
       
  5321             if (IN_param_value == NULL)
       
  5322               IN_param_value = function_call_param_iterator.next_nf();
       
  5323             if (IN_param_value != NULL) {
       
  5324               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5325               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5326             }
       
  5327             
       
  5328             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  5329             {
       
  5330         
       
  5331                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5332                 
       
  5333                 if (IN_type_symbol == NULL)
       
  5334                   IN_type_symbol = last_type_symbol;
       
  5335                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5336                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5337                 function_type_prefix = return_type_symbol;
       
  5338                 break;
       
  5339                 
       
  5340             }
       
  5341             
       
  5342             
       
  5343             ERROR;
       
  5344         }
       
  5345         
       
  5346     }/*function_dt_to_int*/
       
  5347     break;
       
  5348 
       
  5349 /****
       
  5350  *TOD_TO_REAL
       
  5351  */
       
  5352     case function_tod_to_real :
       
  5353     {
       
  5354         symbol_c *last_type_symbol = NULL;
       
  5355 
       
  5356         {
       
  5357             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5359             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5360             symbol_c *IN_type_symbol = NULL;
       
  5361             
       
  5362             /* Get the value from a foo(<param_value>) style call */
       
  5363             if (IN_param_value == NULL)
       
  5364               IN_param_value = function_call_param_iterator.next_nf();
       
  5365             if (IN_param_value != NULL) {
       
  5366               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5367               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5368             }
       
  5369             
       
  5370             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5371             {
       
  5372         
       
  5373                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5374                 
       
  5375                 if (IN_type_symbol == NULL)
       
  5376                   IN_type_symbol = last_type_symbol;
       
  5377                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5378                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5379                 function_type_prefix = return_type_symbol;
       
  5380                 break;
       
  5381                 
       
  5382             }
       
  5383             
       
  5384             
       
  5385             ERROR;
       
  5386         }
       
  5387         
       
  5388     }/*function_tod_to_real*/
       
  5389     break;
       
  5390 
       
  5391 /****
       
  5392  *TOD_TO_SINT
       
  5393  */
       
  5394     case function_tod_to_sint :
       
  5395     {
       
  5396         symbol_c *last_type_symbol = NULL;
       
  5397 
       
  5398         {
       
  5399             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5401             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5402             symbol_c *IN_type_symbol = NULL;
       
  5403             
       
  5404             /* Get the value from a foo(<param_value>) style call */
       
  5405             if (IN_param_value == NULL)
       
  5406               IN_param_value = function_call_param_iterator.next_nf();
       
  5407             if (IN_param_value != NULL) {
       
  5408               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5409               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5410             }
       
  5411             
       
  5412             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5413             {
       
  5414         
       
  5415                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5416                 
       
  5417                 if (IN_type_symbol == NULL)
       
  5418                   IN_type_symbol = last_type_symbol;
       
  5419                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5420                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5421                 function_type_prefix = return_type_symbol;
       
  5422                 break;
       
  5423                 
       
  5424             }
       
  5425             
       
  5426             
       
  5427             ERROR;
       
  5428         }
       
  5429         
       
  5430     }/*function_tod_to_sint*/
       
  5431     break;
       
  5432 
       
  5433 /****
       
  5434  *TOD_TO_LINT
       
  5435  */
       
  5436     case function_tod_to_lint :
       
  5437     {
       
  5438         symbol_c *last_type_symbol = NULL;
       
  5439 
       
  5440         {
       
  5441             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5442             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5443             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5444             symbol_c *IN_type_symbol = NULL;
       
  5445             
       
  5446             /* Get the value from a foo(<param_value>) style call */
       
  5447             if (IN_param_value == NULL)
       
  5448               IN_param_value = function_call_param_iterator.next_nf();
       
  5449             if (IN_param_value != NULL) {
       
  5450               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5451               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5452             }
       
  5453             
       
  5454             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5455             {
       
  5456         
       
  5457                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5458                 
       
  5459                 if (IN_type_symbol == NULL)
       
  5460                   IN_type_symbol = last_type_symbol;
       
  5461                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5462                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5463                 function_type_prefix = return_type_symbol;
       
  5464                 break;
       
  5465                 
       
  5466             }
       
  5467             
       
  5468             
       
  5469             ERROR;
       
  5470         }
       
  5471         
       
  5472     }/*function_tod_to_lint*/
       
  5473     break;
       
  5474 
       
  5475 /****
       
  5476  *TOD_TO_DINT
       
  5477  */
       
  5478     case function_tod_to_dint :
       
  5479     {
       
  5480         symbol_c *last_type_symbol = NULL;
       
  5481 
       
  5482         {
       
  5483             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5485             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5486             symbol_c *IN_type_symbol = NULL;
       
  5487             
       
  5488             /* Get the value from a foo(<param_value>) style call */
       
  5489             if (IN_param_value == NULL)
       
  5490               IN_param_value = function_call_param_iterator.next_nf();
       
  5491             if (IN_param_value != NULL) {
       
  5492               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5493               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5494             }
       
  5495             
       
  5496             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5497             {
       
  5498         
       
  5499                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5500                 
       
  5501                 if (IN_type_symbol == NULL)
       
  5502                   IN_type_symbol = last_type_symbol;
       
  5503                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5504                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5505                 function_type_prefix = return_type_symbol;
       
  5506                 break;
       
  5507                 
       
  5508             }
       
  5509             
       
  5510             
       
  5511             ERROR;
       
  5512         }
       
  5513         
       
  5514     }/*function_tod_to_dint*/
       
  5515     break;
       
  5516 
       
  5517 /****
       
  5518  *TOD_TO_DWORD
       
  5519  */
       
  5520     case function_tod_to_dword :
       
  5521     {
       
  5522         symbol_c *last_type_symbol = NULL;
       
  5523 
       
  5524         {
       
  5525             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5526             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5527             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5528             symbol_c *IN_type_symbol = NULL;
       
  5529             
       
  5530             /* Get the value from a foo(<param_value>) style call */
       
  5531             if (IN_param_value == NULL)
       
  5532               IN_param_value = function_call_param_iterator.next_nf();
       
  5533             if (IN_param_value != NULL) {
       
  5534               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5535               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5536             }
       
  5537             
       
  5538             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5539             {
       
  5540         
       
  5541                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5542                 
       
  5543                 if (IN_type_symbol == NULL)
       
  5544                   IN_type_symbol = last_type_symbol;
       
  5545                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5546                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5547                 function_type_prefix = return_type_symbol;
       
  5548                 break;
       
  5549                 
       
  5550             }
       
  5551             
       
  5552             
       
  5553             ERROR;
       
  5554         }
       
  5555         
       
  5556     }/*function_tod_to_dword*/
       
  5557     break;
       
  5558 
       
  5559 /****
       
  5560  *TOD_TO_UDINT
       
  5561  */
       
  5562     case function_tod_to_udint :
       
  5563     {
       
  5564         symbol_c *last_type_symbol = NULL;
       
  5565 
       
  5566         {
       
  5567             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5569             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5570             symbol_c *IN_type_symbol = NULL;
       
  5571             
       
  5572             /* Get the value from a foo(<param_value>) style call */
       
  5573             if (IN_param_value == NULL)
       
  5574               IN_param_value = function_call_param_iterator.next_nf();
       
  5575             if (IN_param_value != NULL) {
       
  5576               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5577               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5578             }
       
  5579             
       
  5580             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5581             {
       
  5582         
       
  5583                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5584                 
       
  5585                 if (IN_type_symbol == NULL)
       
  5586                   IN_type_symbol = last_type_symbol;
       
  5587                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5588                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5589                 function_type_prefix = return_type_symbol;
       
  5590                 break;
       
  5591                 
       
  5592             }
       
  5593             
       
  5594             
       
  5595             ERROR;
       
  5596         }
       
  5597         
       
  5598     }/*function_tod_to_udint*/
       
  5599     break;
       
  5600 
       
  5601 /****
       
  5602  *TOD_TO_WORD
       
  5603  */
       
  5604     case function_tod_to_word :
       
  5605     {
       
  5606         symbol_c *last_type_symbol = NULL;
       
  5607 
       
  5608         {
       
  5609             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5611             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5612             symbol_c *IN_type_symbol = NULL;
       
  5613             
       
  5614             /* Get the value from a foo(<param_value>) style call */
       
  5615             if (IN_param_value == NULL)
       
  5616               IN_param_value = function_call_param_iterator.next_nf();
       
  5617             if (IN_param_value != NULL) {
       
  5618               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5619               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5620             }
       
  5621             
       
  5622             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5623             {
       
  5624         
       
  5625                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5626                 
       
  5627                 if (IN_type_symbol == NULL)
       
  5628                   IN_type_symbol = last_type_symbol;
       
  5629                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5630                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5631                 function_type_prefix = return_type_symbol;
       
  5632                 break;
       
  5633                 
       
  5634             }
       
  5635             
       
  5636             
       
  5637             ERROR;
       
  5638         }
       
  5639         
       
  5640     }/*function_tod_to_word*/
       
  5641     break;
       
  5642 
       
  5643 /****
       
  5644  *TOD_TO_STRING
       
  5645  */
       
  5646     case function_tod_to_string :
       
  5647     {
       
  5648         symbol_c *last_type_symbol = NULL;
       
  5649 
       
  5650         {
       
  5651             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5653             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5654             symbol_c *IN_type_symbol = NULL;
       
  5655             
       
  5656             /* Get the value from a foo(<param_value>) style call */
       
  5657             if (IN_param_value == NULL)
       
  5658               IN_param_value = function_call_param_iterator.next_nf();
       
  5659             if (IN_param_value != NULL) {
       
  5660               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5661               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5662             }
       
  5663             
       
  5664             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5665             {
       
  5666         
       
  5667                 function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
       
  5668                 
       
  5669                 if (IN_type_symbol == NULL)
       
  5670                   IN_type_symbol = last_type_symbol;
       
  5671                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5672                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5673                 function_type_prefix = return_type_symbol;
       
  5674                 break;
       
  5675                 
       
  5676             }
       
  5677             
       
  5678             
       
  5679             ERROR;
       
  5680         }
       
  5681         
       
  5682     }/*function_tod_to_string*/
       
  5683     break;
       
  5684 
       
  5685 /****
       
  5686  *TOD_TO_LWORD
       
  5687  */
       
  5688     case function_tod_to_lword :
       
  5689     {
       
  5690         symbol_c *last_type_symbol = NULL;
       
  5691 
       
  5692         {
       
  5693             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5694             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5695             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5696             symbol_c *IN_type_symbol = NULL;
       
  5697             
       
  5698             /* Get the value from a foo(<param_value>) style call */
       
  5699             if (IN_param_value == NULL)
       
  5700               IN_param_value = function_call_param_iterator.next_nf();
       
  5701             if (IN_param_value != NULL) {
       
  5702               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5703               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5704             }
       
  5705             
       
  5706             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5707             {
       
  5708         
       
  5709                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5710                 
       
  5711                 if (IN_type_symbol == NULL)
       
  5712                   IN_type_symbol = last_type_symbol;
       
  5713                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5714                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5715                 function_type_prefix = return_type_symbol;
       
  5716                 break;
       
  5717                 
       
  5718             }
       
  5719             
       
  5720             
       
  5721             ERROR;
       
  5722         }
       
  5723         
       
  5724     }/*function_tod_to_lword*/
       
  5725     break;
       
  5726 
       
  5727 /****
       
  5728  *TOD_TO_UINT
       
  5729  */
       
  5730     case function_tod_to_uint :
       
  5731     {
       
  5732         symbol_c *last_type_symbol = NULL;
       
  5733 
       
  5734         {
       
  5735             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5737             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5738             symbol_c *IN_type_symbol = NULL;
       
  5739             
       
  5740             /* Get the value from a foo(<param_value>) style call */
       
  5741             if (IN_param_value == NULL)
       
  5742               IN_param_value = function_call_param_iterator.next_nf();
       
  5743             if (IN_param_value != NULL) {
       
  5744               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5745               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5746             }
       
  5747             
       
  5748             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5749             {
       
  5750         
       
  5751                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5752                 
       
  5753                 if (IN_type_symbol == NULL)
       
  5754                   IN_type_symbol = last_type_symbol;
       
  5755                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5756                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5757                 function_type_prefix = return_type_symbol;
       
  5758                 break;
       
  5759                 
       
  5760             }
       
  5761             
       
  5762             
       
  5763             ERROR;
       
  5764         }
       
  5765         
       
  5766     }/*function_tod_to_uint*/
       
  5767     break;
       
  5768 
       
  5769 /****
       
  5770  *TOD_TO_LREAL
       
  5771  */
       
  5772     case function_tod_to_lreal :
       
  5773     {
       
  5774         symbol_c *last_type_symbol = NULL;
       
  5775 
       
  5776         {
       
  5777             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5779             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5780             symbol_c *IN_type_symbol = NULL;
       
  5781             
       
  5782             /* Get the value from a foo(<param_value>) style call */
       
  5783             if (IN_param_value == NULL)
       
  5784               IN_param_value = function_call_param_iterator.next_nf();
       
  5785             if (IN_param_value != NULL) {
       
  5786               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5787               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5788             }
       
  5789             
       
  5790             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5791             {
       
  5792         
       
  5793                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
       
  5794                 
       
  5795                 if (IN_type_symbol == NULL)
       
  5796                   IN_type_symbol = last_type_symbol;
       
  5797                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5798                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5799                 function_type_prefix = return_type_symbol;
       
  5800                 break;
       
  5801                 
       
  5802             }
       
  5803             
       
  5804             
       
  5805             ERROR;
       
  5806         }
       
  5807         
       
  5808     }/*function_tod_to_lreal*/
       
  5809     break;
       
  5810 
       
  5811 /****
       
  5812  *TOD_TO_BYTE
       
  5813  */
       
  5814     case function_tod_to_byte :
       
  5815     {
       
  5816         symbol_c *last_type_symbol = NULL;
       
  5817 
       
  5818         {
       
  5819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5822             symbol_c *IN_type_symbol = NULL;
       
  5823             
       
  5824             /* Get the value from a foo(<param_value>) style call */
       
  5825             if (IN_param_value == NULL)
       
  5826               IN_param_value = function_call_param_iterator.next_nf();
       
  5827             if (IN_param_value != NULL) {
       
  5828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5830             }
       
  5831             
       
  5832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5833             {
       
  5834         
       
  5835                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5836                 
       
  5837                 if (IN_type_symbol == NULL)
       
  5838                   IN_type_symbol = last_type_symbol;
       
  5839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5840                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5841                 function_type_prefix = return_type_symbol;
       
  5842                 break;
       
  5843                 
       
  5844             }
       
  5845             
       
  5846             
       
  5847             ERROR;
       
  5848         }
       
  5849         
       
  5850     }/*function_tod_to_byte*/
       
  5851     break;
       
  5852 
       
  5853 /****
       
  5854  *TOD_TO_USINT
       
  5855  */
       
  5856     case function_tod_to_usint :
       
  5857     {
       
  5858         symbol_c *last_type_symbol = NULL;
       
  5859 
       
  5860         {
       
  5861             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5862             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5863             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5864             symbol_c *IN_type_symbol = NULL;
       
  5865             
       
  5866             /* Get the value from a foo(<param_value>) style call */
       
  5867             if (IN_param_value == NULL)
       
  5868               IN_param_value = function_call_param_iterator.next_nf();
       
  5869             if (IN_param_value != NULL) {
       
  5870               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5871               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5872             }
       
  5873             
       
  5874             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5875             {
       
  5876         
       
  5877                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5878                 
       
  5879                 if (IN_type_symbol == NULL)
       
  5880                   IN_type_symbol = last_type_symbol;
       
  5881                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5882                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5883                 function_type_prefix = return_type_symbol;
       
  5884                 break;
       
  5885                 
       
  5886             }
       
  5887             
       
  5888             
       
  5889             ERROR;
       
  5890         }
       
  5891         
       
  5892     }/*function_tod_to_usint*/
       
  5893     break;
       
  5894 
       
  5895 /****
       
  5896  *TOD_TO_ULINT
       
  5897  */
       
  5898     case function_tod_to_ulint :
       
  5899     {
       
  5900         symbol_c *last_type_symbol = NULL;
       
  5901 
       
  5902         {
       
  5903             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5905             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5906             symbol_c *IN_type_symbol = NULL;
       
  5907             
       
  5908             /* Get the value from a foo(<param_value>) style call */
       
  5909             if (IN_param_value == NULL)
       
  5910               IN_param_value = function_call_param_iterator.next_nf();
       
  5911             if (IN_param_value != NULL) {
       
  5912               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5913               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5914             }
       
  5915             
       
  5916             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5917             {
       
  5918         
       
  5919                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5920                 
       
  5921                 if (IN_type_symbol == NULL)
       
  5922                   IN_type_symbol = last_type_symbol;
       
  5923                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5925                 function_type_prefix = return_type_symbol;
       
  5926                 break;
       
  5927                 
       
  5928             }
       
  5929             
       
  5930             
       
  5931             ERROR;
       
  5932         }
       
  5933         
       
  5934     }/*function_tod_to_ulint*/
       
  5935     break;
       
  5936 
       
  5937 /****
       
  5938  *TOD_TO_INT
       
  5939  */
       
  5940     case function_tod_to_int :
       
  5941     {
       
  5942         symbol_c *last_type_symbol = NULL;
       
  5943 
       
  5944         {
       
  5945             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5946             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5947             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5948             symbol_c *IN_type_symbol = NULL;
       
  5949             
       
  5950             /* Get the value from a foo(<param_value>) style call */
       
  5951             if (IN_param_value == NULL)
       
  5952               IN_param_value = function_call_param_iterator.next_nf();
       
  5953             if (IN_param_value != NULL) {
       
  5954               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5955               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5956             }
       
  5957             
       
  5958             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5959             {
       
  5960         
       
  5961                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
       
  5962                 
       
  5963                 if (IN_type_symbol == NULL)
       
  5964                   IN_type_symbol = last_type_symbol;
       
  5965                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  5966                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5967                 function_type_prefix = return_type_symbol;
       
  5968                 break;
       
  5969                 
       
  5970             }
       
  5971             
       
  5972             
       
  5973             ERROR;
       
  5974         }
       
  5975         
       
  5976     }/*function_tod_to_int*/
       
  5977     break;
       
  5978 
       
  5979 /****
       
  5980  *UDINT_TO_REAL
       
  5981  */
       
  5982     case function_udint_to_real :
       
  5983     {
       
  5984         symbol_c *last_type_symbol = NULL;
       
  5985 
       
  5986         {
       
  5987             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  5988             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5989             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  5990             symbol_c *IN_type_symbol = NULL;
       
  5991             
       
  5992             /* Get the value from a foo(<param_value>) style call */
       
  5993             if (IN_param_value == NULL)
       
  5994               IN_param_value = function_call_param_iterator.next_nf();
       
  5995             if (IN_param_value != NULL) {
       
  5996               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5997               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5998             }
       
  5999             
       
  6000             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6001             {
       
  6002         
       
  6003                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6004                 
       
  6005                 if (IN_type_symbol == NULL)
       
  6006                   IN_type_symbol = last_type_symbol;
       
  6007                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6008                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6009                 function_type_prefix = return_type_symbol;
       
  6010                 function_type_suffix = IN_type_symbol;
       
  6011                 break;
       
  6012                 
       
  6013             }
       
  6014             
       
  6015             
       
  6016             ERROR;
       
  6017         }
       
  6018         
       
  6019     }/*function_udint_to_real*/
       
  6020     break;
       
  6021 
       
  6022 /****
       
  6023  *UDINT_TO_SINT
       
  6024  */
       
  6025     case function_udint_to_sint :
       
  6026     {
       
  6027         symbol_c *last_type_symbol = NULL;
       
  6028 
       
  6029         {
       
  6030             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6031             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6032             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6033             symbol_c *IN_type_symbol = NULL;
       
  6034             
       
  6035             /* Get the value from a foo(<param_value>) style call */
       
  6036             if (IN_param_value == NULL)
       
  6037               IN_param_value = function_call_param_iterator.next_nf();
       
  6038             if (IN_param_value != NULL) {
       
  6039               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6040               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6041             }
       
  6042             
       
  6043             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6044             {
       
  6045         
       
  6046                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6047                 
       
  6048                 if (IN_type_symbol == NULL)
       
  6049                   IN_type_symbol = last_type_symbol;
       
  6050                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6051                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6052                 function_type_prefix = return_type_symbol;
       
  6053                 function_type_suffix = IN_type_symbol;
       
  6054                 break;
       
  6055                 
       
  6056             }
       
  6057             
       
  6058             
       
  6059             ERROR;
       
  6060         }
       
  6061         
       
  6062     }/*function_udint_to_sint*/
       
  6063     break;
       
  6064 
       
  6065 /****
       
  6066  *UDINT_TO_LINT
       
  6067  */
       
  6068     case function_udint_to_lint :
       
  6069     {
       
  6070         symbol_c *last_type_symbol = NULL;
       
  6071 
       
  6072         {
       
  6073             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6074             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6075             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6076             symbol_c *IN_type_symbol = NULL;
       
  6077             
       
  6078             /* Get the value from a foo(<param_value>) style call */
       
  6079             if (IN_param_value == NULL)
       
  6080               IN_param_value = function_call_param_iterator.next_nf();
       
  6081             if (IN_param_value != NULL) {
       
  6082               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6083               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6084             }
       
  6085             
       
  6086             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6087             {
       
  6088         
       
  6089                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6090                 
       
  6091                 if (IN_type_symbol == NULL)
       
  6092                   IN_type_symbol = last_type_symbol;
       
  6093                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6094                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6095                 function_type_prefix = return_type_symbol;
       
  6096                 function_type_suffix = IN_type_symbol;
       
  6097                 break;
       
  6098                 
       
  6099             }
       
  6100             
       
  6101             
       
  6102             ERROR;
       
  6103         }
       
  6104         
       
  6105     }/*function_udint_to_lint*/
       
  6106     break;
       
  6107 
       
  6108 /****
       
  6109  *UDINT_TO_DINT
       
  6110  */
       
  6111     case function_udint_to_dint :
       
  6112     {
       
  6113         symbol_c *last_type_symbol = NULL;
       
  6114 
       
  6115         {
       
  6116             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6117             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6118             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6119             symbol_c *IN_type_symbol = NULL;
       
  6120             
       
  6121             /* Get the value from a foo(<param_value>) style call */
       
  6122             if (IN_param_value == NULL)
       
  6123               IN_param_value = function_call_param_iterator.next_nf();
       
  6124             if (IN_param_value != NULL) {
       
  6125               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6126               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6127             }
       
  6128             
       
  6129             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6130             {
       
  6131         
       
  6132                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6133                 
       
  6134                 if (IN_type_symbol == NULL)
       
  6135                   IN_type_symbol = last_type_symbol;
       
  6136                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6137                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6138                 function_type_prefix = return_type_symbol;
       
  6139                 function_type_suffix = IN_type_symbol;
       
  6140                 break;
       
  6141                 
       
  6142             }
       
  6143             
       
  6144             
       
  6145             ERROR;
       
  6146         }
       
  6147         
       
  6148     }/*function_udint_to_dint*/
       
  6149     break;
       
  6150 
       
  6151 /****
       
  6152  *UDINT_TO_DATE
       
  6153  */
       
  6154     case function_udint_to_date :
       
  6155     {
       
  6156         symbol_c *last_type_symbol = NULL;
       
  6157 
       
  6158         {
       
  6159             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6161             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6162             symbol_c *IN_type_symbol = NULL;
       
  6163             
       
  6164             /* Get the value from a foo(<param_value>) style call */
       
  6165             if (IN_param_value == NULL)
       
  6166               IN_param_value = function_call_param_iterator.next_nf();
       
  6167             if (IN_param_value != NULL) {
       
  6168               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6169               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6170             }
       
  6171             
       
  6172             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6173             {
       
  6174         
       
  6175                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6176                 
       
  6177                 if (IN_type_symbol == NULL)
       
  6178                   IN_type_symbol = last_type_symbol;
       
  6179                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6181                 function_type_prefix = return_type_symbol;
       
  6182                 break;
       
  6183                 
       
  6184             }
       
  6185             
       
  6186             
       
  6187             ERROR;
       
  6188         }
       
  6189         
       
  6190     }/*function_udint_to_date*/
       
  6191     break;
       
  6192 
       
  6193 /****
       
  6194  *UDINT_TO_DWORD
       
  6195  */
       
  6196     case function_udint_to_dword :
       
  6197     {
       
  6198         symbol_c *last_type_symbol = NULL;
       
  6199 
       
  6200         {
       
  6201             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6202             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6203             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6204             symbol_c *IN_type_symbol = NULL;
       
  6205             
       
  6206             /* Get the value from a foo(<param_value>) style call */
       
  6207             if (IN_param_value == NULL)
       
  6208               IN_param_value = function_call_param_iterator.next_nf();
       
  6209             if (IN_param_value != NULL) {
       
  6210               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6211               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6212             }
       
  6213             
       
  6214             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6215             {
       
  6216         
       
  6217                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6218                 
       
  6219                 if (IN_type_symbol == NULL)
       
  6220                   IN_type_symbol = last_type_symbol;
       
  6221                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6222                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6223                 function_type_prefix = return_type_symbol;
       
  6224                 function_type_suffix = IN_type_symbol;
       
  6225                 break;
       
  6226                 
       
  6227             }
       
  6228             
       
  6229             
       
  6230             ERROR;
       
  6231         }
       
  6232         
       
  6233     }/*function_udint_to_dword*/
       
  6234     break;
       
  6235 
       
  6236 /****
       
  6237  *UDINT_TO_DT
       
  6238  */
       
  6239     case function_udint_to_dt :
       
  6240     {
       
  6241         symbol_c *last_type_symbol = NULL;
       
  6242 
       
  6243         {
       
  6244             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6245             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6246             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6247             symbol_c *IN_type_symbol = NULL;
       
  6248             
       
  6249             /* Get the value from a foo(<param_value>) style call */
       
  6250             if (IN_param_value == NULL)
       
  6251               IN_param_value = function_call_param_iterator.next_nf();
       
  6252             if (IN_param_value != NULL) {
       
  6253               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6254               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6255             }
       
  6256             
       
  6257             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6258             {
       
  6259         
       
  6260                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6261                 
       
  6262                 if (IN_type_symbol == NULL)
       
  6263                   IN_type_symbol = last_type_symbol;
       
  6264                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6265                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6266                 function_type_prefix = return_type_symbol;
       
  6267                 break;
       
  6268                 
       
  6269             }
       
  6270             
       
  6271             
       
  6272             ERROR;
       
  6273         }
       
  6274         
       
  6275     }/*function_udint_to_dt*/
       
  6276     break;
       
  6277 
       
  6278 /****
       
  6279  *UDINT_TO_TOD
       
  6280  */
       
  6281     case function_udint_to_tod :
       
  6282     {
       
  6283         symbol_c *last_type_symbol = NULL;
       
  6284 
       
  6285         {
       
  6286             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6287             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6288             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6289             symbol_c *IN_type_symbol = NULL;
       
  6290             
       
  6291             /* Get the value from a foo(<param_value>) style call */
       
  6292             if (IN_param_value == NULL)
       
  6293               IN_param_value = function_call_param_iterator.next_nf();
       
  6294             if (IN_param_value != NULL) {
       
  6295               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6296               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6297             }
       
  6298             
       
  6299             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6300             {
       
  6301         
       
  6302                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6303                 
       
  6304                 if (IN_type_symbol == NULL)
       
  6305                   IN_type_symbol = last_type_symbol;
       
  6306                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6307                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6308                 function_type_prefix = return_type_symbol;
       
  6309                 break;
       
  6310                 
       
  6311             }
       
  6312             
       
  6313             
       
  6314             ERROR;
       
  6315         }
       
  6316         
       
  6317     }/*function_udint_to_tod*/
       
  6318     break;
       
  6319 
       
  6320 /****
       
  6321  *UDINT_TO_WORD
       
  6322  */
       
  6323     case function_udint_to_word :
       
  6324     {
       
  6325         symbol_c *last_type_symbol = NULL;
       
  6326 
       
  6327         {
       
  6328             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6329             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6330             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6331             symbol_c *IN_type_symbol = NULL;
       
  6332             
       
  6333             /* Get the value from a foo(<param_value>) style call */
       
  6334             if (IN_param_value == NULL)
       
  6335               IN_param_value = function_call_param_iterator.next_nf();
       
  6336             if (IN_param_value != NULL) {
       
  6337               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6338               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6339             }
       
  6340             
       
  6341             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6342             {
       
  6343         
       
  6344                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6345                 
       
  6346                 if (IN_type_symbol == NULL)
       
  6347                   IN_type_symbol = last_type_symbol;
       
  6348                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6349                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6350                 function_type_prefix = return_type_symbol;
       
  6351                 function_type_suffix = IN_type_symbol;
       
  6352                 break;
       
  6353                 
       
  6354             }
       
  6355             
       
  6356             
       
  6357             ERROR;
       
  6358         }
       
  6359         
       
  6360     }/*function_udint_to_word*/
       
  6361     break;
       
  6362 
       
  6363 /****
       
  6364  *UDINT_TO_STRING
       
  6365  */
       
  6366     case function_udint_to_string :
       
  6367     {
       
  6368         symbol_c *last_type_symbol = NULL;
       
  6369 
       
  6370         {
       
  6371             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6373             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6374             symbol_c *IN_type_symbol = NULL;
       
  6375             
       
  6376             /* Get the value from a foo(<param_value>) style call */
       
  6377             if (IN_param_value == NULL)
       
  6378               IN_param_value = function_call_param_iterator.next_nf();
       
  6379             if (IN_param_value != NULL) {
       
  6380               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6381               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6382             }
       
  6383             
       
  6384             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6385             {
       
  6386         
       
  6387                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  6388                 
       
  6389                 if (IN_type_symbol == NULL)
       
  6390                   IN_type_symbol = last_type_symbol;
       
  6391                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6392                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6393                 function_type_prefix = return_type_symbol;
       
  6394                 break;
       
  6395                 
       
  6396             }
       
  6397             
       
  6398             
       
  6399             ERROR;
       
  6400         }
       
  6401         
       
  6402     }/*function_udint_to_string*/
       
  6403     break;
       
  6404 
       
  6405 /****
       
  6406  *UDINT_TO_LWORD
       
  6407  */
       
  6408     case function_udint_to_lword :
       
  6409     {
       
  6410         symbol_c *last_type_symbol = NULL;
       
  6411 
       
  6412         {
       
  6413             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6414             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6415             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6416             symbol_c *IN_type_symbol = NULL;
       
  6417             
       
  6418             /* Get the value from a foo(<param_value>) style call */
       
  6419             if (IN_param_value == NULL)
       
  6420               IN_param_value = function_call_param_iterator.next_nf();
       
  6421             if (IN_param_value != NULL) {
       
  6422               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6423               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6424             }
       
  6425             
       
  6426             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6427             {
       
  6428         
       
  6429                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6430                 
       
  6431                 if (IN_type_symbol == NULL)
       
  6432                   IN_type_symbol = last_type_symbol;
       
  6433                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6434                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6435                 function_type_prefix = return_type_symbol;
       
  6436                 function_type_suffix = IN_type_symbol;
       
  6437                 break;
       
  6438                 
       
  6439             }
       
  6440             
       
  6441             
       
  6442             ERROR;
       
  6443         }
       
  6444         
       
  6445     }/*function_udint_to_lword*/
       
  6446     break;
       
  6447 
       
  6448 /****
       
  6449  *UDINT_TO_UINT
       
  6450  */
       
  6451     case function_udint_to_uint :
       
  6452     {
       
  6453         symbol_c *last_type_symbol = NULL;
       
  6454 
       
  6455         {
       
  6456             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6457             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6458             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6459             symbol_c *IN_type_symbol = NULL;
       
  6460             
       
  6461             /* Get the value from a foo(<param_value>) style call */
       
  6462             if (IN_param_value == NULL)
       
  6463               IN_param_value = function_call_param_iterator.next_nf();
       
  6464             if (IN_param_value != NULL) {
       
  6465               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6466               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6467             }
       
  6468             
       
  6469             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6470             {
       
  6471         
       
  6472                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6473                 
       
  6474                 if (IN_type_symbol == NULL)
       
  6475                   IN_type_symbol = last_type_symbol;
       
  6476                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6477                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6478                 function_type_prefix = return_type_symbol;
       
  6479                 function_type_suffix = IN_type_symbol;
       
  6480                 break;
       
  6481                 
       
  6482             }
       
  6483             
       
  6484             
       
  6485             ERROR;
       
  6486         }
       
  6487         
       
  6488     }/*function_udint_to_uint*/
       
  6489     break;
       
  6490 
       
  6491 /****
       
  6492  *UDINT_TO_LREAL
       
  6493  */
       
  6494     case function_udint_to_lreal :
       
  6495     {
       
  6496         symbol_c *last_type_symbol = NULL;
       
  6497 
       
  6498         {
       
  6499             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6500             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6501             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6502             symbol_c *IN_type_symbol = NULL;
       
  6503             
       
  6504             /* Get the value from a foo(<param_value>) style call */
       
  6505             if (IN_param_value == NULL)
       
  6506               IN_param_value = function_call_param_iterator.next_nf();
       
  6507             if (IN_param_value != NULL) {
       
  6508               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6509               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6510             }
       
  6511             
       
  6512             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6513             {
       
  6514         
       
  6515                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6516                 
       
  6517                 if (IN_type_symbol == NULL)
       
  6518                   IN_type_symbol = last_type_symbol;
       
  6519                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6520                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6521                 function_type_prefix = return_type_symbol;
       
  6522                 function_type_suffix = IN_type_symbol;
       
  6523                 break;
       
  6524                 
       
  6525             }
       
  6526             
       
  6527             
       
  6528             ERROR;
       
  6529         }
       
  6530         
       
  6531     }/*function_udint_to_lreal*/
       
  6532     break;
       
  6533 
       
  6534 /****
       
  6535  *UDINT_TO_BYTE
       
  6536  */
       
  6537     case function_udint_to_byte :
       
  6538     {
       
  6539         symbol_c *last_type_symbol = NULL;
       
  6540 
       
  6541         {
       
  6542             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6543             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6544             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6545             symbol_c *IN_type_symbol = NULL;
       
  6546             
       
  6547             /* Get the value from a foo(<param_value>) style call */
       
  6548             if (IN_param_value == NULL)
       
  6549               IN_param_value = function_call_param_iterator.next_nf();
       
  6550             if (IN_param_value != NULL) {
       
  6551               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6552               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6553             }
       
  6554             
       
  6555             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6556             {
       
  6557         
       
  6558                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6559                 
       
  6560                 if (IN_type_symbol == NULL)
       
  6561                   IN_type_symbol = last_type_symbol;
       
  6562                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6563                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6564                 function_type_prefix = return_type_symbol;
       
  6565                 function_type_suffix = IN_type_symbol;
       
  6566                 break;
       
  6567                 
       
  6568             }
       
  6569             
       
  6570             
       
  6571             ERROR;
       
  6572         }
       
  6573         
       
  6574     }/*function_udint_to_byte*/
       
  6575     break;
       
  6576 
       
  6577 /****
       
  6578  *UDINT_TO_USINT
       
  6579  */
       
  6580     case function_udint_to_usint :
       
  6581     {
       
  6582         symbol_c *last_type_symbol = NULL;
       
  6583 
       
  6584         {
       
  6585             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6586             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6587             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6588             symbol_c *IN_type_symbol = NULL;
       
  6589             
       
  6590             /* Get the value from a foo(<param_value>) style call */
       
  6591             if (IN_param_value == NULL)
       
  6592               IN_param_value = function_call_param_iterator.next_nf();
       
  6593             if (IN_param_value != NULL) {
       
  6594               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6595               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6596             }
       
  6597             
       
  6598             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6599             {
       
  6600         
       
  6601                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6602                 
       
  6603                 if (IN_type_symbol == NULL)
       
  6604                   IN_type_symbol = last_type_symbol;
       
  6605                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6606                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6607                 function_type_prefix = return_type_symbol;
       
  6608                 function_type_suffix = IN_type_symbol;
       
  6609                 break;
       
  6610                 
       
  6611             }
       
  6612             
       
  6613             
       
  6614             ERROR;
       
  6615         }
       
  6616         
       
  6617     }/*function_udint_to_usint*/
       
  6618     break;
       
  6619 
       
  6620 /****
       
  6621  *UDINT_TO_ULINT
       
  6622  */
       
  6623     case function_udint_to_ulint :
       
  6624     {
       
  6625         symbol_c *last_type_symbol = NULL;
       
  6626 
       
  6627         {
       
  6628             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6629             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6630             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6631             symbol_c *IN_type_symbol = NULL;
       
  6632             
       
  6633             /* Get the value from a foo(<param_value>) style call */
       
  6634             if (IN_param_value == NULL)
       
  6635               IN_param_value = function_call_param_iterator.next_nf();
       
  6636             if (IN_param_value != NULL) {
       
  6637               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6638               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6639             }
       
  6640             
       
  6641             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6642             {
       
  6643         
       
  6644                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6645                 
       
  6646                 if (IN_type_symbol == NULL)
       
  6647                   IN_type_symbol = last_type_symbol;
       
  6648                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6649                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6650                 function_type_prefix = return_type_symbol;
       
  6651                 function_type_suffix = IN_type_symbol;
       
  6652                 break;
       
  6653                 
       
  6654             }
       
  6655             
       
  6656             
       
  6657             ERROR;
       
  6658         }
       
  6659         
       
  6660     }/*function_udint_to_ulint*/
       
  6661     break;
       
  6662 
       
  6663 /****
       
  6664  *UDINT_TO_BOOL
       
  6665  */
       
  6666     case function_udint_to_bool :
       
  6667     {
       
  6668         symbol_c *last_type_symbol = NULL;
       
  6669 
       
  6670         {
       
  6671             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6673             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6674             symbol_c *IN_type_symbol = NULL;
       
  6675             
       
  6676             /* Get the value from a foo(<param_value>) style call */
       
  6677             if (IN_param_value == NULL)
       
  6678               IN_param_value = function_call_param_iterator.next_nf();
       
  6679             if (IN_param_value != NULL) {
       
  6680               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6681               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6682             }
       
  6683             
       
  6684             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6685             {
       
  6686         
       
  6687                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6688                 
       
  6689                 if (IN_type_symbol == NULL)
       
  6690                   IN_type_symbol = last_type_symbol;
       
  6691                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6693                 function_type_prefix = return_type_symbol;
       
  6694                 function_type_suffix = IN_type_symbol;
       
  6695                 break;
       
  6696                 
       
  6697             }
       
  6698             
       
  6699             
       
  6700             ERROR;
       
  6701         }
       
  6702         
       
  6703     }/*function_udint_to_bool*/
       
  6704     break;
       
  6705 
       
  6706 /****
       
  6707  *UDINT_TO_TIME
       
  6708  */
       
  6709     case function_udint_to_time :
       
  6710     {
       
  6711         symbol_c *last_type_symbol = NULL;
       
  6712 
       
  6713         {
       
  6714             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6716             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6717             symbol_c *IN_type_symbol = NULL;
       
  6718             
       
  6719             /* Get the value from a foo(<param_value>) style call */
       
  6720             if (IN_param_value == NULL)
       
  6721               IN_param_value = function_call_param_iterator.next_nf();
       
  6722             if (IN_param_value != NULL) {
       
  6723               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6724               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6725             }
       
  6726             
       
  6727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6728             {
       
  6729         
       
  6730                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6731                 
       
  6732                 if (IN_type_symbol == NULL)
       
  6733                   IN_type_symbol = last_type_symbol;
       
  6734                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6735                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6736                 function_type_prefix = return_type_symbol;
       
  6737                 break;
       
  6738                 
       
  6739             }
       
  6740             
       
  6741             
       
  6742             ERROR;
       
  6743         }
       
  6744         
       
  6745     }/*function_udint_to_time*/
       
  6746     break;
       
  6747 
       
  6748 /****
       
  6749  *UDINT_TO_INT
       
  6750  */
       
  6751     case function_udint_to_int :
       
  6752     {
       
  6753         symbol_c *last_type_symbol = NULL;
       
  6754 
       
  6755         {
       
  6756             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6758             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6759             symbol_c *IN_type_symbol = NULL;
       
  6760             
       
  6761             /* Get the value from a foo(<param_value>) style call */
       
  6762             if (IN_param_value == NULL)
       
  6763               IN_param_value = function_call_param_iterator.next_nf();
       
  6764             if (IN_param_value != NULL) {
       
  6765               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6766               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6767             }
       
  6768             
       
  6769             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  6770             {
       
  6771         
       
  6772                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6773                 
       
  6774                 if (IN_type_symbol == NULL)
       
  6775                   IN_type_symbol = last_type_symbol;
       
  6776                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6777                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6778                 function_type_prefix = return_type_symbol;
       
  6779                 function_type_suffix = IN_type_symbol;
       
  6780                 break;
       
  6781                 
       
  6782             }
       
  6783             
       
  6784             
       
  6785             ERROR;
       
  6786         }
       
  6787         
       
  6788     }/*function_udint_to_int*/
       
  6789     break;
       
  6790 
       
  6791 /****
       
  6792  *WORD_TO_REAL
       
  6793  */
       
  6794     case function_word_to_real :
       
  6795     {
       
  6796         symbol_c *last_type_symbol = NULL;
       
  6797 
       
  6798         {
       
  6799             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6801             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6802             symbol_c *IN_type_symbol = NULL;
       
  6803             
       
  6804             /* Get the value from a foo(<param_value>) style call */
       
  6805             if (IN_param_value == NULL)
       
  6806               IN_param_value = function_call_param_iterator.next_nf();
       
  6807             if (IN_param_value != NULL) {
       
  6808               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6809               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6810             }
       
  6811             
       
  6812             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6813             {
       
  6814         
       
  6815                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6816                 
       
  6817                 if (IN_type_symbol == NULL)
       
  6818                   IN_type_symbol = last_type_symbol;
       
  6819                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6821                 function_type_prefix = return_type_symbol;
       
  6822                 function_type_suffix = IN_type_symbol;
       
  6823                 break;
       
  6824                 
       
  6825             }
       
  6826             
       
  6827             
       
  6828             ERROR;
       
  6829         }
       
  6830         
       
  6831     }/*function_word_to_real*/
       
  6832     break;
       
  6833 
       
  6834 /****
       
  6835  *WORD_TO_SINT
       
  6836  */
       
  6837     case function_word_to_sint :
       
  6838     {
       
  6839         symbol_c *last_type_symbol = NULL;
       
  6840 
       
  6841         {
       
  6842             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6843             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6844             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6845             symbol_c *IN_type_symbol = NULL;
       
  6846             
       
  6847             /* Get the value from a foo(<param_value>) style call */
       
  6848             if (IN_param_value == NULL)
       
  6849               IN_param_value = function_call_param_iterator.next_nf();
       
  6850             if (IN_param_value != NULL) {
       
  6851               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6852               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6853             }
       
  6854             
       
  6855             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6856             {
       
  6857         
       
  6858                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6859                 
       
  6860                 if (IN_type_symbol == NULL)
       
  6861                   IN_type_symbol = last_type_symbol;
       
  6862                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6863                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6864                 function_type_prefix = return_type_symbol;
       
  6865                 function_type_suffix = IN_type_symbol;
       
  6866                 break;
       
  6867                 
       
  6868             }
       
  6869             
       
  6870             
       
  6871             ERROR;
       
  6872         }
       
  6873         
       
  6874     }/*function_word_to_sint*/
       
  6875     break;
       
  6876 
       
  6877 /****
       
  6878  *WORD_TO_LINT
       
  6879  */
       
  6880     case function_word_to_lint :
       
  6881     {
       
  6882         symbol_c *last_type_symbol = NULL;
       
  6883 
       
  6884         {
       
  6885             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6886             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6887             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6888             symbol_c *IN_type_symbol = NULL;
       
  6889             
       
  6890             /* Get the value from a foo(<param_value>) style call */
       
  6891             if (IN_param_value == NULL)
       
  6892               IN_param_value = function_call_param_iterator.next_nf();
       
  6893             if (IN_param_value != NULL) {
       
  6894               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6895               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6896             }
       
  6897             
       
  6898             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6899             {
       
  6900         
       
  6901                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6902                 
       
  6903                 if (IN_type_symbol == NULL)
       
  6904                   IN_type_symbol = last_type_symbol;
       
  6905                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6906                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6907                 function_type_prefix = return_type_symbol;
       
  6908                 function_type_suffix = IN_type_symbol;
       
  6909                 break;
       
  6910                 
       
  6911             }
       
  6912             
       
  6913             
       
  6914             ERROR;
       
  6915         }
       
  6916         
       
  6917     }/*function_word_to_lint*/
       
  6918     break;
       
  6919 
       
  6920 /****
       
  6921  *WORD_TO_DINT
       
  6922  */
       
  6923     case function_word_to_dint :
       
  6924     {
       
  6925         symbol_c *last_type_symbol = NULL;
       
  6926 
       
  6927         {
       
  6928             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6929             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6930             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6931             symbol_c *IN_type_symbol = NULL;
       
  6932             
       
  6933             /* Get the value from a foo(<param_value>) style call */
       
  6934             if (IN_param_value == NULL)
       
  6935               IN_param_value = function_call_param_iterator.next_nf();
       
  6936             if (IN_param_value != NULL) {
       
  6937               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6938               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6939             }
       
  6940             
       
  6941             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6942             {
       
  6943         
       
  6944                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  6945                 
       
  6946                 if (IN_type_symbol == NULL)
       
  6947                   IN_type_symbol = last_type_symbol;
       
  6948                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6949                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6950                 function_type_prefix = return_type_symbol;
       
  6951                 function_type_suffix = IN_type_symbol;
       
  6952                 break;
       
  6953                 
       
  6954             }
       
  6955             
       
  6956             
       
  6957             ERROR;
       
  6958         }
       
  6959         
       
  6960     }/*function_word_to_dint*/
       
  6961     break;
       
  6962 
       
  6963 /****
       
  6964  *WORD_TO_DATE
       
  6965  */
       
  6966     case function_word_to_date :
       
  6967     {
       
  6968         symbol_c *last_type_symbol = NULL;
       
  6969 
       
  6970         {
       
  6971             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  6972             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6973             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  6974             symbol_c *IN_type_symbol = NULL;
       
  6975             
       
  6976             /* Get the value from a foo(<param_value>) style call */
       
  6977             if (IN_param_value == NULL)
       
  6978               IN_param_value = function_call_param_iterator.next_nf();
       
  6979             if (IN_param_value != NULL) {
       
  6980               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6981               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6982             }
       
  6983             
       
  6984             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6985             {
       
  6986         
       
  6987                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  6988                 
       
  6989                 if (IN_type_symbol == NULL)
       
  6990                   IN_type_symbol = last_type_symbol;
       
  6991                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  6992                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6993                 function_type_prefix = return_type_symbol;
       
  6994                 break;
       
  6995                 
       
  6996             }
       
  6997             
       
  6998             
       
  6999             ERROR;
       
  7000         }
       
  7001         
       
  7002     }/*function_word_to_date*/
       
  7003     break;
       
  7004 
       
  7005 /****
       
  7006  *WORD_TO_DWORD
       
  7007  */
       
  7008     case function_word_to_dword :
       
  7009     {
       
  7010         symbol_c *last_type_symbol = NULL;
       
  7011 
       
  7012         {
       
  7013             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7014             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7015             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7016             symbol_c *IN_type_symbol = NULL;
       
  7017             
       
  7018             /* Get the value from a foo(<param_value>) style call */
       
  7019             if (IN_param_value == NULL)
       
  7020               IN_param_value = function_call_param_iterator.next_nf();
       
  7021             if (IN_param_value != NULL) {
       
  7022               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7023               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7024             }
       
  7025             
       
  7026             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7027             {
       
  7028         
       
  7029                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7030                 
       
  7031                 if (IN_type_symbol == NULL)
       
  7032                   IN_type_symbol = last_type_symbol;
       
  7033                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7034                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7035                 function_type_prefix = return_type_symbol;
       
  7036                 function_type_suffix = IN_type_symbol;
       
  7037                 break;
       
  7038                 
       
  7039             }
       
  7040             
       
  7041             
       
  7042             ERROR;
       
  7043         }
       
  7044         
       
  7045     }/*function_word_to_dword*/
       
  7046     break;
       
  7047 
       
  7048 /****
       
  7049  *WORD_TO_DT
       
  7050  */
       
  7051     case function_word_to_dt :
       
  7052     {
       
  7053         symbol_c *last_type_symbol = NULL;
       
  7054 
       
  7055         {
       
  7056             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7057             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7058             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7059             symbol_c *IN_type_symbol = NULL;
       
  7060             
       
  7061             /* Get the value from a foo(<param_value>) style call */
       
  7062             if (IN_param_value == NULL)
       
  7063               IN_param_value = function_call_param_iterator.next_nf();
       
  7064             if (IN_param_value != NULL) {
       
  7065               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7066               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7067             }
       
  7068             
       
  7069             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7070             {
       
  7071         
       
  7072                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7073                 
       
  7074                 if (IN_type_symbol == NULL)
       
  7075                   IN_type_symbol = last_type_symbol;
       
  7076                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7077                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7078                 function_type_prefix = return_type_symbol;
       
  7079                 break;
       
  7080                 
       
  7081             }
       
  7082             
       
  7083             
       
  7084             ERROR;
       
  7085         }
       
  7086         
       
  7087     }/*function_word_to_dt*/
       
  7088     break;
       
  7089 
       
  7090 /****
       
  7091  *WORD_TO_TOD
       
  7092  */
       
  7093     case function_word_to_tod :
       
  7094     {
       
  7095         symbol_c *last_type_symbol = NULL;
       
  7096 
       
  7097         {
       
  7098             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7099             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7100             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7101             symbol_c *IN_type_symbol = NULL;
       
  7102             
       
  7103             /* Get the value from a foo(<param_value>) style call */
       
  7104             if (IN_param_value == NULL)
       
  7105               IN_param_value = function_call_param_iterator.next_nf();
       
  7106             if (IN_param_value != NULL) {
       
  7107               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7108               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7109             }
       
  7110             
       
  7111             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7112             {
       
  7113         
       
  7114                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7115                 
       
  7116                 if (IN_type_symbol == NULL)
       
  7117                   IN_type_symbol = last_type_symbol;
       
  7118                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7119                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7120                 function_type_prefix = return_type_symbol;
       
  7121                 break;
       
  7122                 
       
  7123             }
       
  7124             
       
  7125             
       
  7126             ERROR;
       
  7127         }
       
  7128         
       
  7129     }/*function_word_to_tod*/
       
  7130     break;
       
  7131 
       
  7132 /****
       
  7133  *WORD_TO_UDINT
       
  7134  */
       
  7135     case function_word_to_udint :
       
  7136     {
       
  7137         symbol_c *last_type_symbol = NULL;
       
  7138 
       
  7139         {
       
  7140             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7141             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7142             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7143             symbol_c *IN_type_symbol = NULL;
       
  7144             
       
  7145             /* Get the value from a foo(<param_value>) style call */
       
  7146             if (IN_param_value == NULL)
       
  7147               IN_param_value = function_call_param_iterator.next_nf();
       
  7148             if (IN_param_value != NULL) {
       
  7149               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7150               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7151             }
       
  7152             
       
  7153             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7154             {
       
  7155         
       
  7156                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7157                 
       
  7158                 if (IN_type_symbol == NULL)
       
  7159                   IN_type_symbol = last_type_symbol;
       
  7160                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7161                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7162                 function_type_prefix = return_type_symbol;
       
  7163                 function_type_suffix = IN_type_symbol;
       
  7164                 break;
       
  7165                 
       
  7166             }
       
  7167             
       
  7168             
       
  7169             ERROR;
       
  7170         }
       
  7171         
       
  7172     }/*function_word_to_udint*/
       
  7173     break;
       
  7174 
       
  7175 /****
       
  7176  *WORD_TO_STRING
       
  7177  */
       
  7178     case function_word_to_string :
       
  7179     {
       
  7180         symbol_c *last_type_symbol = NULL;
       
  7181 
       
  7182         {
       
  7183             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7185             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7186             symbol_c *IN_type_symbol = NULL;
       
  7187             
       
  7188             /* Get the value from a foo(<param_value>) style call */
       
  7189             if (IN_param_value == NULL)
       
  7190               IN_param_value = function_call_param_iterator.next_nf();
       
  7191             if (IN_param_value != NULL) {
       
  7192               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7193               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7194             }
       
  7195             
       
  7196             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7197             {
       
  7198         
       
  7199                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  7200                 
       
  7201                 if (IN_type_symbol == NULL)
       
  7202                   IN_type_symbol = last_type_symbol;
       
  7203                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7205                 function_type_prefix = return_type_symbol;
       
  7206                 break;
       
  7207                 
       
  7208             }
       
  7209             
       
  7210             
       
  7211             ERROR;
       
  7212         }
       
  7213         
       
  7214     }/*function_word_to_string*/
       
  7215     break;
       
  7216 
       
  7217 /****
       
  7218  *WORD_TO_LWORD
       
  7219  */
       
  7220     case function_word_to_lword :
       
  7221     {
       
  7222         symbol_c *last_type_symbol = NULL;
       
  7223 
       
  7224         {
       
  7225             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7226             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7227             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7228             symbol_c *IN_type_symbol = NULL;
       
  7229             
       
  7230             /* Get the value from a foo(<param_value>) style call */
       
  7231             if (IN_param_value == NULL)
       
  7232               IN_param_value = function_call_param_iterator.next_nf();
       
  7233             if (IN_param_value != NULL) {
       
  7234               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7235               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7236             }
       
  7237             
       
  7238             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7239             {
       
  7240         
       
  7241                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7242                 
       
  7243                 if (IN_type_symbol == NULL)
       
  7244                   IN_type_symbol = last_type_symbol;
       
  7245                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7246                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7247                 function_type_prefix = return_type_symbol;
       
  7248                 function_type_suffix = IN_type_symbol;
       
  7249                 break;
       
  7250                 
       
  7251             }
       
  7252             
       
  7253             
       
  7254             ERROR;
       
  7255         }
       
  7256         
       
  7257     }/*function_word_to_lword*/
       
  7258     break;
       
  7259 
       
  7260 /****
       
  7261  *WORD_TO_UINT
       
  7262  */
       
  7263     case function_word_to_uint :
       
  7264     {
       
  7265         symbol_c *last_type_symbol = NULL;
       
  7266 
       
  7267         {
       
  7268             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7269             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7270             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7271             symbol_c *IN_type_symbol = NULL;
       
  7272             
       
  7273             /* Get the value from a foo(<param_value>) style call */
       
  7274             if (IN_param_value == NULL)
       
  7275               IN_param_value = function_call_param_iterator.next_nf();
       
  7276             if (IN_param_value != NULL) {
       
  7277               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7278               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7279             }
       
  7280             
       
  7281             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7282             {
       
  7283         
       
  7284                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7285                 
       
  7286                 if (IN_type_symbol == NULL)
       
  7287                   IN_type_symbol = last_type_symbol;
       
  7288                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7289                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7290                 function_type_prefix = return_type_symbol;
       
  7291                 function_type_suffix = IN_type_symbol;
       
  7292                 break;
       
  7293                 
       
  7294             }
       
  7295             
       
  7296             
       
  7297             ERROR;
       
  7298         }
       
  7299         
       
  7300     }/*function_word_to_uint*/
       
  7301     break;
       
  7302 
       
  7303 /****
       
  7304  *WORD_TO_LREAL
       
  7305  */
       
  7306     case function_word_to_lreal :
       
  7307     {
       
  7308         symbol_c *last_type_symbol = NULL;
       
  7309 
       
  7310         {
       
  7311             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7313             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7314             symbol_c *IN_type_symbol = NULL;
       
  7315             
       
  7316             /* Get the value from a foo(<param_value>) style call */
       
  7317             if (IN_param_value == NULL)
       
  7318               IN_param_value = function_call_param_iterator.next_nf();
       
  7319             if (IN_param_value != NULL) {
       
  7320               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7321               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7322             }
       
  7323             
       
  7324             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7325             {
       
  7326         
       
  7327                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7328                 
       
  7329                 if (IN_type_symbol == NULL)
       
  7330                   IN_type_symbol = last_type_symbol;
       
  7331                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7333                 function_type_prefix = return_type_symbol;
       
  7334                 function_type_suffix = IN_type_symbol;
       
  7335                 break;
       
  7336                 
       
  7337             }
       
  7338             
       
  7339             
       
  7340             ERROR;
       
  7341         }
       
  7342         
       
  7343     }/*function_word_to_lreal*/
       
  7344     break;
       
  7345 
       
  7346 /****
       
  7347  *WORD_TO_BYTE
       
  7348  */
       
  7349     case function_word_to_byte :
       
  7350     {
       
  7351         symbol_c *last_type_symbol = NULL;
       
  7352 
       
  7353         {
       
  7354             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7355             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7356             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7357             symbol_c *IN_type_symbol = NULL;
       
  7358             
       
  7359             /* Get the value from a foo(<param_value>) style call */
       
  7360             if (IN_param_value == NULL)
       
  7361               IN_param_value = function_call_param_iterator.next_nf();
       
  7362             if (IN_param_value != NULL) {
       
  7363               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7364               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7365             }
       
  7366             
       
  7367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7368             {
       
  7369         
       
  7370                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7371                 
       
  7372                 if (IN_type_symbol == NULL)
       
  7373                   IN_type_symbol = last_type_symbol;
       
  7374                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7375                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7376                 function_type_prefix = return_type_symbol;
       
  7377                 function_type_suffix = IN_type_symbol;
       
  7378                 break;
       
  7379                 
       
  7380             }
       
  7381             
       
  7382             
       
  7383             ERROR;
       
  7384         }
       
  7385         
       
  7386     }/*function_word_to_byte*/
       
  7387     break;
       
  7388 
       
  7389 /****
       
  7390  *WORD_TO_USINT
       
  7391  */
       
  7392     case function_word_to_usint :
       
  7393     {
       
  7394         symbol_c *last_type_symbol = NULL;
       
  7395 
       
  7396         {
       
  7397             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7398             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7399             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7400             symbol_c *IN_type_symbol = NULL;
       
  7401             
       
  7402             /* Get the value from a foo(<param_value>) style call */
       
  7403             if (IN_param_value == NULL)
       
  7404               IN_param_value = function_call_param_iterator.next_nf();
       
  7405             if (IN_param_value != NULL) {
       
  7406               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7407               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7408             }
       
  7409             
       
  7410             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7411             {
       
  7412         
       
  7413                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7414                 
       
  7415                 if (IN_type_symbol == NULL)
       
  7416                   IN_type_symbol = last_type_symbol;
       
  7417                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7418                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7419                 function_type_prefix = return_type_symbol;
       
  7420                 function_type_suffix = IN_type_symbol;
       
  7421                 break;
       
  7422                 
       
  7423             }
       
  7424             
       
  7425             
       
  7426             ERROR;
       
  7427         }
       
  7428         
       
  7429     }/*function_word_to_usint*/
       
  7430     break;
       
  7431 
       
  7432 /****
       
  7433  *WORD_TO_ULINT
       
  7434  */
       
  7435     case function_word_to_ulint :
       
  7436     {
       
  7437         symbol_c *last_type_symbol = NULL;
       
  7438 
       
  7439         {
       
  7440             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7442             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7443             symbol_c *IN_type_symbol = NULL;
       
  7444             
       
  7445             /* Get the value from a foo(<param_value>) style call */
       
  7446             if (IN_param_value == NULL)
       
  7447               IN_param_value = function_call_param_iterator.next_nf();
       
  7448             if (IN_param_value != NULL) {
       
  7449               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7450               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7451             }
       
  7452             
       
  7453             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7454             {
       
  7455         
       
  7456                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7457                 
       
  7458                 if (IN_type_symbol == NULL)
       
  7459                   IN_type_symbol = last_type_symbol;
       
  7460                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7461                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7462                 function_type_prefix = return_type_symbol;
       
  7463                 function_type_suffix = IN_type_symbol;
       
  7464                 break;
       
  7465                 
       
  7466             }
       
  7467             
       
  7468             
       
  7469             ERROR;
       
  7470         }
       
  7471         
       
  7472     }/*function_word_to_ulint*/
       
  7473     break;
       
  7474 
       
  7475 /****
       
  7476  *WORD_TO_BOOL
       
  7477  */
       
  7478     case function_word_to_bool :
       
  7479     {
       
  7480         symbol_c *last_type_symbol = NULL;
       
  7481 
       
  7482         {
       
  7483             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7485             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7486             symbol_c *IN_type_symbol = NULL;
       
  7487             
       
  7488             /* Get the value from a foo(<param_value>) style call */
       
  7489             if (IN_param_value == NULL)
       
  7490               IN_param_value = function_call_param_iterator.next_nf();
       
  7491             if (IN_param_value != NULL) {
       
  7492               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7493               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7494             }
       
  7495             
       
  7496             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7497             {
       
  7498         
       
  7499                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7500                 
       
  7501                 if (IN_type_symbol == NULL)
       
  7502                   IN_type_symbol = last_type_symbol;
       
  7503                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7504                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7505                 function_type_prefix = return_type_symbol;
       
  7506                 function_type_suffix = IN_type_symbol;
       
  7507                 break;
       
  7508                 
       
  7509             }
       
  7510             
       
  7511             
       
  7512             ERROR;
       
  7513         }
       
  7514         
       
  7515     }/*function_word_to_bool*/
       
  7516     break;
       
  7517 
       
  7518 /****
       
  7519  *WORD_TO_TIME
       
  7520  */
       
  7521     case function_word_to_time :
       
  7522     {
       
  7523         symbol_c *last_type_symbol = NULL;
       
  7524 
       
  7525         {
       
  7526             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7527             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7528             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7529             symbol_c *IN_type_symbol = NULL;
       
  7530             
       
  7531             /* Get the value from a foo(<param_value>) style call */
       
  7532             if (IN_param_value == NULL)
       
  7533               IN_param_value = function_call_param_iterator.next_nf();
       
  7534             if (IN_param_value != NULL) {
       
  7535               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7536               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7537             }
       
  7538             
       
  7539             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7540             {
       
  7541         
       
  7542                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  7543                 
       
  7544                 if (IN_type_symbol == NULL)
       
  7545                   IN_type_symbol = last_type_symbol;
       
  7546                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7547                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7548                 function_type_prefix = return_type_symbol;
       
  7549                 break;
       
  7550                 
       
  7551             }
       
  7552             
       
  7553             
       
  7554             ERROR;
       
  7555         }
       
  7556         
       
  7557     }/*function_word_to_time*/
       
  7558     break;
       
  7559 
       
  7560 /****
       
  7561  *WORD_TO_INT
       
  7562  */
       
  7563     case function_word_to_int :
       
  7564     {
       
  7565         symbol_c *last_type_symbol = NULL;
       
  7566 
       
  7567         {
       
  7568             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7569             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7570             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7571             symbol_c *IN_type_symbol = NULL;
       
  7572             
       
  7573             /* Get the value from a foo(<param_value>) style call */
       
  7574             if (IN_param_value == NULL)
       
  7575               IN_param_value = function_call_param_iterator.next_nf();
       
  7576             if (IN_param_value != NULL) {
       
  7577               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7578               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7579             }
       
  7580             
       
  7581             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  7582             {
       
  7583         
       
  7584                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  7585                 
       
  7586                 if (IN_type_symbol == NULL)
       
  7587                   IN_type_symbol = last_type_symbol;
       
  7588                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7589                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7590                 function_type_prefix = return_type_symbol;
       
  7591                 function_type_suffix = IN_type_symbol;
       
  7592                 break;
       
  7593                 
       
  7594             }
       
  7595             
       
  7596             
       
  7597             ERROR;
       
  7598         }
       
  7599         
       
  7600     }/*function_word_to_int*/
       
  7601     break;
       
  7602 
       
  7603 /****
       
  7604  *STRING_TO_REAL
       
  7605  */
       
  7606     case function_string_to_real :
       
  7607     {
       
  7608         symbol_c *last_type_symbol = NULL;
       
  7609 
       
  7610         {
       
  7611             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7612             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7613             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7614             symbol_c *IN_type_symbol = NULL;
       
  7615             
       
  7616             /* Get the value from a foo(<param_value>) style call */
       
  7617             if (IN_param_value == NULL)
       
  7618               IN_param_value = function_call_param_iterator.next_nf();
       
  7619             if (IN_param_value != NULL) {
       
  7620               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7621               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7622             }
       
  7623             
       
  7624             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7625             {
       
  7626         
       
  7627                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  7628                 
       
  7629                 if (IN_type_symbol == NULL)
       
  7630                   IN_type_symbol = last_type_symbol;
       
  7631                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7632                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7633                 function_type_prefix = return_type_symbol;
       
  7634                 break;
       
  7635                 
       
  7636             }
       
  7637             
       
  7638             
       
  7639             ERROR;
       
  7640         }
       
  7641         
       
  7642     }/*function_string_to_real*/
       
  7643     break;
       
  7644 
       
  7645 /****
       
  7646  *STRING_TO_SINT
       
  7647  */
       
  7648     case function_string_to_sint :
       
  7649     {
       
  7650         symbol_c *last_type_symbol = NULL;
       
  7651 
       
  7652         {
       
  7653             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7654             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7655             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7656             symbol_c *IN_type_symbol = NULL;
       
  7657             
       
  7658             /* Get the value from a foo(<param_value>) style call */
       
  7659             if (IN_param_value == NULL)
       
  7660               IN_param_value = function_call_param_iterator.next_nf();
       
  7661             if (IN_param_value != NULL) {
       
  7662               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7663               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7664             }
       
  7665             
       
  7666             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7667             {
       
  7668         
       
  7669                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7670                 
       
  7671                 if (IN_type_symbol == NULL)
       
  7672                   IN_type_symbol = last_type_symbol;
       
  7673                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7674                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7675                 function_type_prefix = return_type_symbol;
       
  7676                 break;
       
  7677                 
       
  7678             }
       
  7679             
       
  7680             
       
  7681             ERROR;
       
  7682         }
       
  7683         
       
  7684     }/*function_string_to_sint*/
       
  7685     break;
       
  7686 
       
  7687 /****
       
  7688  *STRING_TO_LINT
       
  7689  */
       
  7690     case function_string_to_lint :
       
  7691     {
       
  7692         symbol_c *last_type_symbol = NULL;
       
  7693 
       
  7694         {
       
  7695             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7697             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7698             symbol_c *IN_type_symbol = NULL;
       
  7699             
       
  7700             /* Get the value from a foo(<param_value>) style call */
       
  7701             if (IN_param_value == NULL)
       
  7702               IN_param_value = function_call_param_iterator.next_nf();
       
  7703             if (IN_param_value != NULL) {
       
  7704               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7705               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7706             }
       
  7707             
       
  7708             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7709             {
       
  7710         
       
  7711                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7712                 
       
  7713                 if (IN_type_symbol == NULL)
       
  7714                   IN_type_symbol = last_type_symbol;
       
  7715                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7716                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7717                 function_type_prefix = return_type_symbol;
       
  7718                 break;
       
  7719                 
       
  7720             }
       
  7721             
       
  7722             
       
  7723             ERROR;
       
  7724         }
       
  7725         
       
  7726     }/*function_string_to_lint*/
       
  7727     break;
       
  7728 
       
  7729 /****
       
  7730  *STRING_TO_DINT
       
  7731  */
       
  7732     case function_string_to_dint :
       
  7733     {
       
  7734         symbol_c *last_type_symbol = NULL;
       
  7735 
       
  7736         {
       
  7737             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7738             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7739             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7740             symbol_c *IN_type_symbol = NULL;
       
  7741             
       
  7742             /* Get the value from a foo(<param_value>) style call */
       
  7743             if (IN_param_value == NULL)
       
  7744               IN_param_value = function_call_param_iterator.next_nf();
       
  7745             if (IN_param_value != NULL) {
       
  7746               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7747               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7748             }
       
  7749             
       
  7750             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7751             {
       
  7752         
       
  7753                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  7754                 
       
  7755                 if (IN_type_symbol == NULL)
       
  7756                   IN_type_symbol = last_type_symbol;
       
  7757                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7758                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7759                 function_type_prefix = return_type_symbol;
       
  7760                 break;
       
  7761                 
       
  7762             }
       
  7763             
       
  7764             
       
  7765             ERROR;
       
  7766         }
       
  7767         
       
  7768     }/*function_string_to_dint*/
       
  7769     break;
       
  7770 
       
  7771 /****
       
  7772  *STRING_TO_DATE
       
  7773  */
       
  7774     case function_string_to_date :
       
  7775     {
       
  7776         symbol_c *last_type_symbol = NULL;
       
  7777 
       
  7778         {
       
  7779             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7780             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7781             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7782             symbol_c *IN_type_symbol = NULL;
       
  7783             
       
  7784             /* Get the value from a foo(<param_value>) style call */
       
  7785             if (IN_param_value == NULL)
       
  7786               IN_param_value = function_call_param_iterator.next_nf();
       
  7787             if (IN_param_value != NULL) {
       
  7788               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7789               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7790             }
       
  7791             
       
  7792             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7793             {
       
  7794         
       
  7795                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7796                 
       
  7797                 if (IN_type_symbol == NULL)
       
  7798                   IN_type_symbol = last_type_symbol;
       
  7799                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7800                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7801                 function_type_prefix = return_type_symbol;
       
  7802                 break;
       
  7803                 
       
  7804             }
       
  7805             
       
  7806             
       
  7807             ERROR;
       
  7808         }
       
  7809         
       
  7810     }/*function_string_to_date*/
       
  7811     break;
       
  7812 
       
  7813 /****
       
  7814  *STRING_TO_DWORD
       
  7815  */
       
  7816     case function_string_to_dword :
       
  7817     {
       
  7818         symbol_c *last_type_symbol = NULL;
       
  7819 
       
  7820         {
       
  7821             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7822             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7823             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7824             symbol_c *IN_type_symbol = NULL;
       
  7825             
       
  7826             /* Get the value from a foo(<param_value>) style call */
       
  7827             if (IN_param_value == NULL)
       
  7828               IN_param_value = function_call_param_iterator.next_nf();
       
  7829             if (IN_param_value != NULL) {
       
  7830               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7831               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7832             }
       
  7833             
       
  7834             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7835             {
       
  7836         
       
  7837                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  7838                 
       
  7839                 if (IN_type_symbol == NULL)
       
  7840                   IN_type_symbol = last_type_symbol;
       
  7841                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7842                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7843                 function_type_prefix = return_type_symbol;
       
  7844                 break;
       
  7845                 
       
  7846             }
       
  7847             
       
  7848             
       
  7849             ERROR;
       
  7850         }
       
  7851         
       
  7852     }/*function_string_to_dword*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *STRING_TO_DT
       
  7857  */
       
  7858     case function_string_to_dt :
       
  7859     {
       
  7860         symbol_c *last_type_symbol = NULL;
       
  7861 
       
  7862         {
       
  7863             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7865             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7866             symbol_c *IN_type_symbol = NULL;
       
  7867             
       
  7868             /* Get the value from a foo(<param_value>) style call */
       
  7869             if (IN_param_value == NULL)
       
  7870               IN_param_value = function_call_param_iterator.next_nf();
       
  7871             if (IN_param_value != NULL) {
       
  7872               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7873               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7874             }
       
  7875             
       
  7876             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7877             {
       
  7878         
       
  7879                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7880                 
       
  7881                 if (IN_type_symbol == NULL)
       
  7882                   IN_type_symbol = last_type_symbol;
       
  7883                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7884                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7885                 function_type_prefix = return_type_symbol;
       
  7886                 break;
       
  7887                 
       
  7888             }
       
  7889             
       
  7890             
       
  7891             ERROR;
       
  7892         }
       
  7893         
       
  7894     }/*function_string_to_dt*/
       
  7895     break;
       
  7896 
       
  7897 /****
       
  7898  *STRING_TO_TOD
       
  7899  */
       
  7900     case function_string_to_tod :
       
  7901     {
       
  7902         symbol_c *last_type_symbol = NULL;
       
  7903 
       
  7904         {
       
  7905             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7907             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7908             symbol_c *IN_type_symbol = NULL;
       
  7909             
       
  7910             /* Get the value from a foo(<param_value>) style call */
       
  7911             if (IN_param_value == NULL)
       
  7912               IN_param_value = function_call_param_iterator.next_nf();
       
  7913             if (IN_param_value != NULL) {
       
  7914               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7915               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7916             }
       
  7917             
       
  7918             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7919             {
       
  7920         
       
  7921                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  7922                 
       
  7923                 if (IN_type_symbol == NULL)
       
  7924                   IN_type_symbol = last_type_symbol;
       
  7925                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7926                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7927                 function_type_prefix = return_type_symbol;
       
  7928                 break;
       
  7929                 
       
  7930             }
       
  7931             
       
  7932             
       
  7933             ERROR;
       
  7934         }
       
  7935         
       
  7936     }/*function_string_to_tod*/
       
  7937     break;
       
  7938 
       
  7939 /****
       
  7940  *STRING_TO_UDINT
       
  7941  */
       
  7942     case function_string_to_udint :
       
  7943     {
       
  7944         symbol_c *last_type_symbol = NULL;
       
  7945 
       
  7946         {
       
  7947             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7948             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7949             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7950             symbol_c *IN_type_symbol = NULL;
       
  7951             
       
  7952             /* Get the value from a foo(<param_value>) style call */
       
  7953             if (IN_param_value == NULL)
       
  7954               IN_param_value = function_call_param_iterator.next_nf();
       
  7955             if (IN_param_value != NULL) {
       
  7956               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7957               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7958             }
       
  7959             
       
  7960             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7961             {
       
  7962         
       
  7963                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  7964                 
       
  7965                 if (IN_type_symbol == NULL)
       
  7966                   IN_type_symbol = last_type_symbol;
       
  7967                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  7968                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7969                 function_type_prefix = return_type_symbol;
       
  7970                 break;
       
  7971                 
       
  7972             }
       
  7973             
       
  7974             
       
  7975             ERROR;
       
  7976         }
       
  7977         
       
  7978     }/*function_string_to_udint*/
       
  7979     break;
       
  7980 
       
  7981 /****
       
  7982  *STRING_TO_WORD
       
  7983  */
       
  7984     case function_string_to_word :
       
  7985     {
       
  7986         symbol_c *last_type_symbol = NULL;
       
  7987 
       
  7988         {
       
  7989             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  7990             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7991             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  7992             symbol_c *IN_type_symbol = NULL;
       
  7993             
       
  7994             /* Get the value from a foo(<param_value>) style call */
       
  7995             if (IN_param_value == NULL)
       
  7996               IN_param_value = function_call_param_iterator.next_nf();
       
  7997             if (IN_param_value != NULL) {
       
  7998               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7999               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8000             }
       
  8001             
       
  8002             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8003             {
       
  8004         
       
  8005                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8006                 
       
  8007                 if (IN_type_symbol == NULL)
       
  8008                   IN_type_symbol = last_type_symbol;
       
  8009                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8010                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8011                 function_type_prefix = return_type_symbol;
       
  8012                 break;
       
  8013                 
       
  8014             }
       
  8015             
       
  8016             
       
  8017             ERROR;
       
  8018         }
       
  8019         
       
  8020     }/*function_string_to_word*/
       
  8021     break;
       
  8022 
       
  8023 /****
       
  8024  *STRING_TO_LWORD
       
  8025  */
       
  8026     case function_string_to_lword :
       
  8027     {
       
  8028         symbol_c *last_type_symbol = NULL;
       
  8029 
       
  8030         {
       
  8031             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8033             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8034             symbol_c *IN_type_symbol = NULL;
       
  8035             
       
  8036             /* Get the value from a foo(<param_value>) style call */
       
  8037             if (IN_param_value == NULL)
       
  8038               IN_param_value = function_call_param_iterator.next_nf();
       
  8039             if (IN_param_value != NULL) {
       
  8040               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8041               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8042             }
       
  8043             
       
  8044             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8045             {
       
  8046         
       
  8047                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8048                 
       
  8049                 if (IN_type_symbol == NULL)
       
  8050                   IN_type_symbol = last_type_symbol;
       
  8051                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8052                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8053                 function_type_prefix = return_type_symbol;
       
  8054                 break;
       
  8055                 
       
  8056             }
       
  8057             
       
  8058             
       
  8059             ERROR;
       
  8060         }
       
  8061         
       
  8062     }/*function_string_to_lword*/
       
  8063     break;
       
  8064 
       
  8065 /****
       
  8066  *STRING_TO_UINT
       
  8067  */
       
  8068     case function_string_to_uint :
       
  8069     {
       
  8070         symbol_c *last_type_symbol = NULL;
       
  8071 
       
  8072         {
       
  8073             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8074             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8075             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8076             symbol_c *IN_type_symbol = NULL;
       
  8077             
       
  8078             /* Get the value from a foo(<param_value>) style call */
       
  8079             if (IN_param_value == NULL)
       
  8080               IN_param_value = function_call_param_iterator.next_nf();
       
  8081             if (IN_param_value != NULL) {
       
  8082               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8083               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8084             }
       
  8085             
       
  8086             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8087             {
       
  8088         
       
  8089                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8090                 
       
  8091                 if (IN_type_symbol == NULL)
       
  8092                   IN_type_symbol = last_type_symbol;
       
  8093                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8094                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8095                 function_type_prefix = return_type_symbol;
       
  8096                 break;
       
  8097                 
       
  8098             }
       
  8099             
       
  8100             
       
  8101             ERROR;
       
  8102         }
       
  8103         
       
  8104     }/*function_string_to_uint*/
       
  8105     break;
       
  8106 
       
  8107 /****
       
  8108  *STRING_TO_LREAL
       
  8109  */
       
  8110     case function_string_to_lreal :
       
  8111     {
       
  8112         symbol_c *last_type_symbol = NULL;
       
  8113 
       
  8114         {
       
  8115             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8116             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8117             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8118             symbol_c *IN_type_symbol = NULL;
       
  8119             
       
  8120             /* Get the value from a foo(<param_value>) style call */
       
  8121             if (IN_param_value == NULL)
       
  8122               IN_param_value = function_call_param_iterator.next_nf();
       
  8123             if (IN_param_value != NULL) {
       
  8124               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8125               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8126             }
       
  8127             
       
  8128             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8129             {
       
  8130         
       
  8131                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
       
  8132                 
       
  8133                 if (IN_type_symbol == NULL)
       
  8134                   IN_type_symbol = last_type_symbol;
       
  8135                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8136                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8137                 function_type_prefix = return_type_symbol;
       
  8138                 break;
       
  8139                 
       
  8140             }
       
  8141             
       
  8142             
       
  8143             ERROR;
       
  8144         }
       
  8145         
       
  8146     }/*function_string_to_lreal*/
       
  8147     break;
       
  8148 
       
  8149 /****
       
  8150  *STRING_TO_BYTE
       
  8151  */
       
  8152     case function_string_to_byte :
       
  8153     {
       
  8154         symbol_c *last_type_symbol = NULL;
       
  8155 
       
  8156         {
       
  8157             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8158             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8159             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8160             symbol_c *IN_type_symbol = NULL;
       
  8161             
       
  8162             /* Get the value from a foo(<param_value>) style call */
       
  8163             if (IN_param_value == NULL)
       
  8164               IN_param_value = function_call_param_iterator.next_nf();
       
  8165             if (IN_param_value != NULL) {
       
  8166               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8167               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8168             }
       
  8169             
       
  8170             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8171             {
       
  8172         
       
  8173                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
       
  8174                 
       
  8175                 if (IN_type_symbol == NULL)
       
  8176                   IN_type_symbol = last_type_symbol;
       
  8177                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8178                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8179                 function_type_prefix = return_type_symbol;
       
  8180                 break;
       
  8181                 
       
  8182             }
       
  8183             
       
  8184             
       
  8185             ERROR;
       
  8186         }
       
  8187         
       
  8188     }/*function_string_to_byte*/
       
  8189     break;
       
  8190 
       
  8191 /****
       
  8192  *STRING_TO_USINT
       
  8193  */
       
  8194     case function_string_to_usint :
       
  8195     {
       
  8196         symbol_c *last_type_symbol = NULL;
       
  8197 
       
  8198         {
       
  8199             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8201             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8202             symbol_c *IN_type_symbol = NULL;
       
  8203             
       
  8204             /* Get the value from a foo(<param_value>) style call */
       
  8205             if (IN_param_value == NULL)
       
  8206               IN_param_value = function_call_param_iterator.next_nf();
       
  8207             if (IN_param_value != NULL) {
       
  8208               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8209               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8210             }
       
  8211             
       
  8212             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8213             {
       
  8214         
       
  8215                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8216                 
       
  8217                 if (IN_type_symbol == NULL)
       
  8218                   IN_type_symbol = last_type_symbol;
       
  8219                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8220                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8221                 function_type_prefix = return_type_symbol;
       
  8222                 break;
       
  8223                 
       
  8224             }
       
  8225             
       
  8226             
       
  8227             ERROR;
       
  8228         }
       
  8229         
       
  8230     }/*function_string_to_usint*/
       
  8231     break;
       
  8232 
       
  8233 /****
       
  8234  *STRING_TO_ULINT
       
  8235  */
       
  8236     case function_string_to_ulint :
       
  8237     {
       
  8238         symbol_c *last_type_symbol = NULL;
       
  8239 
       
  8240         {
       
  8241             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8242             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8243             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8244             symbol_c *IN_type_symbol = NULL;
       
  8245             
       
  8246             /* Get the value from a foo(<param_value>) style call */
       
  8247             if (IN_param_value == NULL)
       
  8248               IN_param_value = function_call_param_iterator.next_nf();
       
  8249             if (IN_param_value != NULL) {
       
  8250               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8251               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8252             }
       
  8253             
       
  8254             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8255             {
       
  8256         
       
  8257                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
       
  8258                 
       
  8259                 if (IN_type_symbol == NULL)
       
  8260                   IN_type_symbol = last_type_symbol;
       
  8261                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8262                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8263                 function_type_prefix = return_type_symbol;
       
  8264                 break;
       
  8265                 
       
  8266             }
       
  8267             
       
  8268             
       
  8269             ERROR;
       
  8270         }
       
  8271         
       
  8272     }/*function_string_to_ulint*/
       
  8273     break;
       
  8274 
       
  8275 /****
       
  8276  *STRING_TO_BOOL
       
  8277  */
       
  8278     case function_string_to_bool :
       
  8279     {
       
  8280         symbol_c *last_type_symbol = NULL;
       
  8281 
       
  8282         {
       
  8283             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8284             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8285             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8286             symbol_c *IN_type_symbol = NULL;
       
  8287             
       
  8288             /* Get the value from a foo(<param_value>) style call */
       
  8289             if (IN_param_value == NULL)
       
  8290               IN_param_value = function_call_param_iterator.next_nf();
       
  8291             if (IN_param_value != NULL) {
       
  8292               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8293               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8294             }
       
  8295             
       
  8296             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8297             {
       
  8298         
       
  8299                 function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
       
  8300                 
       
  8301                 if (IN_type_symbol == NULL)
       
  8302                   IN_type_symbol = last_type_symbol;
       
  8303                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8304                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8305                 function_type_prefix = return_type_symbol;
       
  8306                 break;
       
  8307                 
       
  8308             }
       
  8309             
       
  8310             
       
  8311             ERROR;
       
  8312         }
       
  8313         
       
  8314     }/*function_string_to_bool*/
       
  8315     break;
       
  8316 
       
  8317 /****
       
  8318  *STRING_TO_TIME
       
  8319  */
       
  8320     case function_string_to_time :
       
  8321     {
       
  8322         symbol_c *last_type_symbol = NULL;
       
  8323 
       
  8324         {
       
  8325             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8326             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8327             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8328             symbol_c *IN_type_symbol = NULL;
       
  8329             
       
  8330             /* Get the value from a foo(<param_value>) style call */
       
  8331             if (IN_param_value == NULL)
       
  8332               IN_param_value = function_call_param_iterator.next_nf();
       
  8333             if (IN_param_value != NULL) {
       
  8334               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8335               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8336             }
       
  8337             
       
  8338             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8339             {
       
  8340         
       
  8341                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
       
  8342                 
       
  8343                 if (IN_type_symbol == NULL)
       
  8344                   IN_type_symbol = last_type_symbol;
       
  8345                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8346                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8347                 function_type_prefix = return_type_symbol;
       
  8348                 break;
       
  8349                 
       
  8350             }
       
  8351             
       
  8352             
       
  8353             ERROR;
       
  8354         }
       
  8355         
       
  8356     }/*function_string_to_time*/
       
  8357     break;
       
  8358 
       
  8359 /****
       
  8360  *STRING_TO_INT
       
  8361  */
       
  8362     case function_string_to_int :
       
  8363     {
       
  8364         symbol_c *last_type_symbol = NULL;
       
  8365 
       
  8366         {
       
  8367             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8369             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8370             symbol_c *IN_type_symbol = NULL;
       
  8371             
       
  8372             /* Get the value from a foo(<param_value>) style call */
       
  8373             if (IN_param_value == NULL)
       
  8374               IN_param_value = function_call_param_iterator.next_nf();
       
  8375             if (IN_param_value != NULL) {
       
  8376               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8377               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8378             }
       
  8379             
       
  8380             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8381             {
       
  8382         
       
  8383                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
       
  8384                 
       
  8385                 if (IN_type_symbol == NULL)
       
  8386                   IN_type_symbol = last_type_symbol;
       
  8387                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8389                 function_type_prefix = return_type_symbol;
       
  8390                 break;
       
  8391                 
       
  8392             }
       
  8393             
       
  8394             
       
  8395             ERROR;
       
  8396         }
       
  8397         
       
  8398     }/*function_string_to_int*/
       
  8399     break;
       
  8400 
       
  8401 /****
       
  8402  *LWORD_TO_REAL
       
  8403  */
       
  8404     case function_lword_to_real :
       
  8405     {
       
  8406         symbol_c *last_type_symbol = NULL;
       
  8407 
       
  8408         {
       
  8409             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8410             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8411             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8412             symbol_c *IN_type_symbol = NULL;
       
  8413             
       
  8414             /* Get the value from a foo(<param_value>) style call */
       
  8415             if (IN_param_value == NULL)
       
  8416               IN_param_value = function_call_param_iterator.next_nf();
       
  8417             if (IN_param_value != NULL) {
       
  8418               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8419               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8420             }
       
  8421             
       
  8422             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8423             {
       
  8424         
       
  8425                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8426                 
       
  8427                 if (IN_type_symbol == NULL)
       
  8428                   IN_type_symbol = last_type_symbol;
       
  8429                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8430                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8431                 function_type_prefix = return_type_symbol;
       
  8432                 function_type_suffix = IN_type_symbol;
       
  8433                 break;
       
  8434                 
       
  8435             }
       
  8436             
       
  8437             
       
  8438             ERROR;
       
  8439         }
       
  8440         
       
  8441     }/*function_lword_to_real*/
       
  8442     break;
       
  8443 
       
  8444 /****
       
  8445  *LWORD_TO_SINT
       
  8446  */
       
  8447     case function_lword_to_sint :
       
  8448     {
       
  8449         symbol_c *last_type_symbol = NULL;
       
  8450 
       
  8451         {
       
  8452             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8453             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8454             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8455             symbol_c *IN_type_symbol = NULL;
       
  8456             
       
  8457             /* Get the value from a foo(<param_value>) style call */
       
  8458             if (IN_param_value == NULL)
       
  8459               IN_param_value = function_call_param_iterator.next_nf();
       
  8460             if (IN_param_value != NULL) {
       
  8461               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8462               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8463             }
       
  8464             
       
  8465             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8466             {
       
  8467         
       
  8468                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8469                 
       
  8470                 if (IN_type_symbol == NULL)
       
  8471                   IN_type_symbol = last_type_symbol;
       
  8472                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8473                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8474                 function_type_prefix = return_type_symbol;
       
  8475                 function_type_suffix = IN_type_symbol;
       
  8476                 break;
       
  8477                 
       
  8478             }
       
  8479             
       
  8480             
       
  8481             ERROR;
       
  8482         }
       
  8483         
       
  8484     }/*function_lword_to_sint*/
       
  8485     break;
       
  8486 
       
  8487 /****
       
  8488  *LWORD_TO_LINT
       
  8489  */
       
  8490     case function_lword_to_lint :
       
  8491     {
       
  8492         symbol_c *last_type_symbol = NULL;
       
  8493 
       
  8494         {
       
  8495             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8497             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8498             symbol_c *IN_type_symbol = NULL;
       
  8499             
       
  8500             /* Get the value from a foo(<param_value>) style call */
       
  8501             if (IN_param_value == NULL)
       
  8502               IN_param_value = function_call_param_iterator.next_nf();
       
  8503             if (IN_param_value != NULL) {
       
  8504               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8505               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8506             }
       
  8507             
       
  8508             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8509             {
       
  8510         
       
  8511                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8512                 
       
  8513                 if (IN_type_symbol == NULL)
       
  8514                   IN_type_symbol = last_type_symbol;
       
  8515                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8517                 function_type_prefix = return_type_symbol;
       
  8518                 function_type_suffix = IN_type_symbol;
       
  8519                 break;
       
  8520                 
       
  8521             }
       
  8522             
       
  8523             
       
  8524             ERROR;
       
  8525         }
       
  8526         
       
  8527     }/*function_lword_to_lint*/
       
  8528     break;
       
  8529 
       
  8530 /****
       
  8531  *LWORD_TO_DINT
       
  8532  */
       
  8533     case function_lword_to_dint :
       
  8534     {
       
  8535         symbol_c *last_type_symbol = NULL;
       
  8536 
       
  8537         {
       
  8538             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8539             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8540             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8541             symbol_c *IN_type_symbol = NULL;
       
  8542             
       
  8543             /* Get the value from a foo(<param_value>) style call */
       
  8544             if (IN_param_value == NULL)
       
  8545               IN_param_value = function_call_param_iterator.next_nf();
       
  8546             if (IN_param_value != NULL) {
       
  8547               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8548               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8549             }
       
  8550             
       
  8551             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8552             {
       
  8553         
       
  8554                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8555                 
       
  8556                 if (IN_type_symbol == NULL)
       
  8557                   IN_type_symbol = last_type_symbol;
       
  8558                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8559                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8560                 function_type_prefix = return_type_symbol;
       
  8561                 function_type_suffix = IN_type_symbol;
       
  8562                 break;
       
  8563                 
       
  8564             }
       
  8565             
       
  8566             
       
  8567             ERROR;
       
  8568         }
       
  8569         
       
  8570     }/*function_lword_to_dint*/
       
  8571     break;
       
  8572 
       
  8573 /****
       
  8574  *LWORD_TO_DATE
       
  8575  */
       
  8576     case function_lword_to_date :
       
  8577     {
       
  8578         symbol_c *last_type_symbol = NULL;
       
  8579 
       
  8580         {
       
  8581             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8582             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8583             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8584             symbol_c *IN_type_symbol = NULL;
       
  8585             
       
  8586             /* Get the value from a foo(<param_value>) style call */
       
  8587             if (IN_param_value == NULL)
       
  8588               IN_param_value = function_call_param_iterator.next_nf();
       
  8589             if (IN_param_value != NULL) {
       
  8590               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8591               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8592             }
       
  8593             
       
  8594             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8595             {
       
  8596         
       
  8597                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8598                 
       
  8599                 if (IN_type_symbol == NULL)
       
  8600                   IN_type_symbol = last_type_symbol;
       
  8601                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8602                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8603                 function_type_prefix = return_type_symbol;
       
  8604                 break;
       
  8605                 
       
  8606             }
       
  8607             
       
  8608             
       
  8609             ERROR;
       
  8610         }
       
  8611         
       
  8612     }/*function_lword_to_date*/
       
  8613     break;
       
  8614 
       
  8615 /****
       
  8616  *LWORD_TO_DWORD
       
  8617  */
       
  8618     case function_lword_to_dword :
       
  8619     {
       
  8620         symbol_c *last_type_symbol = NULL;
       
  8621 
       
  8622         {
       
  8623             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8625             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8626             symbol_c *IN_type_symbol = NULL;
       
  8627             
       
  8628             /* Get the value from a foo(<param_value>) style call */
       
  8629             if (IN_param_value == NULL)
       
  8630               IN_param_value = function_call_param_iterator.next_nf();
       
  8631             if (IN_param_value != NULL) {
       
  8632               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8633               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8634             }
       
  8635             
       
  8636             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8637             {
       
  8638         
       
  8639                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8640                 
       
  8641                 if (IN_type_symbol == NULL)
       
  8642                   IN_type_symbol = last_type_symbol;
       
  8643                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8645                 function_type_prefix = return_type_symbol;
       
  8646                 function_type_suffix = IN_type_symbol;
       
  8647                 break;
       
  8648                 
       
  8649             }
       
  8650             
       
  8651             
       
  8652             ERROR;
       
  8653         }
       
  8654         
       
  8655     }/*function_lword_to_dword*/
       
  8656     break;
       
  8657 
       
  8658 /****
       
  8659  *LWORD_TO_DT
       
  8660  */
       
  8661     case function_lword_to_dt :
       
  8662     {
       
  8663         symbol_c *last_type_symbol = NULL;
       
  8664 
       
  8665         {
       
  8666             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8667             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8668             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8669             symbol_c *IN_type_symbol = NULL;
       
  8670             
       
  8671             /* Get the value from a foo(<param_value>) style call */
       
  8672             if (IN_param_value == NULL)
       
  8673               IN_param_value = function_call_param_iterator.next_nf();
       
  8674             if (IN_param_value != NULL) {
       
  8675               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8676               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8677             }
       
  8678             
       
  8679             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8680             {
       
  8681         
       
  8682                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8683                 
       
  8684                 if (IN_type_symbol == NULL)
       
  8685                   IN_type_symbol = last_type_symbol;
       
  8686                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8687                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8688                 function_type_prefix = return_type_symbol;
       
  8689                 break;
       
  8690                 
       
  8691             }
       
  8692             
       
  8693             
       
  8694             ERROR;
       
  8695         }
       
  8696         
       
  8697     }/*function_lword_to_dt*/
       
  8698     break;
       
  8699 
       
  8700 /****
       
  8701  *LWORD_TO_TOD
       
  8702  */
       
  8703     case function_lword_to_tod :
       
  8704     {
       
  8705         symbol_c *last_type_symbol = NULL;
       
  8706 
       
  8707         {
       
  8708             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8709             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8710             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8711             symbol_c *IN_type_symbol = NULL;
       
  8712             
       
  8713             /* Get the value from a foo(<param_value>) style call */
       
  8714             if (IN_param_value == NULL)
       
  8715               IN_param_value = function_call_param_iterator.next_nf();
       
  8716             if (IN_param_value != NULL) {
       
  8717               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8718               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8719             }
       
  8720             
       
  8721             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8722             {
       
  8723         
       
  8724                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  8725                 
       
  8726                 if (IN_type_symbol == NULL)
       
  8727                   IN_type_symbol = last_type_symbol;
       
  8728                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8729                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8730                 function_type_prefix = return_type_symbol;
       
  8731                 break;
       
  8732                 
       
  8733             }
       
  8734             
       
  8735             
       
  8736             ERROR;
       
  8737         }
       
  8738         
       
  8739     }/*function_lword_to_tod*/
       
  8740     break;
       
  8741 
       
  8742 /****
       
  8743  *LWORD_TO_UDINT
       
  8744  */
       
  8745     case function_lword_to_udint :
       
  8746     {
       
  8747         symbol_c *last_type_symbol = NULL;
       
  8748 
       
  8749         {
       
  8750             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8752             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8753             symbol_c *IN_type_symbol = NULL;
       
  8754             
       
  8755             /* Get the value from a foo(<param_value>) style call */
       
  8756             if (IN_param_value == NULL)
       
  8757               IN_param_value = function_call_param_iterator.next_nf();
       
  8758             if (IN_param_value != NULL) {
       
  8759               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8760               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8761             }
       
  8762             
       
  8763             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8764             {
       
  8765         
       
  8766                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8767                 
       
  8768                 if (IN_type_symbol == NULL)
       
  8769                   IN_type_symbol = last_type_symbol;
       
  8770                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8771                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8772                 function_type_prefix = return_type_symbol;
       
  8773                 function_type_suffix = IN_type_symbol;
       
  8774                 break;
       
  8775                 
       
  8776             }
       
  8777             
       
  8778             
       
  8779             ERROR;
       
  8780         }
       
  8781         
       
  8782     }/*function_lword_to_udint*/
       
  8783     break;
       
  8784 
       
  8785 /****
       
  8786  *LWORD_TO_WORD
       
  8787  */
       
  8788     case function_lword_to_word :
       
  8789     {
       
  8790         symbol_c *last_type_symbol = NULL;
       
  8791 
       
  8792         {
       
  8793             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8794             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8795             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8796             symbol_c *IN_type_symbol = NULL;
       
  8797             
       
  8798             /* Get the value from a foo(<param_value>) style call */
       
  8799             if (IN_param_value == NULL)
       
  8800               IN_param_value = function_call_param_iterator.next_nf();
       
  8801             if (IN_param_value != NULL) {
       
  8802               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8803               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8804             }
       
  8805             
       
  8806             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8807             {
       
  8808         
       
  8809                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8810                 
       
  8811                 if (IN_type_symbol == NULL)
       
  8812                   IN_type_symbol = last_type_symbol;
       
  8813                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8814                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8815                 function_type_prefix = return_type_symbol;
       
  8816                 function_type_suffix = IN_type_symbol;
       
  8817                 break;
       
  8818                 
       
  8819             }
       
  8820             
       
  8821             
       
  8822             ERROR;
       
  8823         }
       
  8824         
       
  8825     }/*function_lword_to_word*/
       
  8826     break;
       
  8827 
       
  8828 /****
       
  8829  *LWORD_TO_STRING
       
  8830  */
       
  8831     case function_lword_to_string :
       
  8832     {
       
  8833         symbol_c *last_type_symbol = NULL;
       
  8834 
       
  8835         {
       
  8836             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8837             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8838             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8839             symbol_c *IN_type_symbol = NULL;
       
  8840             
       
  8841             /* Get the value from a foo(<param_value>) style call */
       
  8842             if (IN_param_value == NULL)
       
  8843               IN_param_value = function_call_param_iterator.next_nf();
       
  8844             if (IN_param_value != NULL) {
       
  8845               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8846               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8847             }
       
  8848             
       
  8849             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8850             {
       
  8851         
       
  8852                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
       
  8853                 
       
  8854                 if (IN_type_symbol == NULL)
       
  8855                   IN_type_symbol = last_type_symbol;
       
  8856                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8857                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8858                 function_type_prefix = return_type_symbol;
       
  8859                 break;
       
  8860                 
       
  8861             }
       
  8862             
       
  8863             
       
  8864             ERROR;
       
  8865         }
       
  8866         
       
  8867     }/*function_lword_to_string*/
       
  8868     break;
       
  8869 
       
  8870 /****
       
  8871  *LWORD_TO_UINT
       
  8872  */
       
  8873     case function_lword_to_uint :
       
  8874     {
       
  8875         symbol_c *last_type_symbol = NULL;
       
  8876 
       
  8877         {
       
  8878             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8879             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8880             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8881             symbol_c *IN_type_symbol = NULL;
       
  8882             
       
  8883             /* Get the value from a foo(<param_value>) style call */
       
  8884             if (IN_param_value == NULL)
       
  8885               IN_param_value = function_call_param_iterator.next_nf();
       
  8886             if (IN_param_value != NULL) {
       
  8887               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8888               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8889             }
       
  8890             
       
  8891             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8892             {
       
  8893         
       
  8894                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8895                 
       
  8896                 if (IN_type_symbol == NULL)
       
  8897                   IN_type_symbol = last_type_symbol;
       
  8898                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8899                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8900                 function_type_prefix = return_type_symbol;
       
  8901                 function_type_suffix = IN_type_symbol;
       
  8902                 break;
       
  8903                 
       
  8904             }
       
  8905             
       
  8906             
       
  8907             ERROR;
       
  8908         }
       
  8909         
       
  8910     }/*function_lword_to_uint*/
       
  8911     break;
       
  8912 
       
  8913 /****
       
  8914  *LWORD_TO_LREAL
       
  8915  */
       
  8916     case function_lword_to_lreal :
       
  8917     {
       
  8918         symbol_c *last_type_symbol = NULL;
       
  8919 
       
  8920         {
       
  8921             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8922             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8923             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8924             symbol_c *IN_type_symbol = NULL;
       
  8925             
       
  8926             /* Get the value from a foo(<param_value>) style call */
       
  8927             if (IN_param_value == NULL)
       
  8928               IN_param_value = function_call_param_iterator.next_nf();
       
  8929             if (IN_param_value != NULL) {
       
  8930               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8931               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8932             }
       
  8933             
       
  8934             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8935             {
       
  8936         
       
  8937                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8938                 
       
  8939                 if (IN_type_symbol == NULL)
       
  8940                   IN_type_symbol = last_type_symbol;
       
  8941                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8942                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8943                 function_type_prefix = return_type_symbol;
       
  8944                 function_type_suffix = IN_type_symbol;
       
  8945                 break;
       
  8946                 
       
  8947             }
       
  8948             
       
  8949             
       
  8950             ERROR;
       
  8951         }
       
  8952         
       
  8953     }/*function_lword_to_lreal*/
       
  8954     break;
       
  8955 
       
  8956 /****
       
  8957  *LWORD_TO_BYTE
       
  8958  */
       
  8959     case function_lword_to_byte :
       
  8960     {
       
  8961         symbol_c *last_type_symbol = NULL;
       
  8962 
       
  8963         {
       
  8964             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  8965             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8966             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  8967             symbol_c *IN_type_symbol = NULL;
       
  8968             
       
  8969             /* Get the value from a foo(<param_value>) style call */
       
  8970             if (IN_param_value == NULL)
       
  8971               IN_param_value = function_call_param_iterator.next_nf();
       
  8972             if (IN_param_value != NULL) {
       
  8973               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8974               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8975             }
       
  8976             
       
  8977             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  8978             {
       
  8979         
       
  8980                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  8981                 
       
  8982                 if (IN_type_symbol == NULL)
       
  8983                   IN_type_symbol = last_type_symbol;
       
  8984                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  8985                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8986                 function_type_prefix = return_type_symbol;
       
  8987                 function_type_suffix = IN_type_symbol;
       
  8988                 break;
       
  8989                 
       
  8990             }
       
  8991             
       
  8992             
       
  8993             ERROR;
       
  8994         }
       
  8995         
       
  8996     }/*function_lword_to_byte*/
       
  8997     break;
       
  8998 
       
  8999 /****
       
  9000  *LWORD_TO_USINT
       
  9001  */
       
  9002     case function_lword_to_usint :
       
  9003     {
       
  9004         symbol_c *last_type_symbol = NULL;
       
  9005 
       
  9006         {
       
  9007             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9009             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9010             symbol_c *IN_type_symbol = NULL;
       
  9011             
       
  9012             /* Get the value from a foo(<param_value>) style call */
       
  9013             if (IN_param_value == NULL)
       
  9014               IN_param_value = function_call_param_iterator.next_nf();
       
  9015             if (IN_param_value != NULL) {
       
  9016               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9017               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9018             }
       
  9019             
       
  9020             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9021             {
       
  9022         
       
  9023                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9024                 
       
  9025                 if (IN_type_symbol == NULL)
       
  9026                   IN_type_symbol = last_type_symbol;
       
  9027                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9029                 function_type_prefix = return_type_symbol;
       
  9030                 function_type_suffix = IN_type_symbol;
       
  9031                 break;
       
  9032                 
       
  9033             }
       
  9034             
       
  9035             
       
  9036             ERROR;
       
  9037         }
       
  9038         
       
  9039     }/*function_lword_to_usint*/
       
  9040     break;
       
  9041 
       
  9042 /****
       
  9043  *LWORD_TO_ULINT
       
  9044  */
       
  9045     case function_lword_to_ulint :
       
  9046     {
       
  9047         symbol_c *last_type_symbol = NULL;
       
  9048 
       
  9049         {
       
  9050             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9052             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9053             symbol_c *IN_type_symbol = NULL;
       
  9054             
       
  9055             /* Get the value from a foo(<param_value>) style call */
       
  9056             if (IN_param_value == NULL)
       
  9057               IN_param_value = function_call_param_iterator.next_nf();
       
  9058             if (IN_param_value != NULL) {
       
  9059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9061             }
       
  9062             
       
  9063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9064             {
       
  9065         
       
  9066                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9067                 
       
  9068                 if (IN_type_symbol == NULL)
       
  9069                   IN_type_symbol = last_type_symbol;
       
  9070                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9071                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9072                 function_type_prefix = return_type_symbol;
       
  9073                 function_type_suffix = IN_type_symbol;
       
  9074                 break;
       
  9075                 
       
  9076             }
       
  9077             
       
  9078             
       
  9079             ERROR;
       
  9080         }
       
  9081         
       
  9082     }/*function_lword_to_ulint*/
       
  9083     break;
       
  9084 
       
  9085 /****
       
  9086  *LWORD_TO_BOOL
       
  9087  */
       
  9088     case function_lword_to_bool :
       
  9089     {
       
  9090         symbol_c *last_type_symbol = NULL;
       
  9091 
       
  9092         {
       
  9093             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9094             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9095             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9096             symbol_c *IN_type_symbol = NULL;
       
  9097             
       
  9098             /* Get the value from a foo(<param_value>) style call */
       
  9099             if (IN_param_value == NULL)
       
  9100               IN_param_value = function_call_param_iterator.next_nf();
       
  9101             if (IN_param_value != NULL) {
       
  9102               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9103               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9104             }
       
  9105             
       
  9106             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9107             {
       
  9108         
       
  9109                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9110                 
       
  9111                 if (IN_type_symbol == NULL)
       
  9112                   IN_type_symbol = last_type_symbol;
       
  9113                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9114                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9115                 function_type_prefix = return_type_symbol;
       
  9116                 function_type_suffix = IN_type_symbol;
       
  9117                 break;
       
  9118                 
       
  9119             }
       
  9120             
       
  9121             
       
  9122             ERROR;
       
  9123         }
       
  9124         
       
  9125     }/*function_lword_to_bool*/
       
  9126     break;
       
  9127 
       
  9128 /****
       
  9129  *LWORD_TO_TIME
       
  9130  */
       
  9131     case function_lword_to_time :
       
  9132     {
       
  9133         symbol_c *last_type_symbol = NULL;
       
  9134 
       
  9135         {
       
  9136             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9137             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9138             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9139             symbol_c *IN_type_symbol = NULL;
       
  9140             
       
  9141             /* Get the value from a foo(<param_value>) style call */
       
  9142             if (IN_param_value == NULL)
       
  9143               IN_param_value = function_call_param_iterator.next_nf();
       
  9144             if (IN_param_value != NULL) {
       
  9145               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9146               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9147             }
       
  9148             
       
  9149             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9150             {
       
  9151         
       
  9152                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9153                 
       
  9154                 if (IN_type_symbol == NULL)
       
  9155                   IN_type_symbol = last_type_symbol;
       
  9156                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9157                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9158                 function_type_prefix = return_type_symbol;
       
  9159                 break;
       
  9160                 
       
  9161             }
       
  9162             
       
  9163             
       
  9164             ERROR;
       
  9165         }
       
  9166         
       
  9167     }/*function_lword_to_time*/
       
  9168     break;
       
  9169 
       
  9170 /****
       
  9171  *LWORD_TO_INT
       
  9172  */
       
  9173     case function_lword_to_int :
       
  9174     {
       
  9175         symbol_c *last_type_symbol = NULL;
       
  9176 
       
  9177         {
       
  9178             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9179             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9180             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9181             symbol_c *IN_type_symbol = NULL;
       
  9182             
       
  9183             /* Get the value from a foo(<param_value>) style call */
       
  9184             if (IN_param_value == NULL)
       
  9185               IN_param_value = function_call_param_iterator.next_nf();
       
  9186             if (IN_param_value != NULL) {
       
  9187               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9188               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9189             }
       
  9190             
       
  9191             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  9192             {
       
  9193         
       
  9194                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9195                 
       
  9196                 if (IN_type_symbol == NULL)
       
  9197                   IN_type_symbol = last_type_symbol;
       
  9198                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9199                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9200                 function_type_prefix = return_type_symbol;
       
  9201                 function_type_suffix = IN_type_symbol;
       
  9202                 break;
       
  9203                 
       
  9204             }
       
  9205             
       
  9206             
       
  9207             ERROR;
       
  9208         }
       
  9209         
       
  9210     }/*function_lword_to_int*/
       
  9211     break;
       
  9212 
       
  9213 /****
       
  9214  *UINT_TO_REAL
       
  9215  */
       
  9216     case function_uint_to_real :
       
  9217     {
       
  9218         symbol_c *last_type_symbol = NULL;
       
  9219 
       
  9220         {
       
  9221             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9222             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9223             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9224             symbol_c *IN_type_symbol = NULL;
       
  9225             
       
  9226             /* Get the value from a foo(<param_value>) style call */
       
  9227             if (IN_param_value == NULL)
       
  9228               IN_param_value = function_call_param_iterator.next_nf();
       
  9229             if (IN_param_value != NULL) {
       
  9230               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9231               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9232             }
       
  9233             
       
  9234             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9235             {
       
  9236         
       
  9237                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9238                 
       
  9239                 if (IN_type_symbol == NULL)
       
  9240                   IN_type_symbol = last_type_symbol;
       
  9241                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9242                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9243                 function_type_prefix = return_type_symbol;
       
  9244                 function_type_suffix = IN_type_symbol;
       
  9245                 break;
       
  9246                 
       
  9247             }
       
  9248             
       
  9249             
       
  9250             ERROR;
       
  9251         }
       
  9252         
       
  9253     }/*function_uint_to_real*/
       
  9254     break;
       
  9255 
       
  9256 /****
       
  9257  *UINT_TO_SINT
       
  9258  */
       
  9259     case function_uint_to_sint :
       
  9260     {
       
  9261         symbol_c *last_type_symbol = NULL;
       
  9262 
       
  9263         {
       
  9264             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9265             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9266             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9267             symbol_c *IN_type_symbol = NULL;
       
  9268             
       
  9269             /* Get the value from a foo(<param_value>) style call */
       
  9270             if (IN_param_value == NULL)
       
  9271               IN_param_value = function_call_param_iterator.next_nf();
       
  9272             if (IN_param_value != NULL) {
       
  9273               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9274               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9275             }
       
  9276             
       
  9277             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9278             {
       
  9279         
       
  9280                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9281                 
       
  9282                 if (IN_type_symbol == NULL)
       
  9283                   IN_type_symbol = last_type_symbol;
       
  9284                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9285                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9286                 function_type_prefix = return_type_symbol;
       
  9287                 function_type_suffix = IN_type_symbol;
       
  9288                 break;
       
  9289                 
       
  9290             }
       
  9291             
       
  9292             
       
  9293             ERROR;
       
  9294         }
       
  9295         
       
  9296     }/*function_uint_to_sint*/
       
  9297     break;
       
  9298 
       
  9299 /****
       
  9300  *UINT_TO_LINT
       
  9301  */
       
  9302     case function_uint_to_lint :
       
  9303     {
       
  9304         symbol_c *last_type_symbol = NULL;
       
  9305 
       
  9306         {
       
  9307             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9308             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9309             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9310             symbol_c *IN_type_symbol = NULL;
       
  9311             
       
  9312             /* Get the value from a foo(<param_value>) style call */
       
  9313             if (IN_param_value == NULL)
       
  9314               IN_param_value = function_call_param_iterator.next_nf();
       
  9315             if (IN_param_value != NULL) {
       
  9316               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9317               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9318             }
       
  9319             
       
  9320             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9321             {
       
  9322         
       
  9323                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9324                 
       
  9325                 if (IN_type_symbol == NULL)
       
  9326                   IN_type_symbol = last_type_symbol;
       
  9327                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9328                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9329                 function_type_prefix = return_type_symbol;
       
  9330                 function_type_suffix = IN_type_symbol;
       
  9331                 break;
       
  9332                 
       
  9333             }
       
  9334             
       
  9335             
       
  9336             ERROR;
       
  9337         }
       
  9338         
       
  9339     }/*function_uint_to_lint*/
       
  9340     break;
       
  9341 
       
  9342 /****
       
  9343  *UINT_TO_DINT
       
  9344  */
       
  9345     case function_uint_to_dint :
       
  9346     {
       
  9347         symbol_c *last_type_symbol = NULL;
       
  9348 
       
  9349         {
       
  9350             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9352             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9353             symbol_c *IN_type_symbol = NULL;
       
  9354             
       
  9355             /* Get the value from a foo(<param_value>) style call */
       
  9356             if (IN_param_value == NULL)
       
  9357               IN_param_value = function_call_param_iterator.next_nf();
       
  9358             if (IN_param_value != NULL) {
       
  9359               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9360               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9361             }
       
  9362             
       
  9363             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9364             {
       
  9365         
       
  9366                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9367                 
       
  9368                 if (IN_type_symbol == NULL)
       
  9369                   IN_type_symbol = last_type_symbol;
       
  9370                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9371                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9372                 function_type_prefix = return_type_symbol;
       
  9373                 function_type_suffix = IN_type_symbol;
       
  9374                 break;
       
  9375                 
       
  9376             }
       
  9377             
       
  9378             
       
  9379             ERROR;
       
  9380         }
       
  9381         
       
  9382     }/*function_uint_to_dint*/
       
  9383     break;
       
  9384 
       
  9385 /****
       
  9386  *UINT_TO_DATE
       
  9387  */
       
  9388     case function_uint_to_date :
       
  9389     {
       
  9390         symbol_c *last_type_symbol = NULL;
       
  9391 
       
  9392         {
       
  9393             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9394             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9395             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9396             symbol_c *IN_type_symbol = NULL;
       
  9397             
       
  9398             /* Get the value from a foo(<param_value>) style call */
       
  9399             if (IN_param_value == NULL)
       
  9400               IN_param_value = function_call_param_iterator.next_nf();
       
  9401             if (IN_param_value != NULL) {
       
  9402               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9403               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9404             }
       
  9405             
       
  9406             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9407             {
       
  9408         
       
  9409                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9410                 
       
  9411                 if (IN_type_symbol == NULL)
       
  9412                   IN_type_symbol = last_type_symbol;
       
  9413                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9414                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9415                 function_type_prefix = return_type_symbol;
       
  9416                 break;
       
  9417                 
       
  9418             }
       
  9419             
       
  9420             
       
  9421             ERROR;
       
  9422         }
       
  9423         
       
  9424     }/*function_uint_to_date*/
       
  9425     break;
       
  9426 
       
  9427 /****
       
  9428  *UINT_TO_DWORD
       
  9429  */
       
  9430     case function_uint_to_dword :
       
  9431     {
       
  9432         symbol_c *last_type_symbol = NULL;
       
  9433 
       
  9434         {
       
  9435             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9436             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9437             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9438             symbol_c *IN_type_symbol = NULL;
       
  9439             
       
  9440             /* Get the value from a foo(<param_value>) style call */
       
  9441             if (IN_param_value == NULL)
       
  9442               IN_param_value = function_call_param_iterator.next_nf();
       
  9443             if (IN_param_value != NULL) {
       
  9444               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9445               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9446             }
       
  9447             
       
  9448             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9449             {
       
  9450         
       
  9451                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9452                 
       
  9453                 if (IN_type_symbol == NULL)
       
  9454                   IN_type_symbol = last_type_symbol;
       
  9455                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9456                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9457                 function_type_prefix = return_type_symbol;
       
  9458                 function_type_suffix = IN_type_symbol;
       
  9459                 break;
       
  9460                 
       
  9461             }
       
  9462             
       
  9463             
       
  9464             ERROR;
       
  9465         }
       
  9466         
       
  9467     }/*function_uint_to_dword*/
       
  9468     break;
       
  9469 
       
  9470 /****
       
  9471  *UINT_TO_DT
       
  9472  */
       
  9473     case function_uint_to_dt :
       
  9474     {
       
  9475         symbol_c *last_type_symbol = NULL;
       
  9476 
       
  9477         {
       
  9478             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9479             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9480             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9481             symbol_c *IN_type_symbol = NULL;
       
  9482             
       
  9483             /* Get the value from a foo(<param_value>) style call */
       
  9484             if (IN_param_value == NULL)
       
  9485               IN_param_value = function_call_param_iterator.next_nf();
       
  9486             if (IN_param_value != NULL) {
       
  9487               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9488               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9489             }
       
  9490             
       
  9491             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9492             {
       
  9493         
       
  9494                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9495                 
       
  9496                 if (IN_type_symbol == NULL)
       
  9497                   IN_type_symbol = last_type_symbol;
       
  9498                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9499                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9500                 function_type_prefix = return_type_symbol;
       
  9501                 break;
       
  9502                 
       
  9503             }
       
  9504             
       
  9505             
       
  9506             ERROR;
       
  9507         }
       
  9508         
       
  9509     }/*function_uint_to_dt*/
       
  9510     break;
       
  9511 
       
  9512 /****
       
  9513  *UINT_TO_TOD
       
  9514  */
       
  9515     case function_uint_to_tod :
       
  9516     {
       
  9517         symbol_c *last_type_symbol = NULL;
       
  9518 
       
  9519         {
       
  9520             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9522             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9523             symbol_c *IN_type_symbol = NULL;
       
  9524             
       
  9525             /* Get the value from a foo(<param_value>) style call */
       
  9526             if (IN_param_value == NULL)
       
  9527               IN_param_value = function_call_param_iterator.next_nf();
       
  9528             if (IN_param_value != NULL) {
       
  9529               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9530               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9531             }
       
  9532             
       
  9533             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9534             {
       
  9535         
       
  9536                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9537                 
       
  9538                 if (IN_type_symbol == NULL)
       
  9539                   IN_type_symbol = last_type_symbol;
       
  9540                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9541                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9542                 function_type_prefix = return_type_symbol;
       
  9543                 break;
       
  9544                 
       
  9545             }
       
  9546             
       
  9547             
       
  9548             ERROR;
       
  9549         }
       
  9550         
       
  9551     }/*function_uint_to_tod*/
       
  9552     break;
       
  9553 
       
  9554 /****
       
  9555  *UINT_TO_UDINT
       
  9556  */
       
  9557     case function_uint_to_udint :
       
  9558     {
       
  9559         symbol_c *last_type_symbol = NULL;
       
  9560 
       
  9561         {
       
  9562             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9563             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9564             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9565             symbol_c *IN_type_symbol = NULL;
       
  9566             
       
  9567             /* Get the value from a foo(<param_value>) style call */
       
  9568             if (IN_param_value == NULL)
       
  9569               IN_param_value = function_call_param_iterator.next_nf();
       
  9570             if (IN_param_value != NULL) {
       
  9571               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9572               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9573             }
       
  9574             
       
  9575             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9576             {
       
  9577         
       
  9578                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9579                 
       
  9580                 if (IN_type_symbol == NULL)
       
  9581                   IN_type_symbol = last_type_symbol;
       
  9582                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9583                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9584                 function_type_prefix = return_type_symbol;
       
  9585                 function_type_suffix = IN_type_symbol;
       
  9586                 break;
       
  9587                 
       
  9588             }
       
  9589             
       
  9590             
       
  9591             ERROR;
       
  9592         }
       
  9593         
       
  9594     }/*function_uint_to_udint*/
       
  9595     break;
       
  9596 
       
  9597 /****
       
  9598  *UINT_TO_WORD
       
  9599  */
       
  9600     case function_uint_to_word :
       
  9601     {
       
  9602         symbol_c *last_type_symbol = NULL;
       
  9603 
       
  9604         {
       
  9605             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9607             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9608             symbol_c *IN_type_symbol = NULL;
       
  9609             
       
  9610             /* Get the value from a foo(<param_value>) style call */
       
  9611             if (IN_param_value == NULL)
       
  9612               IN_param_value = function_call_param_iterator.next_nf();
       
  9613             if (IN_param_value != NULL) {
       
  9614               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9615               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9616             }
       
  9617             
       
  9618             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9619             {
       
  9620         
       
  9621                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9622                 
       
  9623                 if (IN_type_symbol == NULL)
       
  9624                   IN_type_symbol = last_type_symbol;
       
  9625                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9626                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9627                 function_type_prefix = return_type_symbol;
       
  9628                 function_type_suffix = IN_type_symbol;
       
  9629                 break;
       
  9630                 
       
  9631             }
       
  9632             
       
  9633             
       
  9634             ERROR;
       
  9635         }
       
  9636         
       
  9637     }/*function_uint_to_word*/
       
  9638     break;
       
  9639 
       
  9640 /****
       
  9641  *UINT_TO_STRING
       
  9642  */
       
  9643     case function_uint_to_string :
       
  9644     {
       
  9645         symbol_c *last_type_symbol = NULL;
       
  9646 
       
  9647         {
       
  9648             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9649             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9650             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9651             symbol_c *IN_type_symbol = NULL;
       
  9652             
       
  9653             /* Get the value from a foo(<param_value>) style call */
       
  9654             if (IN_param_value == NULL)
       
  9655               IN_param_value = function_call_param_iterator.next_nf();
       
  9656             if (IN_param_value != NULL) {
       
  9657               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9658               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9659             }
       
  9660             
       
  9661             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9662             {
       
  9663         
       
  9664                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
       
  9665                 
       
  9666                 if (IN_type_symbol == NULL)
       
  9667                   IN_type_symbol = last_type_symbol;
       
  9668                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9669                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9670                 function_type_prefix = return_type_symbol;
       
  9671                 break;
       
  9672                 
       
  9673             }
       
  9674             
       
  9675             
       
  9676             ERROR;
       
  9677         }
       
  9678         
       
  9679     }/*function_uint_to_string*/
       
  9680     break;
       
  9681 
       
  9682 /****
       
  9683  *UINT_TO_LWORD
       
  9684  */
       
  9685     case function_uint_to_lword :
       
  9686     {
       
  9687         symbol_c *last_type_symbol = NULL;
       
  9688 
       
  9689         {
       
  9690             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9691             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9692             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9693             symbol_c *IN_type_symbol = NULL;
       
  9694             
       
  9695             /* Get the value from a foo(<param_value>) style call */
       
  9696             if (IN_param_value == NULL)
       
  9697               IN_param_value = function_call_param_iterator.next_nf();
       
  9698             if (IN_param_value != NULL) {
       
  9699               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9700               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9701             }
       
  9702             
       
  9703             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9704             {
       
  9705         
       
  9706                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9707                 
       
  9708                 if (IN_type_symbol == NULL)
       
  9709                   IN_type_symbol = last_type_symbol;
       
  9710                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9711                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9712                 function_type_prefix = return_type_symbol;
       
  9713                 function_type_suffix = IN_type_symbol;
       
  9714                 break;
       
  9715                 
       
  9716             }
       
  9717             
       
  9718             
       
  9719             ERROR;
       
  9720         }
       
  9721         
       
  9722     }/*function_uint_to_lword*/
       
  9723     break;
       
  9724 
       
  9725 /****
       
  9726  *UINT_TO_LREAL
       
  9727  */
       
  9728     case function_uint_to_lreal :
       
  9729     {
       
  9730         symbol_c *last_type_symbol = NULL;
       
  9731 
       
  9732         {
       
  9733             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9734             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9735             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9736             symbol_c *IN_type_symbol = NULL;
       
  9737             
       
  9738             /* Get the value from a foo(<param_value>) style call */
       
  9739             if (IN_param_value == NULL)
       
  9740               IN_param_value = function_call_param_iterator.next_nf();
       
  9741             if (IN_param_value != NULL) {
       
  9742               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9743               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9744             }
       
  9745             
       
  9746             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9747             {
       
  9748         
       
  9749                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9750                 
       
  9751                 if (IN_type_symbol == NULL)
       
  9752                   IN_type_symbol = last_type_symbol;
       
  9753                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9754                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9755                 function_type_prefix = return_type_symbol;
       
  9756                 function_type_suffix = IN_type_symbol;
       
  9757                 break;
       
  9758                 
       
  9759             }
       
  9760             
       
  9761             
       
  9762             ERROR;
       
  9763         }
       
  9764         
       
  9765     }/*function_uint_to_lreal*/
       
  9766     break;
       
  9767 
       
  9768 /****
       
  9769  *UINT_TO_BYTE
       
  9770  */
       
  9771     case function_uint_to_byte :
       
  9772     {
       
  9773         symbol_c *last_type_symbol = NULL;
       
  9774 
       
  9775         {
       
  9776             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9777             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9778             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9779             symbol_c *IN_type_symbol = NULL;
       
  9780             
       
  9781             /* Get the value from a foo(<param_value>) style call */
       
  9782             if (IN_param_value == NULL)
       
  9783               IN_param_value = function_call_param_iterator.next_nf();
       
  9784             if (IN_param_value != NULL) {
       
  9785               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9786               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9787             }
       
  9788             
       
  9789             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9790             {
       
  9791         
       
  9792                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9793                 
       
  9794                 if (IN_type_symbol == NULL)
       
  9795                   IN_type_symbol = last_type_symbol;
       
  9796                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9797                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9798                 function_type_prefix = return_type_symbol;
       
  9799                 function_type_suffix = IN_type_symbol;
       
  9800                 break;
       
  9801                 
       
  9802             }
       
  9803             
       
  9804             
       
  9805             ERROR;
       
  9806         }
       
  9807         
       
  9808     }/*function_uint_to_byte*/
       
  9809     break;
       
  9810 
       
  9811 /****
       
  9812  *UINT_TO_USINT
       
  9813  */
       
  9814     case function_uint_to_usint :
       
  9815     {
       
  9816         symbol_c *last_type_symbol = NULL;
       
  9817 
       
  9818         {
       
  9819             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9820             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9821             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9822             symbol_c *IN_type_symbol = NULL;
       
  9823             
       
  9824             /* Get the value from a foo(<param_value>) style call */
       
  9825             if (IN_param_value == NULL)
       
  9826               IN_param_value = function_call_param_iterator.next_nf();
       
  9827             if (IN_param_value != NULL) {
       
  9828               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9829               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9830             }
       
  9831             
       
  9832             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9833             {
       
  9834         
       
  9835                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9836                 
       
  9837                 if (IN_type_symbol == NULL)
       
  9838                   IN_type_symbol = last_type_symbol;
       
  9839                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9840                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9841                 function_type_prefix = return_type_symbol;
       
  9842                 function_type_suffix = IN_type_symbol;
       
  9843                 break;
       
  9844                 
       
  9845             }
       
  9846             
       
  9847             
       
  9848             ERROR;
       
  9849         }
       
  9850         
       
  9851     }/*function_uint_to_usint*/
       
  9852     break;
       
  9853 
       
  9854 /****
       
  9855  *UINT_TO_ULINT
       
  9856  */
       
  9857     case function_uint_to_ulint :
       
  9858     {
       
  9859         symbol_c *last_type_symbol = NULL;
       
  9860 
       
  9861         {
       
  9862             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9864             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9865             symbol_c *IN_type_symbol = NULL;
       
  9866             
       
  9867             /* Get the value from a foo(<param_value>) style call */
       
  9868             if (IN_param_value == NULL)
       
  9869               IN_param_value = function_call_param_iterator.next_nf();
       
  9870             if (IN_param_value != NULL) {
       
  9871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9873             }
       
  9874             
       
  9875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9876             {
       
  9877         
       
  9878                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9879                 
       
  9880                 if (IN_type_symbol == NULL)
       
  9881                   IN_type_symbol = last_type_symbol;
       
  9882                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9883                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9884                 function_type_prefix = return_type_symbol;
       
  9885                 function_type_suffix = IN_type_symbol;
       
  9886                 break;
       
  9887                 
       
  9888             }
       
  9889             
       
  9890             
       
  9891             ERROR;
       
  9892         }
       
  9893         
       
  9894     }/*function_uint_to_ulint*/
       
  9895     break;
       
  9896 
       
  9897 /****
       
  9898  *UINT_TO_BOOL
       
  9899  */
       
  9900     case function_uint_to_bool :
       
  9901     {
       
  9902         symbol_c *last_type_symbol = NULL;
       
  9903 
       
  9904         {
       
  9905             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9907             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9908             symbol_c *IN_type_symbol = NULL;
       
  9909             
       
  9910             /* Get the value from a foo(<param_value>) style call */
       
  9911             if (IN_param_value == NULL)
       
  9912               IN_param_value = function_call_param_iterator.next_nf();
       
  9913             if (IN_param_value != NULL) {
       
  9914               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9915               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9916             }
       
  9917             
       
  9918             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9919             {
       
  9920         
       
  9921                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
  9922                 
       
  9923                 if (IN_type_symbol == NULL)
       
  9924                   IN_type_symbol = last_type_symbol;
       
  9925                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9926                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9927                 function_type_prefix = return_type_symbol;
       
  9928                 function_type_suffix = IN_type_symbol;
       
  9929                 break;
       
  9930                 
       
  9931             }
       
  9932             
       
  9933             
       
  9934             ERROR;
       
  9935         }
       
  9936         
       
  9937     }/*function_uint_to_bool*/
       
  9938     break;
       
  9939 
       
  9940 /****
       
  9941  *UINT_TO_TIME
       
  9942  */
       
  9943     case function_uint_to_time :
       
  9944     {
       
  9945         symbol_c *last_type_symbol = NULL;
       
  9946 
       
  9947         {
       
  9948             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9949             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9950             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9951             symbol_c *IN_type_symbol = NULL;
       
  9952             
       
  9953             /* Get the value from a foo(<param_value>) style call */
       
  9954             if (IN_param_value == NULL)
       
  9955               IN_param_value = function_call_param_iterator.next_nf();
       
  9956             if (IN_param_value != NULL) {
       
  9957               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9958               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9959             }
       
  9960             
       
  9961             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  9962             {
       
  9963         
       
  9964                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
       
  9965                 
       
  9966                 if (IN_type_symbol == NULL)
       
  9967                   IN_type_symbol = last_type_symbol;
       
  9968                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
  9969                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9970                 function_type_prefix = return_type_symbol;
       
  9971                 break;
       
  9972                 
       
  9973             }
       
  9974             
       
  9975             
       
  9976             ERROR;
       
  9977         }
       
  9978         
       
  9979     }/*function_uint_to_time*/
       
  9980     break;
       
  9981 
       
  9982 /****
       
  9983  *UINT_TO_INT
       
  9984  */
       
  9985     case function_uint_to_int :
       
  9986     {
       
  9987         symbol_c *last_type_symbol = NULL;
       
  9988 
       
  9989         {
       
  9990             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
  9991             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9992             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
  9993             symbol_c *IN_type_symbol = NULL;
       
  9994             
       
  9995             /* Get the value from a foo(<param_value>) style call */
       
  9996             if (IN_param_value == NULL)
       
  9997               IN_param_value = function_call_param_iterator.next_nf();
       
  9998             if (IN_param_value != NULL) {
       
  9999               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10000               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10001             }
       
 10002             
       
 10003             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 10004             {
       
 10005         
       
 10006                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10007                 
       
 10008                 if (IN_type_symbol == NULL)
       
 10009                   IN_type_symbol = last_type_symbol;
       
 10010                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10011                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10012                 function_type_prefix = return_type_symbol;
       
 10013                 function_type_suffix = IN_type_symbol;
       
 10014                 break;
       
 10015                 
       
 10016             }
       
 10017             
       
 10018             
       
 10019             ERROR;
       
 10020         }
       
 10021         
       
 10022     }/*function_uint_to_int*/
       
 10023     break;
       
 10024 
       
 10025 /****
       
 10026  *LREAL_TO_REAL
       
 10027  */
       
 10028     case function_lreal_to_real :
       
 10029     {
       
 10030         symbol_c *last_type_symbol = NULL;
       
 10031 
       
 10032         {
       
 10033             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10034             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10035             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10036             symbol_c *IN_type_symbol = NULL;
       
 10037             
       
 10038             /* Get the value from a foo(<param_value>) style call */
       
 10039             if (IN_param_value == NULL)
       
 10040               IN_param_value = function_call_param_iterator.next_nf();
       
 10041             if (IN_param_value != NULL) {
       
 10042               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10043               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10044             }
       
 10045             
       
 10046             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10047             {
       
 10048         
       
 10049                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10050                 
       
 10051                 if (IN_type_symbol == NULL)
       
 10052                   IN_type_symbol = last_type_symbol;
       
 10053                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10054                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10055                 function_type_prefix = return_type_symbol;
       
 10056                 function_type_suffix = IN_type_symbol;
       
 10057                 break;
       
 10058                 
       
 10059             }
       
 10060             
       
 10061             
       
 10062             ERROR;
       
 10063         }
       
 10064         
       
 10065     }/*function_lreal_to_real*/
       
 10066     break;
       
 10067 
       
 10068 /****
       
 10069  *LREAL_TO_SINT
       
 10070  */
       
 10071     case function_lreal_to_sint :
       
 10072     {
       
 10073         symbol_c *last_type_symbol = NULL;
       
 10074 
       
 10075         {
       
 10076             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10078             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10079             symbol_c *IN_type_symbol = NULL;
       
 10080             
       
 10081             /* Get the value from a foo(<param_value>) style call */
       
 10082             if (IN_param_value == NULL)
       
 10083               IN_param_value = function_call_param_iterator.next_nf();
       
 10084             if (IN_param_value != NULL) {
       
 10085               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10086               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10087             }
       
 10088             
       
 10089             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10090             {
       
 10091         
       
 10092                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10093                 
       
 10094                 if (IN_type_symbol == NULL)
       
 10095                   IN_type_symbol = last_type_symbol;
       
 10096                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10097                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10098                 function_type_prefix = return_type_symbol;
       
 10099                 function_type_suffix = IN_type_symbol;
       
 10100                 break;
       
 10101                 
       
 10102             }
       
 10103             
       
 10104             
       
 10105             ERROR;
       
 10106         }
       
 10107         
       
 10108     }/*function_lreal_to_sint*/
       
 10109     break;
       
 10110 
       
 10111 /****
       
 10112  *LREAL_TO_LINT
       
 10113  */
       
 10114     case function_lreal_to_lint :
       
 10115     {
       
 10116         symbol_c *last_type_symbol = NULL;
       
 10117 
       
 10118         {
       
 10119             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10121             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10122             symbol_c *IN_type_symbol = NULL;
       
 10123             
       
 10124             /* Get the value from a foo(<param_value>) style call */
       
 10125             if (IN_param_value == NULL)
       
 10126               IN_param_value = function_call_param_iterator.next_nf();
       
 10127             if (IN_param_value != NULL) {
       
 10128               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10129               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10130             }
       
 10131             
       
 10132             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10133             {
       
 10134         
       
 10135                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10136                 
       
 10137                 if (IN_type_symbol == NULL)
       
 10138                   IN_type_symbol = last_type_symbol;
       
 10139                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10140                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10141                 function_type_prefix = return_type_symbol;
       
 10142                 function_type_suffix = IN_type_symbol;
       
 10143                 break;
       
 10144                 
       
 10145             }
       
 10146             
       
 10147             
       
 10148             ERROR;
       
 10149         }
       
 10150         
       
 10151     }/*function_lreal_to_lint*/
       
 10152     break;
       
 10153 
       
 10154 /****
       
 10155  *LREAL_TO_DINT
       
 10156  */
       
 10157     case function_lreal_to_dint :
       
 10158     {
       
 10159         symbol_c *last_type_symbol = NULL;
       
 10160 
       
 10161         {
       
 10162             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10163             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10164             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10165             symbol_c *IN_type_symbol = NULL;
       
 10166             
       
 10167             /* Get the value from a foo(<param_value>) style call */
       
 10168             if (IN_param_value == NULL)
       
 10169               IN_param_value = function_call_param_iterator.next_nf();
       
 10170             if (IN_param_value != NULL) {
       
 10171               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10172               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10173             }
       
 10174             
       
 10175             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10176             {
       
 10177         
       
 10178                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10179                 
       
 10180                 if (IN_type_symbol == NULL)
       
 10181                   IN_type_symbol = last_type_symbol;
       
 10182                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10183                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10184                 function_type_prefix = return_type_symbol;
       
 10185                 function_type_suffix = IN_type_symbol;
       
 10186                 break;
       
 10187                 
       
 10188             }
       
 10189             
       
 10190             
       
 10191             ERROR;
       
 10192         }
       
 10193         
       
 10194     }/*function_lreal_to_dint*/
       
 10195     break;
       
 10196 
       
 10197 /****
       
 10198  *LREAL_TO_DATE
       
 10199  */
       
 10200     case function_lreal_to_date :
       
 10201     {
       
 10202         symbol_c *last_type_symbol = NULL;
       
 10203 
       
 10204         {
       
 10205             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10206             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10207             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10208             symbol_c *IN_type_symbol = NULL;
       
 10209             
       
 10210             /* Get the value from a foo(<param_value>) style call */
       
 10211             if (IN_param_value == NULL)
       
 10212               IN_param_value = function_call_param_iterator.next_nf();
       
 10213             if (IN_param_value != NULL) {
       
 10214               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10215               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10216             }
       
 10217             
       
 10218             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10219             {
       
 10220         
       
 10221                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10222                 
       
 10223                 if (IN_type_symbol == NULL)
       
 10224                   IN_type_symbol = last_type_symbol;
       
 10225                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10226                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10227                 function_type_prefix = return_type_symbol;
       
 10228                 break;
       
 10229                 
       
 10230             }
       
 10231             
       
 10232             
       
 10233             ERROR;
       
 10234         }
       
 10235         
       
 10236     }/*function_lreal_to_date*/
       
 10237     break;
       
 10238 
       
 10239 /****
       
 10240  *LREAL_TO_DWORD
       
 10241  */
       
 10242     case function_lreal_to_dword :
       
 10243     {
       
 10244         symbol_c *last_type_symbol = NULL;
       
 10245 
       
 10246         {
       
 10247             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10249             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10250             symbol_c *IN_type_symbol = NULL;
       
 10251             
       
 10252             /* Get the value from a foo(<param_value>) style call */
       
 10253             if (IN_param_value == NULL)
       
 10254               IN_param_value = function_call_param_iterator.next_nf();
       
 10255             if (IN_param_value != NULL) {
       
 10256               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10257               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10258             }
       
 10259             
       
 10260             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10261             {
       
 10262         
       
 10263                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10264                 
       
 10265                 if (IN_type_symbol == NULL)
       
 10266                   IN_type_symbol = last_type_symbol;
       
 10267                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10268                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10269                 function_type_prefix = return_type_symbol;
       
 10270                 function_type_suffix = IN_type_symbol;
       
 10271                 break;
       
 10272                 
       
 10273             }
       
 10274             
       
 10275             
       
 10276             ERROR;
       
 10277         }
       
 10278         
       
 10279     }/*function_lreal_to_dword*/
       
 10280     break;
       
 10281 
       
 10282 /****
       
 10283  *LREAL_TO_DT
       
 10284  */
       
 10285     case function_lreal_to_dt :
       
 10286     {
       
 10287         symbol_c *last_type_symbol = NULL;
       
 10288 
       
 10289         {
       
 10290             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10291             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10292             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10293             symbol_c *IN_type_symbol = NULL;
       
 10294             
       
 10295             /* Get the value from a foo(<param_value>) style call */
       
 10296             if (IN_param_value == NULL)
       
 10297               IN_param_value = function_call_param_iterator.next_nf();
       
 10298             if (IN_param_value != NULL) {
       
 10299               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10300               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10301             }
       
 10302             
       
 10303             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10304             {
       
 10305         
       
 10306                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10307                 
       
 10308                 if (IN_type_symbol == NULL)
       
 10309                   IN_type_symbol = last_type_symbol;
       
 10310                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10311                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10312                 function_type_prefix = return_type_symbol;
       
 10313                 break;
       
 10314                 
       
 10315             }
       
 10316             
       
 10317             
       
 10318             ERROR;
       
 10319         }
       
 10320         
       
 10321     }/*function_lreal_to_dt*/
       
 10322     break;
       
 10323 
       
 10324 /****
       
 10325  *LREAL_TO_TOD
       
 10326  */
       
 10327     case function_lreal_to_tod :
       
 10328     {
       
 10329         symbol_c *last_type_symbol = NULL;
       
 10330 
       
 10331         {
       
 10332             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10333             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10334             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10335             symbol_c *IN_type_symbol = NULL;
       
 10336             
       
 10337             /* Get the value from a foo(<param_value>) style call */
       
 10338             if (IN_param_value == NULL)
       
 10339               IN_param_value = function_call_param_iterator.next_nf();
       
 10340             if (IN_param_value != NULL) {
       
 10341               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10342               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10343             }
       
 10344             
       
 10345             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10346             {
       
 10347         
       
 10348                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10349                 
       
 10350                 if (IN_type_symbol == NULL)
       
 10351                   IN_type_symbol = last_type_symbol;
       
 10352                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10353                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10354                 function_type_prefix = return_type_symbol;
       
 10355                 break;
       
 10356                 
       
 10357             }
       
 10358             
       
 10359             
       
 10360             ERROR;
       
 10361         }
       
 10362         
       
 10363     }/*function_lreal_to_tod*/
       
 10364     break;
       
 10365 
       
 10366 /****
       
 10367  *LREAL_TO_UDINT
       
 10368  */
       
 10369     case function_lreal_to_udint :
       
 10370     {
       
 10371         symbol_c *last_type_symbol = NULL;
       
 10372 
       
 10373         {
       
 10374             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10376             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10377             symbol_c *IN_type_symbol = NULL;
       
 10378             
       
 10379             /* Get the value from a foo(<param_value>) style call */
       
 10380             if (IN_param_value == NULL)
       
 10381               IN_param_value = function_call_param_iterator.next_nf();
       
 10382             if (IN_param_value != NULL) {
       
 10383               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10384               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10385             }
       
 10386             
       
 10387             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10388             {
       
 10389         
       
 10390                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10391                 
       
 10392                 if (IN_type_symbol == NULL)
       
 10393                   IN_type_symbol = last_type_symbol;
       
 10394                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10395                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10396                 function_type_prefix = return_type_symbol;
       
 10397                 function_type_suffix = IN_type_symbol;
       
 10398                 break;
       
 10399                 
       
 10400             }
       
 10401             
       
 10402             
       
 10403             ERROR;
       
 10404         }
       
 10405         
       
 10406     }/*function_lreal_to_udint*/
       
 10407     break;
       
 10408 
       
 10409 /****
       
 10410  *LREAL_TO_WORD
       
 10411  */
       
 10412     case function_lreal_to_word :
       
 10413     {
       
 10414         symbol_c *last_type_symbol = NULL;
       
 10415 
       
 10416         {
       
 10417             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10419             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10420             symbol_c *IN_type_symbol = NULL;
       
 10421             
       
 10422             /* Get the value from a foo(<param_value>) style call */
       
 10423             if (IN_param_value == NULL)
       
 10424               IN_param_value = function_call_param_iterator.next_nf();
       
 10425             if (IN_param_value != NULL) {
       
 10426               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10427               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10428             }
       
 10429             
       
 10430             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10431             {
       
 10432         
       
 10433                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10434                 
       
 10435                 if (IN_type_symbol == NULL)
       
 10436                   IN_type_symbol = last_type_symbol;
       
 10437                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10438                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10439                 function_type_prefix = return_type_symbol;
       
 10440                 function_type_suffix = IN_type_symbol;
       
 10441                 break;
       
 10442                 
       
 10443             }
       
 10444             
       
 10445             
       
 10446             ERROR;
       
 10447         }
       
 10448         
       
 10449     }/*function_lreal_to_word*/
       
 10450     break;
       
 10451 
       
 10452 /****
       
 10453  *LREAL_TO_STRING
       
 10454  */
       
 10455     case function_lreal_to_string :
       
 10456     {
       
 10457         symbol_c *last_type_symbol = NULL;
       
 10458 
       
 10459         {
       
 10460             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10462             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10463             symbol_c *IN_type_symbol = NULL;
       
 10464             
       
 10465             /* Get the value from a foo(<param_value>) style call */
       
 10466             if (IN_param_value == NULL)
       
 10467               IN_param_value = function_call_param_iterator.next_nf();
       
 10468             if (IN_param_value != NULL) {
       
 10469               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10470               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10471             }
       
 10472             
       
 10473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10474             {
       
 10475         
       
 10476                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
       
 10477                 
       
 10478                 if (IN_type_symbol == NULL)
       
 10479                   IN_type_symbol = last_type_symbol;
       
 10480                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10481                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10482                 function_type_prefix = return_type_symbol;
       
 10483                 break;
       
 10484                 
       
 10485             }
       
 10486             
       
 10487             
       
 10488             ERROR;
       
 10489         }
       
 10490         
       
 10491     }/*function_lreal_to_string*/
       
 10492     break;
       
 10493 
       
 10494 /****
       
 10495  *LREAL_TO_LWORD
       
 10496  */
       
 10497     case function_lreal_to_lword :
       
 10498     {
       
 10499         symbol_c *last_type_symbol = NULL;
       
 10500 
       
 10501         {
       
 10502             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10503             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10504             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10505             symbol_c *IN_type_symbol = NULL;
       
 10506             
       
 10507             /* Get the value from a foo(<param_value>) style call */
       
 10508             if (IN_param_value == NULL)
       
 10509               IN_param_value = function_call_param_iterator.next_nf();
       
 10510             if (IN_param_value != NULL) {
       
 10511               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10512               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10513             }
       
 10514             
       
 10515             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10516             {
       
 10517         
       
 10518                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10519                 
       
 10520                 if (IN_type_symbol == NULL)
       
 10521                   IN_type_symbol = last_type_symbol;
       
 10522                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10523                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10524                 function_type_prefix = return_type_symbol;
       
 10525                 function_type_suffix = IN_type_symbol;
       
 10526                 break;
       
 10527                 
       
 10528             }
       
 10529             
       
 10530             
       
 10531             ERROR;
       
 10532         }
       
 10533         
       
 10534     }/*function_lreal_to_lword*/
       
 10535     break;
       
 10536 
       
 10537 /****
       
 10538  *LREAL_TO_UINT
       
 10539  */
       
 10540     case function_lreal_to_uint :
       
 10541     {
       
 10542         symbol_c *last_type_symbol = NULL;
       
 10543 
       
 10544         {
       
 10545             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10546             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10547             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10548             symbol_c *IN_type_symbol = NULL;
       
 10549             
       
 10550             /* Get the value from a foo(<param_value>) style call */
       
 10551             if (IN_param_value == NULL)
       
 10552               IN_param_value = function_call_param_iterator.next_nf();
       
 10553             if (IN_param_value != NULL) {
       
 10554               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10555               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10556             }
       
 10557             
       
 10558             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10559             {
       
 10560         
       
 10561                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10562                 
       
 10563                 if (IN_type_symbol == NULL)
       
 10564                   IN_type_symbol = last_type_symbol;
       
 10565                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10566                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10567                 function_type_prefix = return_type_symbol;
       
 10568                 function_type_suffix = IN_type_symbol;
       
 10569                 break;
       
 10570                 
       
 10571             }
       
 10572             
       
 10573             
       
 10574             ERROR;
       
 10575         }
       
 10576         
       
 10577     }/*function_lreal_to_uint*/
       
 10578     break;
       
 10579 
       
 10580 /****
       
 10581  *LREAL_TO_BYTE
       
 10582  */
       
 10583     case function_lreal_to_byte :
       
 10584     {
       
 10585         symbol_c *last_type_symbol = NULL;
       
 10586 
       
 10587         {
       
 10588             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10590             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10591             symbol_c *IN_type_symbol = NULL;
       
 10592             
       
 10593             /* Get the value from a foo(<param_value>) style call */
       
 10594             if (IN_param_value == NULL)
       
 10595               IN_param_value = function_call_param_iterator.next_nf();
       
 10596             if (IN_param_value != NULL) {
       
 10597               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10598               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10599             }
       
 10600             
       
 10601             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10602             {
       
 10603         
       
 10604                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10605                 
       
 10606                 if (IN_type_symbol == NULL)
       
 10607                   IN_type_symbol = last_type_symbol;
       
 10608                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10609                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10610                 function_type_prefix = return_type_symbol;
       
 10611                 function_type_suffix = IN_type_symbol;
       
 10612                 break;
       
 10613                 
       
 10614             }
       
 10615             
       
 10616             
       
 10617             ERROR;
       
 10618         }
       
 10619         
       
 10620     }/*function_lreal_to_byte*/
       
 10621     break;
       
 10622 
       
 10623 /****
       
 10624  *LREAL_TO_USINT
       
 10625  */
       
 10626     case function_lreal_to_usint :
       
 10627     {
       
 10628         symbol_c *last_type_symbol = NULL;
       
 10629 
       
 10630         {
       
 10631             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10633             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10634             symbol_c *IN_type_symbol = NULL;
       
 10635             
       
 10636             /* Get the value from a foo(<param_value>) style call */
       
 10637             if (IN_param_value == NULL)
       
 10638               IN_param_value = function_call_param_iterator.next_nf();
       
 10639             if (IN_param_value != NULL) {
       
 10640               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10641               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10642             }
       
 10643             
       
 10644             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10645             {
       
 10646         
       
 10647                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10648                 
       
 10649                 if (IN_type_symbol == NULL)
       
 10650                   IN_type_symbol = last_type_symbol;
       
 10651                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10652                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10653                 function_type_prefix = return_type_symbol;
       
 10654                 function_type_suffix = IN_type_symbol;
       
 10655                 break;
       
 10656                 
       
 10657             }
       
 10658             
       
 10659             
       
 10660             ERROR;
       
 10661         }
       
 10662         
       
 10663     }/*function_lreal_to_usint*/
       
 10664     break;
       
 10665 
       
 10666 /****
       
 10667  *LREAL_TO_ULINT
       
 10668  */
       
 10669     case function_lreal_to_ulint :
       
 10670     {
       
 10671         symbol_c *last_type_symbol = NULL;
       
 10672 
       
 10673         {
       
 10674             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10676             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10677             symbol_c *IN_type_symbol = NULL;
       
 10678             
       
 10679             /* Get the value from a foo(<param_value>) style call */
       
 10680             if (IN_param_value == NULL)
       
 10681               IN_param_value = function_call_param_iterator.next_nf();
       
 10682             if (IN_param_value != NULL) {
       
 10683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10685             }
       
 10686             
       
 10687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10688             {
       
 10689         
       
 10690                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10691                 
       
 10692                 if (IN_type_symbol == NULL)
       
 10693                   IN_type_symbol = last_type_symbol;
       
 10694                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10695                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10696                 function_type_prefix = return_type_symbol;
       
 10697                 function_type_suffix = IN_type_symbol;
       
 10698                 break;
       
 10699                 
       
 10700             }
       
 10701             
       
 10702             
       
 10703             ERROR;
       
 10704         }
       
 10705         
       
 10706     }/*function_lreal_to_ulint*/
       
 10707     break;
       
 10708 
       
 10709 /****
       
 10710  *LREAL_TO_BOOL
       
 10711  */
       
 10712     case function_lreal_to_bool :
       
 10713     {
       
 10714         symbol_c *last_type_symbol = NULL;
       
 10715 
       
 10716         {
       
 10717             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10718             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10719             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10720             symbol_c *IN_type_symbol = NULL;
       
 10721             
       
 10722             /* Get the value from a foo(<param_value>) style call */
       
 10723             if (IN_param_value == NULL)
       
 10724               IN_param_value = function_call_param_iterator.next_nf();
       
 10725             if (IN_param_value != NULL) {
       
 10726               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10727               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10728             }
       
 10729             
       
 10730             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10731             {
       
 10732         
       
 10733                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10734                 
       
 10735                 if (IN_type_symbol == NULL)
       
 10736                   IN_type_symbol = last_type_symbol;
       
 10737                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10738                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10739                 function_type_prefix = return_type_symbol;
       
 10740                 function_type_suffix = IN_type_symbol;
       
 10741                 break;
       
 10742                 
       
 10743             }
       
 10744             
       
 10745             
       
 10746             ERROR;
       
 10747         }
       
 10748         
       
 10749     }/*function_lreal_to_bool*/
       
 10750     break;
       
 10751 
       
 10752 /****
       
 10753  *LREAL_TO_TIME
       
 10754  */
       
 10755     case function_lreal_to_time :
       
 10756     {
       
 10757         symbol_c *last_type_symbol = NULL;
       
 10758 
       
 10759         {
       
 10760             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10761             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10762             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10763             symbol_c *IN_type_symbol = NULL;
       
 10764             
       
 10765             /* Get the value from a foo(<param_value>) style call */
       
 10766             if (IN_param_value == NULL)
       
 10767               IN_param_value = function_call_param_iterator.next_nf();
       
 10768             if (IN_param_value != NULL) {
       
 10769               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10770               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10771             }
       
 10772             
       
 10773             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10774             {
       
 10775         
       
 10776                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
       
 10777                 
       
 10778                 if (IN_type_symbol == NULL)
       
 10779                   IN_type_symbol = last_type_symbol;
       
 10780                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10781                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10782                 function_type_prefix = return_type_symbol;
       
 10783                 break;
       
 10784                 
       
 10785             }
       
 10786             
       
 10787             
       
 10788             ERROR;
       
 10789         }
       
 10790         
       
 10791     }/*function_lreal_to_time*/
       
 10792     break;
       
 10793 
       
 10794 /****
       
 10795  *LREAL_TO_INT
       
 10796  */
       
 10797     case function_lreal_to_int :
       
 10798     {
       
 10799         symbol_c *last_type_symbol = NULL;
       
 10800 
       
 10801         {
       
 10802             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 10803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10804             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 10805             symbol_c *IN_type_symbol = NULL;
       
 10806             
       
 10807             /* Get the value from a foo(<param_value>) style call */
       
 10808             if (IN_param_value == NULL)
       
 10809               IN_param_value = function_call_param_iterator.next_nf();
       
 10810             if (IN_param_value != NULL) {
       
 10811               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10812               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10813             }
       
 10814             
       
 10815             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 10816             {
       
 10817         
       
 10818                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 10819                 
       
 10820                 if (IN_type_symbol == NULL)
       
 10821                   IN_type_symbol = last_type_symbol;
       
 10822                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 10823                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10824                 function_type_prefix = return_type_symbol;
       
 10825                 function_type_suffix = IN_type_symbol;
       
 10826                 break;
 10800                 break;
 10827                 
 10801                 
 10828             }
 10802             }
 10829             
 10803             
 10830             
 10804             
 16688         
 16662         
 16689     }/*function_add*/
 16663     }/*function_add*/
 16690     break;
 16664     break;
 16691 
 16665 
 16692 /****
 16666 /****
 16693  *ADD_TIME
       
 16694  */
       
 16695     case function_add_time :
       
 16696     {
       
 16697         symbol_c *last_type_symbol = NULL;
       
 16698 
       
 16699         {
       
 16700             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 16701             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16702             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 16703             symbol_c *IN1_type_symbol = NULL;
       
 16704             
       
 16705             /* Get the value from a foo(<param_value>) style call */
       
 16706             if (IN1_param_value == NULL)
       
 16707               IN1_param_value = function_call_param_iterator.next_nf();
       
 16708             if (IN1_param_value != NULL) {
       
 16709               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16710               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16711             }
       
 16712             
       
 16713             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 16714             {
       
 16715         
       
 16716                 {
       
 16717                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16718                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16719                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16720                     symbol_c *IN2_type_symbol = NULL;
       
 16721                     
       
 16722                     /* Get the value from a foo(<param_value>) style call */
       
 16723                     if (IN2_param_value == NULL)
       
 16724                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16725                     if (IN2_param_value != NULL) {
       
 16726                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16727                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16728                     }
       
 16729                     
       
 16730                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 16731                     {
       
 16732                 
       
 16733                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 16734                         
       
 16735                         if (IN1_type_symbol == NULL)
       
 16736                           IN1_type_symbol = last_type_symbol;
       
 16737                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16738                         
       
 16739                         if (IN2_type_symbol == NULL)
       
 16740                           IN2_type_symbol = last_type_symbol;
       
 16741                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16742                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16743                         break;
       
 16744                         
       
 16745                     }
       
 16746                     
       
 16747                     
       
 16748                     ERROR;
       
 16749                 }
       
 16750                 
       
 16751             }
       
 16752             
       
 16753             
       
 16754             ERROR;
       
 16755         }
       
 16756         
       
 16757     }/*function_add_time*/
       
 16758     break;
       
 16759 
       
 16760 /****
       
 16761  *ADD_TOD_TIME
       
 16762  */
       
 16763     case function_add_tod_time :
       
 16764     {
       
 16765         symbol_c *last_type_symbol = NULL;
       
 16766 
       
 16767         {
       
 16768             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 16769             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16770             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 16771             symbol_c *IN1_type_symbol = NULL;
       
 16772             
       
 16773             /* Get the value from a foo(<param_value>) style call */
       
 16774             if (IN1_param_value == NULL)
       
 16775               IN1_param_value = function_call_param_iterator.next_nf();
       
 16776             if (IN1_param_value != NULL) {
       
 16777               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16778               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16779             }
       
 16780             
       
 16781             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 16782             {
       
 16783         
       
 16784                 {
       
 16785                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16786                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16787                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16788                     symbol_c *IN2_type_symbol = NULL;
       
 16789                     
       
 16790                     /* Get the value from a foo(<param_value>) style call */
       
 16791                     if (IN2_param_value == NULL)
       
 16792                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16793                     if (IN2_param_value != NULL) {
       
 16794                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16795                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16796                     }
       
 16797                     
       
 16798                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 16799                     {
       
 16800                 
       
 16801                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 16802                         
       
 16803                         if (IN1_type_symbol == NULL)
       
 16804                           IN1_type_symbol = last_type_symbol;
       
 16805                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16806                         
       
 16807                         if (IN2_type_symbol == NULL)
       
 16808                           IN2_type_symbol = last_type_symbol;
       
 16809                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16810                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16811                         break;
       
 16812                         
       
 16813                     }
       
 16814                     
       
 16815                     
       
 16816                     ERROR;
       
 16817                 }
       
 16818                 
       
 16819             }
       
 16820             
       
 16821             
       
 16822             ERROR;
       
 16823         }
       
 16824         
       
 16825     }/*function_add_tod_time*/
       
 16826     break;
       
 16827 
       
 16828 /****
       
 16829  *ADD_DT_TIME
       
 16830  */
       
 16831     case function_add_dt_time :
       
 16832     {
       
 16833         symbol_c *last_type_symbol = NULL;
       
 16834 
       
 16835         {
       
 16836             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 16837             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16838             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 16839             symbol_c *IN1_type_symbol = NULL;
       
 16840             
       
 16841             /* Get the value from a foo(<param_value>) style call */
       
 16842             if (IN1_param_value == NULL)
       
 16843               IN1_param_value = function_call_param_iterator.next_nf();
       
 16844             if (IN1_param_value != NULL) {
       
 16845               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16846               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16847             }
       
 16848             
       
 16849             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 16850             {
       
 16851         
       
 16852                 {
       
 16853                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16854                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16855                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16856                     symbol_c *IN2_type_symbol = NULL;
       
 16857                     
       
 16858                     /* Get the value from a foo(<param_value>) style call */
       
 16859                     if (IN2_param_value == NULL)
       
 16860                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16861                     if (IN2_param_value != NULL) {
       
 16862                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16863                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16864                     }
       
 16865                     
       
 16866                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 16867                     {
       
 16868                 
       
 16869                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 16870                         
       
 16871                         if (IN1_type_symbol == NULL)
       
 16872                           IN1_type_symbol = last_type_symbol;
       
 16873                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16874                         
       
 16875                         if (IN2_type_symbol == NULL)
       
 16876                           IN2_type_symbol = last_type_symbol;
       
 16877                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16878                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16879                         break;
       
 16880                         
       
 16881                     }
       
 16882                     
       
 16883                     
       
 16884                     ERROR;
       
 16885                 }
       
 16886                 
       
 16887             }
       
 16888             
       
 16889             
       
 16890             ERROR;
       
 16891         }
       
 16892         
       
 16893     }/*function_add_dt_time*/
       
 16894     break;
       
 16895 
       
 16896 /****
       
 16897  *MUL
 16667  *MUL
 16898  */
 16668  */
 16899     case function_mul :
 16669     case function_mul :
 16900     {
 16670     {
 16901         symbol_c *last_type_symbol = NULL;
 16671         symbol_c *last_type_symbol = NULL;
 17034         
 16804         
 17035     }/*function_mul*/
 16805     }/*function_mul*/
 17036     break;
 16806     break;
 17037 
 16807 
 17038 /****
 16808 /****
       
 16809  *SUB
       
 16810  */
       
 16811     case function_sub :
       
 16812     {
       
 16813         symbol_c *last_type_symbol = NULL;
       
 16814 
       
 16815         {
       
 16816             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 16817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16818             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 16819             symbol_c *IN1_type_symbol = NULL;
       
 16820             
       
 16821             /* Get the value from a foo(<param_value>) style call */
       
 16822             if (IN1_param_value == NULL)
       
 16823               IN1_param_value = function_call_param_iterator.next_nf();
       
 16824             if (IN1_param_value != NULL) {
       
 16825               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16826               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16827             }
       
 16828             
       
 16829             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 16830             {
       
 16831         
       
 16832                 {
       
 16833                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16834                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16835                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16836                     symbol_c *IN2_type_symbol = NULL;
       
 16837                     
       
 16838                     /* Get the value from a foo(<param_value>) style call */
       
 16839                     if (IN2_param_value == NULL)
       
 16840                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16841                     if (IN2_param_value != NULL) {
       
 16842                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16843                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16844                     }
       
 16845                     
       
 16846                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 16847                     {
       
 16848                 
       
 16849                         function_name = (symbol_c*)(new pragma_c("__sub_"));
       
 16850                         
       
 16851                         if (IN1_type_symbol == NULL)
       
 16852                           IN1_type_symbol = last_type_symbol;
       
 16853                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16854                         
       
 16855                         if (IN2_type_symbol == NULL)
       
 16856                           IN2_type_symbol = last_type_symbol;
       
 16857                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16858                         symbol_c * return_type_symbol = last_type_symbol;
       
 16859                         function_type_suffix = return_type_symbol;
       
 16860                         break;
       
 16861                         
       
 16862                     }
       
 16863                     
       
 16864                     
       
 16865                     ERROR;
       
 16866                 }
       
 16867                 
       
 16868             }
       
 16869             
       
 16870             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 16871             {
       
 16872         
       
 16873                 {
       
 16874                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16875                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16876                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16877                     symbol_c *IN2_type_symbol = NULL;
       
 16878                     
       
 16879                     /* Get the value from a foo(<param_value>) style call */
       
 16880                     if (IN2_param_value == NULL)
       
 16881                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16882                     if (IN2_param_value != NULL) {
       
 16883                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16884                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16885                     }
       
 16886                     
       
 16887                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 16888                     {
       
 16889                 
       
 16890                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 16891                         
       
 16892                         if (IN1_type_symbol == NULL)
       
 16893                           IN1_type_symbol = last_type_symbol;
       
 16894                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16895                         
       
 16896                         if (IN2_type_symbol == NULL)
       
 16897                           IN2_type_symbol = last_type_symbol;
       
 16898                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16899                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16900                         break;
       
 16901                         
       
 16902                     }
       
 16903                     
       
 16904                     
       
 16905                     ERROR;
       
 16906                 }
       
 16907                 
       
 16908             }
       
 16909             
       
 16910             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 16911             {
       
 16912         
       
 16913                 {
       
 16914                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16915                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16916                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16917                     symbol_c *IN2_type_symbol = NULL;
       
 16918                     
       
 16919                     /* Get the value from a foo(<param_value>) style call */
       
 16920                     if (IN2_param_value == NULL)
       
 16921                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16922                     if (IN2_param_value != NULL) {
       
 16923                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16924                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16925                     }
       
 16926                     
       
 16927                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 16928                     {
       
 16929                 
       
 16930                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 16931                         
       
 16932                         if (IN1_type_symbol == NULL)
       
 16933                           IN1_type_symbol = last_type_symbol;
       
 16934                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16935                         
       
 16936                         if (IN2_type_symbol == NULL)
       
 16937                           IN2_type_symbol = last_type_symbol;
       
 16938                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16939                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16940                         break;
       
 16941                         
       
 16942                     }
       
 16943                     
       
 16944                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 16945                     {
       
 16946                 
       
 16947                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 16948                         
       
 16949                         if (IN1_type_symbol == NULL)
       
 16950                           IN1_type_symbol = last_type_symbol;
       
 16951                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16952                         
       
 16953                         if (IN2_type_symbol == NULL)
       
 16954                           IN2_type_symbol = last_type_symbol;
       
 16955                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16956                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16957                         break;
       
 16958                         
       
 16959                     }
       
 16960                     
       
 16961                     
       
 16962                     ERROR;
       
 16963                 }
       
 16964                 
       
 16965             }
       
 16966             
       
 16967             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 16968             {
       
 16969         
       
 16970                 {
       
 16971                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 16972                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16973                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 16974                     symbol_c *IN2_type_symbol = NULL;
       
 16975                     
       
 16976                     /* Get the value from a foo(<param_value>) style call */
       
 16977                     if (IN2_param_value == NULL)
       
 16978                       IN2_param_value = function_call_param_iterator.next_nf();
       
 16979                     if (IN2_param_value != NULL) {
       
 16980                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16981                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16982                     }
       
 16983                     
       
 16984                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 16985                     {
       
 16986                 
       
 16987                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 16988                         
       
 16989                         if (IN1_type_symbol == NULL)
       
 16990                           IN1_type_symbol = last_type_symbol;
       
 16991                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 16992                         
       
 16993                         if (IN2_type_symbol == NULL)
       
 16994                           IN2_type_symbol = last_type_symbol;
       
 16995                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 16996                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16997                         break;
       
 16998                         
       
 16999                     }
       
 17000                     
       
 17001                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17002                     {
       
 17003                 
       
 17004                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17005                         
       
 17006                         if (IN1_type_symbol == NULL)
       
 17007                           IN1_type_symbol = last_type_symbol;
       
 17008                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17009                         
       
 17010                         if (IN2_type_symbol == NULL)
       
 17011                           IN2_type_symbol = last_type_symbol;
       
 17012                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17013                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17014                         break;
       
 17015                         
       
 17016                     }
       
 17017                     
       
 17018                     
       
 17019                     ERROR;
       
 17020                 }
       
 17021                 
       
 17022             }
       
 17023             
       
 17024             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17025             {
       
 17026         
       
 17027                 {
       
 17028                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17029                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17030                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17031                     symbol_c *IN2_type_symbol = NULL;
       
 17032                     
       
 17033                     /* Get the value from a foo(<param_value>) style call */
       
 17034                     if (IN2_param_value == NULL)
       
 17035                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17036                     if (IN2_param_value != NULL) {
       
 17037                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17038                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17039                     }
       
 17040                     
       
 17041                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17042                     {
       
 17043                 
       
 17044                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17045                         
       
 17046                         if (IN1_type_symbol == NULL)
       
 17047                           IN1_type_symbol = last_type_symbol;
       
 17048                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17049                         
       
 17050                         if (IN2_type_symbol == NULL)
       
 17051                           IN2_type_symbol = last_type_symbol;
       
 17052                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17053                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17054                         break;
       
 17055                         
       
 17056                     }
       
 17057                     
       
 17058                     
       
 17059                     ERROR;
       
 17060                 }
       
 17061                 
       
 17062             }
       
 17063             
       
 17064             
       
 17065             ERROR;
       
 17066         }
       
 17067         
       
 17068     }/*function_sub*/
       
 17069     break;
       
 17070 
       
 17071 /****
       
 17072  *DIV
       
 17073  */
       
 17074     case function_div :
       
 17075     {
       
 17076         symbol_c *last_type_symbol = NULL;
       
 17077 
       
 17078         {
       
 17079             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17081             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17082             symbol_c *IN1_type_symbol = NULL;
       
 17083             
       
 17084             /* Get the value from a foo(<param_value>) style call */
       
 17085             if (IN1_param_value == NULL)
       
 17086               IN1_param_value = function_call_param_iterator.next_nf();
       
 17087             if (IN1_param_value != NULL) {
       
 17088               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17089               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17090             }
       
 17091             
       
 17092             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 17093             {
       
 17094         
       
 17095                 {
       
 17096                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17097                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17098                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17099                     symbol_c *IN2_type_symbol = NULL;
       
 17100                     
       
 17101                     /* Get the value from a foo(<param_value>) style call */
       
 17102                     if (IN2_param_value == NULL)
       
 17103                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17104                     if (IN2_param_value != NULL) {
       
 17105                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17106                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17107                     }
       
 17108                     
       
 17109                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17110                     {
       
 17111                 
       
 17112                         function_name = (symbol_c*)(new pragma_c("__div_"));
       
 17113                         
       
 17114                         if (IN1_type_symbol == NULL)
       
 17115                           IN1_type_symbol = last_type_symbol;
       
 17116                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17117                         
       
 17118                         if (IN2_type_symbol == NULL)
       
 17119                           IN2_type_symbol = last_type_symbol;
       
 17120                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17121                         symbol_c * return_type_symbol = last_type_symbol;
       
 17122                         function_type_suffix = return_type_symbol;
       
 17123                         break;
       
 17124                         
       
 17125                     }
       
 17126                     
       
 17127                     
       
 17128                     ERROR;
       
 17129                 }
       
 17130                 
       
 17131             }
       
 17132             
       
 17133             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17134             {
       
 17135         
       
 17136                 {
       
 17137                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17138                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17139                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17140                     symbol_c *IN2_type_symbol = NULL;
       
 17141                     
       
 17142                     /* Get the value from a foo(<param_value>) style call */
       
 17143                     if (IN2_param_value == NULL)
       
 17144                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17145                     if (IN2_param_value != NULL) {
       
 17146                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17147                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17148                     }
       
 17149                     
       
 17150                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17151                     {
       
 17152                 
       
 17153                         function_name = (symbol_c*)(new pragma_c("__time_div"));
       
 17154                         
       
 17155                         if (IN1_type_symbol == NULL)
       
 17156                           IN1_type_symbol = last_type_symbol;
       
 17157                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17158                         
       
 17159                         if (IN2_type_symbol == NULL)
       
 17160                           IN2_type_symbol = last_type_symbol;
       
 17161                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17162                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17163                         if (search_expression_type->is_literal_integer_type(function_type_suffix))
       
 17164                             function_type_suffix = &search_constant_type_c::lint_type_name;
       
 17165                         break;
       
 17166                         
       
 17167                     }
       
 17168                     
       
 17169                     
       
 17170                     ERROR;
       
 17171                 }
       
 17172                 
       
 17173             }
       
 17174             
       
 17175             
       
 17176             ERROR;
       
 17177         }
       
 17178         
       
 17179     }/*function_div*/
       
 17180     break;
       
 17181 
       
 17182 /****
       
 17183  *MOD
       
 17184  */
       
 17185     case function_mod :
       
 17186     {
       
 17187         symbol_c *last_type_symbol = NULL;
       
 17188 
       
 17189         {
       
 17190             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17191             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17192             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17193             symbol_c *IN1_type_symbol = NULL;
       
 17194             
       
 17195             /* Get the value from a foo(<param_value>) style call */
       
 17196             if (IN1_param_value == NULL)
       
 17197               IN1_param_value = function_call_param_iterator.next_nf();
       
 17198             if (IN1_param_value != NULL) {
       
 17199               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17200               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17201             }
       
 17202             
       
 17203             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 17204             {
       
 17205         
       
 17206                 {
       
 17207                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17208                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17209                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17210                     symbol_c *IN2_type_symbol = NULL;
       
 17211                     
       
 17212                     /* Get the value from a foo(<param_value>) style call */
       
 17213                     if (IN2_param_value == NULL)
       
 17214                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17215                     if (IN2_param_value != NULL) {
       
 17216                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17217                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17218                     }
       
 17219                     
       
 17220                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17221                     {
       
 17222                 
       
 17223                         function_name = (symbol_c*)(new pragma_c("__mod_"));
       
 17224                         
       
 17225                         if (IN1_type_symbol == NULL)
       
 17226                           IN1_type_symbol = last_type_symbol;
       
 17227                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17228                         
       
 17229                         if (IN2_type_symbol == NULL)
       
 17230                           IN2_type_symbol = last_type_symbol;
       
 17231                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17232                         symbol_c * return_type_symbol = last_type_symbol;
       
 17233                         function_type_suffix = return_type_symbol;
       
 17234                         break;
       
 17235                         
       
 17236                     }
       
 17237                     
       
 17238                     
       
 17239                     ERROR;
       
 17240                 }
       
 17241                 
       
 17242             }
       
 17243             
       
 17244             
       
 17245             ERROR;
       
 17246         }
       
 17247         
       
 17248     }/*function_mod*/
       
 17249     break;
       
 17250 
       
 17251 /****
       
 17252  *EXPT
       
 17253  */
       
 17254     case function_expt :
       
 17255     {
       
 17256         symbol_c *last_type_symbol = NULL;
       
 17257 
       
 17258         {
       
 17259             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17261             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17262             symbol_c *IN1_type_symbol = NULL;
       
 17263             
       
 17264             /* Get the value from a foo(<param_value>) style call */
       
 17265             if (IN1_param_value == NULL)
       
 17266               IN1_param_value = function_call_param_iterator.next_nf();
       
 17267             if (IN1_param_value != NULL) {
       
 17268               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17269               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17270             }
       
 17271             
       
 17272             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
       
 17273             {
       
 17274         
       
 17275                 {
       
 17276                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17277                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17278                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17279                     symbol_c *IN2_type_symbol = NULL;
       
 17280                     
       
 17281                     /* Get the value from a foo(<param_value>) style call */
       
 17282                     if (IN2_param_value == NULL)
       
 17283                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17284                     if (IN2_param_value != NULL) {
       
 17285                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17286                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17287                     }
       
 17288                     
       
 17289                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17290                     {
       
 17291                 
       
 17292                         function_name = (symbol_c*)(new pragma_c("__expt_"));
       
 17293                         
       
 17294                         if (IN1_type_symbol == NULL)
       
 17295                           IN1_type_symbol = last_type_symbol;
       
 17296                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17297                         
       
 17298                         if (IN2_type_symbol == NULL)
       
 17299                           IN2_type_symbol = last_type_symbol;
       
 17300                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17301                         symbol_c * return_type_symbol = last_type_symbol;
       
 17302                         function_type_suffix = IN1_type_symbol;
       
 17303                         break;
       
 17304                         
       
 17305                     }
       
 17306                     
       
 17307                     
       
 17308                     ERROR;
       
 17309                 }
       
 17310                 
       
 17311             }
       
 17312             
       
 17313             
       
 17314             ERROR;
       
 17315         }
       
 17316         
       
 17317     }/*function_expt*/
       
 17318     break;
       
 17319 
       
 17320 /****
       
 17321  *MOVE
       
 17322  */
       
 17323     case function_move :
       
 17324     {
       
 17325         symbol_c *last_type_symbol = NULL;
       
 17326 
       
 17327         {
       
 17328             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 17329             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17330             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 17331             symbol_c *IN_type_symbol = NULL;
       
 17332             
       
 17333             /* Get the value from a foo(<param_value>) style call */
       
 17334             if (IN_param_value == NULL)
       
 17335               IN_param_value = function_call_param_iterator.next_nf();
       
 17336             if (IN_param_value != NULL) {
       
 17337               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 17338               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 17339             }
       
 17340             
       
 17341             
       
 17342             {
       
 17343         
       
 17344                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 17345                 
       
 17346                 if (IN_type_symbol == NULL)
       
 17347                   IN_type_symbol = last_type_symbol;
       
 17348                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 17349                 symbol_c * return_type_symbol = last_type_symbol;
       
 17350                 function_type_suffix = return_type_symbol;
       
 17351                 if (search_expression_type->is_literal_integer_type(function_type_suffix))
       
 17352                     function_type_suffix = &search_constant_type_c::lint_type_name;
       
 17353                 else if (search_expression_type->is_literal_real_type(function_type_suffix))
       
 17354                     function_type_suffix = &search_constant_type_c::lreal_type_name;
       
 17355                 break;
       
 17356                 
       
 17357             }
       
 17358             
       
 17359             
       
 17360             ERROR;
       
 17361         }
       
 17362         
       
 17363     }/*function_move*/
       
 17364     break;
       
 17365 
       
 17366 /****
       
 17367  *ADD_TIME
       
 17368  */
       
 17369     case function_add_time :
       
 17370     {
       
 17371         symbol_c *last_type_symbol = NULL;
       
 17372 
       
 17373         {
       
 17374             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17376             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17377             symbol_c *IN1_type_symbol = NULL;
       
 17378             
       
 17379             /* Get the value from a foo(<param_value>) style call */
       
 17380             if (IN1_param_value == NULL)
       
 17381               IN1_param_value = function_call_param_iterator.next_nf();
       
 17382             if (IN1_param_value != NULL) {
       
 17383               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17384               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17385             }
       
 17386             
       
 17387             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17388             {
       
 17389         
       
 17390                 {
       
 17391                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17392                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17393                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17394                     symbol_c *IN2_type_symbol = NULL;
       
 17395                     
       
 17396                     /* Get the value from a foo(<param_value>) style call */
       
 17397                     if (IN2_param_value == NULL)
       
 17398                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17399                     if (IN2_param_value != NULL) {
       
 17400                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17401                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17402                     }
       
 17403                     
       
 17404                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17405                     {
       
 17406                 
       
 17407                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 17408                         
       
 17409                         if (IN1_type_symbol == NULL)
       
 17410                           IN1_type_symbol = last_type_symbol;
       
 17411                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17412                         
       
 17413                         if (IN2_type_symbol == NULL)
       
 17414                           IN2_type_symbol = last_type_symbol;
       
 17415                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17416                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17417                         break;
       
 17418                         
       
 17419                     }
       
 17420                     
       
 17421                     
       
 17422                     ERROR;
       
 17423                 }
       
 17424                 
       
 17425             }
       
 17426             
       
 17427             
       
 17428             ERROR;
       
 17429         }
       
 17430         
       
 17431     }/*function_add_time*/
       
 17432     break;
       
 17433 
       
 17434 /****
       
 17435  *ADD_TOD_TIME
       
 17436  */
       
 17437     case function_add_tod_time :
       
 17438     {
       
 17439         symbol_c *last_type_symbol = NULL;
       
 17440 
       
 17441         {
       
 17442             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17443             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17444             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17445             symbol_c *IN1_type_symbol = NULL;
       
 17446             
       
 17447             /* Get the value from a foo(<param_value>) style call */
       
 17448             if (IN1_param_value == NULL)
       
 17449               IN1_param_value = function_call_param_iterator.next_nf();
       
 17450             if (IN1_param_value != NULL) {
       
 17451               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17452               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17453             }
       
 17454             
       
 17455             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17456             {
       
 17457         
       
 17458                 {
       
 17459                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17461                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17462                     symbol_c *IN2_type_symbol = NULL;
       
 17463                     
       
 17464                     /* Get the value from a foo(<param_value>) style call */
       
 17465                     if (IN2_param_value == NULL)
       
 17466                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17467                     if (IN2_param_value != NULL) {
       
 17468                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17469                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17470                     }
       
 17471                     
       
 17472                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17473                     {
       
 17474                 
       
 17475                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 17476                         
       
 17477                         if (IN1_type_symbol == NULL)
       
 17478                           IN1_type_symbol = last_type_symbol;
       
 17479                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17480                         
       
 17481                         if (IN2_type_symbol == NULL)
       
 17482                           IN2_type_symbol = last_type_symbol;
       
 17483                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17484                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17485                         break;
       
 17486                         
       
 17487                     }
       
 17488                     
       
 17489                     
       
 17490                     ERROR;
       
 17491                 }
       
 17492                 
       
 17493             }
       
 17494             
       
 17495             
       
 17496             ERROR;
       
 17497         }
       
 17498         
       
 17499     }/*function_add_tod_time*/
       
 17500     break;
       
 17501 
       
 17502 /****
       
 17503  *ADD_DT_TIME
       
 17504  */
       
 17505     case function_add_dt_time :
       
 17506     {
       
 17507         symbol_c *last_type_symbol = NULL;
       
 17508 
       
 17509         {
       
 17510             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17511             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17512             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17513             symbol_c *IN1_type_symbol = NULL;
       
 17514             
       
 17515             /* Get the value from a foo(<param_value>) style call */
       
 17516             if (IN1_param_value == NULL)
       
 17517               IN1_param_value = function_call_param_iterator.next_nf();
       
 17518             if (IN1_param_value != NULL) {
       
 17519               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17520               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17521             }
       
 17522             
       
 17523             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17524             {
       
 17525         
       
 17526                 {
       
 17527                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17528                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17529                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17530                     symbol_c *IN2_type_symbol = NULL;
       
 17531                     
       
 17532                     /* Get the value from a foo(<param_value>) style call */
       
 17533                     if (IN2_param_value == NULL)
       
 17534                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17535                     if (IN2_param_value != NULL) {
       
 17536                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17537                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17538                     }
       
 17539                     
       
 17540                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17541                     {
       
 17542                 
       
 17543                         function_name = (symbol_c*)(new pragma_c("__time_add"));
       
 17544                         
       
 17545                         if (IN1_type_symbol == NULL)
       
 17546                           IN1_type_symbol = last_type_symbol;
       
 17547                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17548                         
       
 17549                         if (IN2_type_symbol == NULL)
       
 17550                           IN2_type_symbol = last_type_symbol;
       
 17551                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17552                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17553                         break;
       
 17554                         
       
 17555                     }
       
 17556                     
       
 17557                     
       
 17558                     ERROR;
       
 17559                 }
       
 17560                 
       
 17561             }
       
 17562             
       
 17563             
       
 17564             ERROR;
       
 17565         }
       
 17566         
       
 17567     }/*function_add_dt_time*/
       
 17568     break;
       
 17569 
       
 17570 /****
 17039  *MULTIME
 17571  *MULTIME
 17040  */
 17572  */
 17041     case function_multime :
 17573     case function_multime :
 17042     {
 17574     {
 17043         symbol_c *last_type_symbol = NULL;
 17575         symbol_c *last_type_symbol = NULL;
 17104         
 17636         
 17105     }/*function_multime*/
 17637     }/*function_multime*/
 17106     break;
 17638     break;
 17107 
 17639 
 17108 /****
 17640 /****
 17109  *SUB
 17641  *SUB_TIME
 17110  */
 17642  */
 17111     case function_sub :
 17643     case function_sub_time :
 17112     {
 17644     {
 17113         symbol_c *last_type_symbol = NULL;
 17645         symbol_c *last_type_symbol = NULL;
 17114 
 17646 
 17115         {
 17647         {
 17116             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 17648             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 17124             if (IN1_param_value != NULL) {
 17656             if (IN1_param_value != NULL) {
 17125               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17657               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17126               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 17658               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 17127             }
 17659             }
 17128             
 17660             
 17129             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 17661             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 17130             {
 17662             {
 17131         
 17663         
 17132                 {
 17664                 {
 17133                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 17665                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 17134                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17666                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17141                     if (IN2_param_value != NULL) {
 17673                     if (IN2_param_value != NULL) {
 17142                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17674                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17143                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 17675                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 17144                     }
 17676                     }
 17145                     
 17677                     
 17146                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 17678                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 17147                     {
       
 17148                 
       
 17149                         function_name = (symbol_c*)(new pragma_c("__sub_"));
       
 17150                         
       
 17151                         if (IN1_type_symbol == NULL)
       
 17152                           IN1_type_symbol = last_type_symbol;
       
 17153                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17154                         
       
 17155                         if (IN2_type_symbol == NULL)
       
 17156                           IN2_type_symbol = last_type_symbol;
       
 17157                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17158                         symbol_c * return_type_symbol = last_type_symbol;
       
 17159                         function_type_suffix = return_type_symbol;
       
 17160                         break;
       
 17161                         
       
 17162                     }
       
 17163                     
       
 17164                     
       
 17165                     ERROR;
       
 17166                 }
       
 17167                 
       
 17168             }
       
 17169             
       
 17170             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17171             {
       
 17172         
       
 17173                 {
       
 17174                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17175                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17176                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17177                     symbol_c *IN2_type_symbol = NULL;
       
 17178                     
       
 17179                     /* Get the value from a foo(<param_value>) style call */
       
 17180                     if (IN2_param_value == NULL)
       
 17181                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17182                     if (IN2_param_value != NULL) {
       
 17183                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17184                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17185                     }
       
 17186                     
       
 17187                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17188                     {
 17679                     {
 17189                 
 17680                 
 17190                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17681                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17191                         
 17682                         
 17192                         if (IN1_type_symbol == NULL)
 17683                         if (IN1_type_symbol == NULL)
 17205                     ERROR;
 17696                     ERROR;
 17206                 }
 17697                 }
 17207                 
 17698                 
 17208             }
 17699             }
 17209             
 17700             
 17210             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 17701             
       
 17702             ERROR;
       
 17703         }
       
 17704         
       
 17705     }/*function_sub_time*/
       
 17706     break;
       
 17707 
       
 17708 /****
       
 17709  *SUB_DATE_DATE
       
 17710  */
       
 17711     case function_sub_date_date :
       
 17712     {
       
 17713         symbol_c *last_type_symbol = NULL;
       
 17714 
       
 17715         {
       
 17716             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17717             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17718             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17719             symbol_c *IN1_type_symbol = NULL;
       
 17720             
       
 17721             /* Get the value from a foo(<param_value>) style call */
       
 17722             if (IN1_param_value == NULL)
       
 17723               IN1_param_value = function_call_param_iterator.next_nf();
       
 17724             if (IN1_param_value != NULL) {
       
 17725               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17726               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17727             }
       
 17728             
       
 17729             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 17211             {
 17730             {
 17212         
 17731         
 17213                 {
 17732                 {
 17214                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 17733                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 17215                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17734                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17222                     if (IN2_param_value != NULL) {
 17741                     if (IN2_param_value != NULL) {
 17223                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17742                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17224                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 17743                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 17225                     }
 17744                     }
 17226                     
 17745                     
 17227                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 17746                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 17228                     {
 17747                     {
 17229                 
 17748                 
 17230                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17749                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17231                         
 17750                         
 17232                         if (IN1_type_symbol == NULL)
 17751                         if (IN1_type_symbol == NULL)
 17239                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17758                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17240                         break;
 17759                         break;
 17241                         
 17760                         
 17242                     }
 17761                     }
 17243                     
 17762                     
       
 17763                     
       
 17764                     ERROR;
       
 17765                 }
       
 17766                 
       
 17767             }
       
 17768             
       
 17769             
       
 17770             ERROR;
       
 17771         }
       
 17772         
       
 17773     }/*function_sub_date_date*/
       
 17774     break;
       
 17775 
       
 17776 /****
       
 17777  *SUB_TOD_TIME
       
 17778  */
       
 17779     case function_sub_tod_time :
       
 17780     {
       
 17781         symbol_c *last_type_symbol = NULL;
       
 17782 
       
 17783         {
       
 17784             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17785             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17786             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17787             symbol_c *IN1_type_symbol = NULL;
       
 17788             
       
 17789             /* Get the value from a foo(<param_value>) style call */
       
 17790             if (IN1_param_value == NULL)
       
 17791               IN1_param_value = function_call_param_iterator.next_nf();
       
 17792             if (IN1_param_value != NULL) {
       
 17793               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17794               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17795             }
       
 17796             
       
 17797             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17798             {
       
 17799         
       
 17800                 {
       
 17801                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17802                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17803                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17804                     symbol_c *IN2_type_symbol = NULL;
       
 17805                     
       
 17806                     /* Get the value from a foo(<param_value>) style call */
       
 17807                     if (IN2_param_value == NULL)
       
 17808                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17809                     if (IN2_param_value != NULL) {
       
 17810                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17811                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17812                     }
       
 17813                     
       
 17814                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17815                     {
       
 17816                 
       
 17817                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17818                         
       
 17819                         if (IN1_type_symbol == NULL)
       
 17820                           IN1_type_symbol = last_type_symbol;
       
 17821                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17822                         
       
 17823                         if (IN2_type_symbol == NULL)
       
 17824                           IN2_type_symbol = last_type_symbol;
       
 17825                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17826                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17827                         break;
       
 17828                         
       
 17829                     }
       
 17830                     
       
 17831                     
       
 17832                     ERROR;
       
 17833                 }
       
 17834                 
       
 17835             }
       
 17836             
       
 17837             
       
 17838             ERROR;
       
 17839         }
       
 17840         
       
 17841     }/*function_sub_tod_time*/
       
 17842     break;
       
 17843 
       
 17844 /****
       
 17845  *SUB_TOD_TOD
       
 17846  */
       
 17847     case function_sub_tod_tod :
       
 17848     {
       
 17849         symbol_c *last_type_symbol = NULL;
       
 17850 
       
 17851         {
       
 17852             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17853             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17854             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17855             symbol_c *IN1_type_symbol = NULL;
       
 17856             
       
 17857             /* Get the value from a foo(<param_value>) style call */
       
 17858             if (IN1_param_value == NULL)
       
 17859               IN1_param_value = function_call_param_iterator.next_nf();
       
 17860             if (IN1_param_value != NULL) {
       
 17861               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17862               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17863             }
       
 17864             
       
 17865             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17866             {
       
 17867         
       
 17868                 {
       
 17869                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17870                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17871                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17872                     symbol_c *IN2_type_symbol = NULL;
       
 17873                     
       
 17874                     /* Get the value from a foo(<param_value>) style call */
       
 17875                     if (IN2_param_value == NULL)
       
 17876                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17877                     if (IN2_param_value != NULL) {
       
 17878                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17879                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17880                     }
       
 17881                     
       
 17882                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17883                     {
       
 17884                 
       
 17885                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17886                         
       
 17887                         if (IN1_type_symbol == NULL)
       
 17888                           IN1_type_symbol = last_type_symbol;
       
 17889                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17890                         
       
 17891                         if (IN2_type_symbol == NULL)
       
 17892                           IN2_type_symbol = last_type_symbol;
       
 17893                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17894                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17895                         break;
       
 17896                         
       
 17897                     }
       
 17898                     
       
 17899                     
       
 17900                     ERROR;
       
 17901                 }
       
 17902                 
       
 17903             }
       
 17904             
       
 17905             
       
 17906             ERROR;
       
 17907         }
       
 17908         
       
 17909     }/*function_sub_tod_tod*/
       
 17910     break;
       
 17911 
       
 17912 /****
       
 17913  *SUB_DT_TIME
       
 17914  */
       
 17915     case function_sub_dt_time :
       
 17916     {
       
 17917         symbol_c *last_type_symbol = NULL;
       
 17918 
       
 17919         {
       
 17920             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17921             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17922             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17923             symbol_c *IN1_type_symbol = NULL;
       
 17924             
       
 17925             /* Get the value from a foo(<param_value>) style call */
       
 17926             if (IN1_param_value == NULL)
       
 17927               IN1_param_value = function_call_param_iterator.next_nf();
       
 17928             if (IN1_param_value != NULL) {
       
 17929               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17930               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17931             }
       
 17932             
       
 17933             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17934             {
       
 17935         
       
 17936                 {
       
 17937                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17938                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17939                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17940                     symbol_c *IN2_type_symbol = NULL;
       
 17941                     
       
 17942                     /* Get the value from a foo(<param_value>) style call */
       
 17943                     if (IN2_param_value == NULL)
       
 17944                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17945                     if (IN2_param_value != NULL) {
       
 17946                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17947                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17948                     }
       
 17949                     
       
 17950                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17951                     {
       
 17952                 
       
 17953                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17954                         
       
 17955                         if (IN1_type_symbol == NULL)
       
 17956                           IN1_type_symbol = last_type_symbol;
       
 17957                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17958                         
       
 17959                         if (IN2_type_symbol == NULL)
       
 17960                           IN2_type_symbol = last_type_symbol;
       
 17961                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17962                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17963                         break;
       
 17964                         
       
 17965                     }
       
 17966                     
 17244                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 17967                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 17245                     {
 17968                     {
 17246                 
 17969                 
 17247                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17970                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
 17248                         
 17971                         
 17262                     ERROR;
 17985                     ERROR;
 17263                 }
 17986                 }
 17264                 
 17987                 
 17265             }
 17988             }
 17266             
 17989             
 17267             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 17990             
 17268             {
 17991             ERROR;
 17269         
 17992         }
 17270                 {
 17993         
 17271                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 17994     }/*function_sub_dt_time*/
 17272                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17995     break;
 17273                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
 17996 
 17274                     symbol_c *IN2_type_symbol = NULL;
 17997 /****
 17275                     
 17998  *DIVTIME
 17276                     /* Get the value from a foo(<param_value>) style call */
 17999  */
 17277                     if (IN2_param_value == NULL)
 18000     case function_divtime :
 17278                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17279                     if (IN2_param_value != NULL) {
       
 17280                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17281                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17282                     }
       
 17283                     
       
 17284                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17285                     {
       
 17286                 
       
 17287                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17288                         
       
 17289                         if (IN1_type_symbol == NULL)
       
 17290                           IN1_type_symbol = last_type_symbol;
       
 17291                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17292                         
       
 17293                         if (IN2_type_symbol == NULL)
       
 17294                           IN2_type_symbol = last_type_symbol;
       
 17295                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17296                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17297                         break;
       
 17298                         
       
 17299                     }
       
 17300                     
       
 17301                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17302                     {
       
 17303                 
       
 17304                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17305                         
       
 17306                         if (IN1_type_symbol == NULL)
       
 17307                           IN1_type_symbol = last_type_symbol;
       
 17308                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17309                         
       
 17310                         if (IN2_type_symbol == NULL)
       
 17311                           IN2_type_symbol = last_type_symbol;
       
 17312                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17313                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17314                         break;
       
 17315                         
       
 17316                     }
       
 17317                     
       
 17318                     
       
 17319                     ERROR;
       
 17320                 }
       
 17321                 
       
 17322             }
       
 17323             
       
 17324             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17325             {
       
 17326         
       
 17327                 {
       
 17328                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17329                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17330                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17331                     symbol_c *IN2_type_symbol = NULL;
       
 17332                     
       
 17333                     /* Get the value from a foo(<param_value>) style call */
       
 17334                     if (IN2_param_value == NULL)
       
 17335                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17336                     if (IN2_param_value != NULL) {
       
 17337                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17338                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17339                     }
       
 17340                     
       
 17341                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17342                     {
       
 17343                 
       
 17344                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17345                         
       
 17346                         if (IN1_type_symbol == NULL)
       
 17347                           IN1_type_symbol = last_type_symbol;
       
 17348                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17349                         
       
 17350                         if (IN2_type_symbol == NULL)
       
 17351                           IN2_type_symbol = last_type_symbol;
       
 17352                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17353                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17354                         break;
       
 17355                         
       
 17356                     }
       
 17357                     
       
 17358                     
       
 17359                     ERROR;
       
 17360                 }
       
 17361                 
       
 17362             }
       
 17363             
       
 17364             
       
 17365             ERROR;
       
 17366         }
       
 17367         
       
 17368     }/*function_sub*/
       
 17369     break;
       
 17370 
       
 17371 /****
       
 17372  *SUB_TIME
       
 17373  */
       
 17374     case function_sub_time :
       
 17375     {
 18001     {
 17376         symbol_c *last_type_symbol = NULL;
 18002         symbol_c *last_type_symbol = NULL;
 17377 
 18003 
 17378         {
 18004         {
 17379             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 18005             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 17385             if (IN1_param_value == NULL)
 18011             if (IN1_param_value == NULL)
 17386               IN1_param_value = function_call_param_iterator.next_nf();
 18012               IN1_param_value = function_call_param_iterator.next_nf();
 17387             if (IN1_param_value != NULL) {
 18013             if (IN1_param_value != NULL) {
 17388               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18014               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17389               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 18015               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 17390             }
       
 17391             
       
 17392             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17393             {
       
 17394         
       
 17395                 {
       
 17396                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17397                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17398                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17399                     symbol_c *IN2_type_symbol = NULL;
       
 17400                     
       
 17401                     /* Get the value from a foo(<param_value>) style call */
       
 17402                     if (IN2_param_value == NULL)
       
 17403                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17404                     if (IN2_param_value != NULL) {
       
 17405                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17406                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17407                     }
       
 17408                     
       
 17409                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17410                     {
       
 17411                 
       
 17412                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17413                         
       
 17414                         if (IN1_type_symbol == NULL)
       
 17415                           IN1_type_symbol = last_type_symbol;
       
 17416                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17417                         
       
 17418                         if (IN2_type_symbol == NULL)
       
 17419                           IN2_type_symbol = last_type_symbol;
       
 17420                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17421                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17422                         break;
       
 17423                         
       
 17424                     }
       
 17425                     
       
 17426                     
       
 17427                     ERROR;
       
 17428                 }
       
 17429                 
       
 17430             }
       
 17431             
       
 17432             
       
 17433             ERROR;
       
 17434         }
       
 17435         
       
 17436     }/*function_sub_time*/
       
 17437     break;
       
 17438 
       
 17439 /****
       
 17440  *SUB_DATE_DATE
       
 17441  */
       
 17442     case function_sub_date_date :
       
 17443     {
       
 17444         symbol_c *last_type_symbol = NULL;
       
 17445 
       
 17446         {
       
 17447             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17449             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17450             symbol_c *IN1_type_symbol = NULL;
       
 17451             
       
 17452             /* Get the value from a foo(<param_value>) style call */
       
 17453             if (IN1_param_value == NULL)
       
 17454               IN1_param_value = function_call_param_iterator.next_nf();
       
 17455             if (IN1_param_value != NULL) {
       
 17456               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17457               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17458             }
       
 17459             
       
 17460             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17461             {
       
 17462         
       
 17463                 {
       
 17464                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17465                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17466                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17467                     symbol_c *IN2_type_symbol = NULL;
       
 17468                     
       
 17469                     /* Get the value from a foo(<param_value>) style call */
       
 17470                     if (IN2_param_value == NULL)
       
 17471                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17472                     if (IN2_param_value != NULL) {
       
 17473                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17474                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17475                     }
       
 17476                     
       
 17477                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17478                     {
       
 17479                 
       
 17480                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17481                         
       
 17482                         if (IN1_type_symbol == NULL)
       
 17483                           IN1_type_symbol = last_type_symbol;
       
 17484                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17485                         
       
 17486                         if (IN2_type_symbol == NULL)
       
 17487                           IN2_type_symbol = last_type_symbol;
       
 17488                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17489                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17490                         break;
       
 17491                         
       
 17492                     }
       
 17493                     
       
 17494                     
       
 17495                     ERROR;
       
 17496                 }
       
 17497                 
       
 17498             }
       
 17499             
       
 17500             
       
 17501             ERROR;
       
 17502         }
       
 17503         
       
 17504     }/*function_sub_date_date*/
       
 17505     break;
       
 17506 
       
 17507 /****
       
 17508  *SUB_TOD_TIME
       
 17509  */
       
 17510     case function_sub_tod_time :
       
 17511     {
       
 17512         symbol_c *last_type_symbol = NULL;
       
 17513 
       
 17514         {
       
 17515             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17516             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17517             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17518             symbol_c *IN1_type_symbol = NULL;
       
 17519             
       
 17520             /* Get the value from a foo(<param_value>) style call */
       
 17521             if (IN1_param_value == NULL)
       
 17522               IN1_param_value = function_call_param_iterator.next_nf();
       
 17523             if (IN1_param_value != NULL) {
       
 17524               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17525               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17526             }
       
 17527             
       
 17528             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17529             {
       
 17530         
       
 17531                 {
       
 17532                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17533                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17534                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17535                     symbol_c *IN2_type_symbol = NULL;
       
 17536                     
       
 17537                     /* Get the value from a foo(<param_value>) style call */
       
 17538                     if (IN2_param_value == NULL)
       
 17539                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17540                     if (IN2_param_value != NULL) {
       
 17541                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17542                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17543                     }
       
 17544                     
       
 17545                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17546                     {
       
 17547                 
       
 17548                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17549                         
       
 17550                         if (IN1_type_symbol == NULL)
       
 17551                           IN1_type_symbol = last_type_symbol;
       
 17552                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17553                         
       
 17554                         if (IN2_type_symbol == NULL)
       
 17555                           IN2_type_symbol = last_type_symbol;
       
 17556                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17557                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17558                         break;
       
 17559                         
       
 17560                     }
       
 17561                     
       
 17562                     
       
 17563                     ERROR;
       
 17564                 }
       
 17565                 
       
 17566             }
       
 17567             
       
 17568             
       
 17569             ERROR;
       
 17570         }
       
 17571         
       
 17572     }/*function_sub_tod_time*/
       
 17573     break;
       
 17574 
       
 17575 /****
       
 17576  *SUB_TOD_TOD
       
 17577  */
       
 17578     case function_sub_tod_tod :
       
 17579     {
       
 17580         symbol_c *last_type_symbol = NULL;
       
 17581 
       
 17582         {
       
 17583             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17585             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17586             symbol_c *IN1_type_symbol = NULL;
       
 17587             
       
 17588             /* Get the value from a foo(<param_value>) style call */
       
 17589             if (IN1_param_value == NULL)
       
 17590               IN1_param_value = function_call_param_iterator.next_nf();
       
 17591             if (IN1_param_value != NULL) {
       
 17592               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17593               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17594             }
       
 17595             
       
 17596             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17597             {
       
 17598         
       
 17599                 {
       
 17600                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17601                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17602                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17603                     symbol_c *IN2_type_symbol = NULL;
       
 17604                     
       
 17605                     /* Get the value from a foo(<param_value>) style call */
       
 17606                     if (IN2_param_value == NULL)
       
 17607                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17608                     if (IN2_param_value != NULL) {
       
 17609                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17610                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17611                     }
       
 17612                     
       
 17613                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 17614                     {
       
 17615                 
       
 17616                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17617                         
       
 17618                         if (IN1_type_symbol == NULL)
       
 17619                           IN1_type_symbol = last_type_symbol;
       
 17620                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17621                         
       
 17622                         if (IN2_type_symbol == NULL)
       
 17623                           IN2_type_symbol = last_type_symbol;
       
 17624                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17625                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17626                         break;
       
 17627                         
       
 17628                     }
       
 17629                     
       
 17630                     
       
 17631                     ERROR;
       
 17632                 }
       
 17633                 
       
 17634             }
       
 17635             
       
 17636             
       
 17637             ERROR;
       
 17638         }
       
 17639         
       
 17640     }/*function_sub_tod_tod*/
       
 17641     break;
       
 17642 
       
 17643 /****
       
 17644  *SUB_DT_TIME
       
 17645  */
       
 17646     case function_sub_dt_time :
       
 17647     {
       
 17648         symbol_c *last_type_symbol = NULL;
       
 17649 
       
 17650         {
       
 17651             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17653             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17654             symbol_c *IN1_type_symbol = NULL;
       
 17655             
       
 17656             /* Get the value from a foo(<param_value>) style call */
       
 17657             if (IN1_param_value == NULL)
       
 17658               IN1_param_value = function_call_param_iterator.next_nf();
       
 17659             if (IN1_param_value != NULL) {
       
 17660               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17661               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17662             }
       
 17663             
       
 17664             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17665             {
       
 17666         
       
 17667                 {
       
 17668                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17669                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17670                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17671                     symbol_c *IN2_type_symbol = NULL;
       
 17672                     
       
 17673                     /* Get the value from a foo(<param_value>) style call */
       
 17674                     if (IN2_param_value == NULL)
       
 17675                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17676                     if (IN2_param_value != NULL) {
       
 17677                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17678                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17679                     }
       
 17680                     
       
 17681                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17682                     {
       
 17683                 
       
 17684                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17685                         
       
 17686                         if (IN1_type_symbol == NULL)
       
 17687                           IN1_type_symbol = last_type_symbol;
       
 17688                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17689                         
       
 17690                         if (IN2_type_symbol == NULL)
       
 17691                           IN2_type_symbol = last_type_symbol;
       
 17692                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17693                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17694                         break;
       
 17695                         
       
 17696                     }
       
 17697                     
       
 17698                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17699                     {
       
 17700                 
       
 17701                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
       
 17702                         
       
 17703                         if (IN1_type_symbol == NULL)
       
 17704                           IN1_type_symbol = last_type_symbol;
       
 17705                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17706                         
       
 17707                         if (IN2_type_symbol == NULL)
       
 17708                           IN2_type_symbol = last_type_symbol;
       
 17709                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17710                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17711                         break;
       
 17712                         
       
 17713                     }
       
 17714                     
       
 17715                     
       
 17716                     ERROR;
       
 17717                 }
       
 17718                 
       
 17719             }
       
 17720             
       
 17721             
       
 17722             ERROR;
       
 17723         }
       
 17724         
       
 17725     }/*function_sub_dt_time*/
       
 17726     break;
       
 17727 
       
 17728 /****
       
 17729  *DIV
       
 17730  */
       
 17731     case function_div :
       
 17732     {
       
 17733         symbol_c *last_type_symbol = NULL;
       
 17734 
       
 17735         {
       
 17736             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17737             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17738             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17739             symbol_c *IN1_type_symbol = NULL;
       
 17740             
       
 17741             /* Get the value from a foo(<param_value>) style call */
       
 17742             if (IN1_param_value == NULL)
       
 17743               IN1_param_value = function_call_param_iterator.next_nf();
       
 17744             if (IN1_param_value != NULL) {
       
 17745               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17746               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17747             }
       
 17748             
       
 17749             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 17750             {
       
 17751         
       
 17752                 {
       
 17753                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17754                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17755                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17756                     symbol_c *IN2_type_symbol = NULL;
       
 17757                     
       
 17758                     /* Get the value from a foo(<param_value>) style call */
       
 17759                     if (IN2_param_value == NULL)
       
 17760                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17761                     if (IN2_param_value != NULL) {
       
 17762                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17763                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17764                     }
       
 17765                     
       
 17766                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17767                     {
       
 17768                 
       
 17769                         function_name = (symbol_c*)(new pragma_c("__div_"));
       
 17770                         
       
 17771                         if (IN1_type_symbol == NULL)
       
 17772                           IN1_type_symbol = last_type_symbol;
       
 17773                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17774                         
       
 17775                         if (IN2_type_symbol == NULL)
       
 17776                           IN2_type_symbol = last_type_symbol;
       
 17777                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17778                         symbol_c * return_type_symbol = last_type_symbol;
       
 17779                         function_type_suffix = return_type_symbol;
       
 17780                         break;
       
 17781                         
       
 17782                     }
       
 17783                     
       
 17784                     
       
 17785                     ERROR;
       
 17786                 }
       
 17787                 
       
 17788             }
 18016             }
 17789             
 18017             
 17790             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 18018             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 17791             {
 18019             {
 17792         
 18020         
 17831             
 18059             
 17832             
 18060             
 17833             ERROR;
 18061             ERROR;
 17834         }
 18062         }
 17835         
 18063         
 17836     }/*function_div*/
       
 17837     break;
       
 17838 
       
 17839 /****
       
 17840  *DIVTIME
       
 17841  */
       
 17842     case function_divtime :
       
 17843     {
       
 17844         symbol_c *last_type_symbol = NULL;
       
 17845 
       
 17846         {
       
 17847             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17849             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17850             symbol_c *IN1_type_symbol = NULL;
       
 17851             
       
 17852             /* Get the value from a foo(<param_value>) style call */
       
 17853             if (IN1_param_value == NULL)
       
 17854               IN1_param_value = function_call_param_iterator.next_nf();
       
 17855             if (IN1_param_value != NULL) {
       
 17856               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17857               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17858             }
       
 17859             
       
 17860             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 17861             {
       
 17862         
       
 17863                 {
       
 17864                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17865                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17866                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17867                     symbol_c *IN2_type_symbol = NULL;
       
 17868                     
       
 17869                     /* Get the value from a foo(<param_value>) style call */
       
 17870                     if (IN2_param_value == NULL)
       
 17871                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17872                     if (IN2_param_value != NULL) {
       
 17873                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17874                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17875                     }
       
 17876                     
       
 17877                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17878                     {
       
 17879                 
       
 17880                         function_name = (symbol_c*)(new pragma_c("__time_div"));
       
 17881                         
       
 17882                         if (IN1_type_symbol == NULL)
       
 17883                           IN1_type_symbol = last_type_symbol;
       
 17884                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17885                         
       
 17886                         if (IN2_type_symbol == NULL)
       
 17887                           IN2_type_symbol = last_type_symbol;
       
 17888                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17889                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17890                         if (search_expression_type->is_literal_integer_type(function_type_suffix))
       
 17891                             function_type_suffix = &search_constant_type_c::lint_type_name;
       
 17892                         break;
       
 17893                         
       
 17894                     }
       
 17895                     
       
 17896                     
       
 17897                     ERROR;
       
 17898                 }
       
 17899                 
       
 17900             }
       
 17901             
       
 17902             
       
 17903             ERROR;
       
 17904         }
       
 17905         
       
 17906     }/*function_divtime*/
 18064     }/*function_divtime*/
 17907     break;
       
 17908 
       
 17909 /****
       
 17910  *MOD
       
 17911  */
       
 17912     case function_mod :
       
 17913     {
       
 17914         symbol_c *last_type_symbol = NULL;
       
 17915 
       
 17916         {
       
 17917             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17918             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17919             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17920             symbol_c *IN1_type_symbol = NULL;
       
 17921             
       
 17922             /* Get the value from a foo(<param_value>) style call */
       
 17923             if (IN1_param_value == NULL)
       
 17924               IN1_param_value = function_call_param_iterator.next_nf();
       
 17925             if (IN1_param_value != NULL) {
       
 17926               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17927               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17928             }
       
 17929             
       
 17930             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 17931             {
       
 17932         
       
 17933                 {
       
 17934                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 17935                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17936                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 17937                     symbol_c *IN2_type_symbol = NULL;
       
 17938                     
       
 17939                     /* Get the value from a foo(<param_value>) style call */
       
 17940                     if (IN2_param_value == NULL)
       
 17941                       IN2_param_value = function_call_param_iterator.next_nf();
       
 17942                     if (IN2_param_value != NULL) {
       
 17943                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 17944                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 17945                     }
       
 17946                     
       
 17947                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 17948                     {
       
 17949                 
       
 17950                         function_name = (symbol_c*)(new pragma_c("__mod_"));
       
 17951                         
       
 17952                         if (IN1_type_symbol == NULL)
       
 17953                           IN1_type_symbol = last_type_symbol;
       
 17954                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 17955                         
       
 17956                         if (IN2_type_symbol == NULL)
       
 17957                           IN2_type_symbol = last_type_symbol;
       
 17958                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 17959                         symbol_c * return_type_symbol = last_type_symbol;
       
 17960                         function_type_suffix = return_type_symbol;
       
 17961                         break;
       
 17962                         
       
 17963                     }
       
 17964                     
       
 17965                     
       
 17966                     ERROR;
       
 17967                 }
       
 17968                 
       
 17969             }
       
 17970             
       
 17971             
       
 17972             ERROR;
       
 17973         }
       
 17974         
       
 17975     }/*function_mod*/
       
 17976     break;
       
 17977 
       
 17978 /****
       
 17979  *EXPT
       
 17980  */
       
 17981     case function_expt :
       
 17982     {
       
 17983         symbol_c *last_type_symbol = NULL;
       
 17984 
       
 17985         {
       
 17986             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 17987             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17988             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 17989             symbol_c *IN1_type_symbol = NULL;
       
 17990             
       
 17991             /* Get the value from a foo(<param_value>) style call */
       
 17992             if (IN1_param_value == NULL)
       
 17993               IN1_param_value = function_call_param_iterator.next_nf();
       
 17994             if (IN1_param_value != NULL) {
       
 17995               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 17996               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 17997             }
       
 17998             
       
 17999             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
       
 18000             {
       
 18001         
       
 18002                 {
       
 18003                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 18004                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18005                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 18006                     symbol_c *IN2_type_symbol = NULL;
       
 18007                     
       
 18008                     /* Get the value from a foo(<param_value>) style call */
       
 18009                     if (IN2_param_value == NULL)
       
 18010                       IN2_param_value = function_call_param_iterator.next_nf();
       
 18011                     if (IN2_param_value != NULL) {
       
 18012                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18013                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18014                     }
       
 18015                     
       
 18016                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 18017                     {
       
 18018                 
       
 18019                         function_name = (symbol_c*)(new pragma_c("__expt_"));
       
 18020                         
       
 18021                         if (IN1_type_symbol == NULL)
       
 18022                           IN1_type_symbol = last_type_symbol;
       
 18023                         ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
       
 18024                         
       
 18025                         if (IN2_type_symbol == NULL)
       
 18026                           IN2_type_symbol = last_type_symbol;
       
 18027                         ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
       
 18028                         symbol_c * return_type_symbol = last_type_symbol;
       
 18029                         function_type_suffix = IN1_type_symbol;
       
 18030                         break;
       
 18031                         
       
 18032                     }
       
 18033                     
       
 18034                     
       
 18035                     ERROR;
       
 18036                 }
       
 18037                 
       
 18038             }
       
 18039             
       
 18040             
       
 18041             ERROR;
       
 18042         }
       
 18043         
       
 18044     }/*function_expt*/
       
 18045     break;
       
 18046 
       
 18047 /****
       
 18048  *MOVE
       
 18049  */
       
 18050     case function_move :
       
 18051     {
       
 18052         symbol_c *last_type_symbol = NULL;
       
 18053 
       
 18054         {
       
 18055             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 18056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18057             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 18058             symbol_c *IN_type_symbol = NULL;
       
 18059             
       
 18060             /* Get the value from a foo(<param_value>) style call */
       
 18061             if (IN_param_value == NULL)
       
 18062               IN_param_value = function_call_param_iterator.next_nf();
       
 18063             if (IN_param_value != NULL) {
       
 18064               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 18065               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 18066             }
       
 18067             
       
 18068             
       
 18069             {
       
 18070         
       
 18071                 function_name = (symbol_c*)(new pragma_c("__move_"));
       
 18072                 
       
 18073                 if (IN_type_symbol == NULL)
       
 18074                   IN_type_symbol = last_type_symbol;
       
 18075                 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
       
 18076                 symbol_c * return_type_symbol = last_type_symbol;
       
 18077                 function_type_suffix = return_type_symbol;
       
 18078                 if (search_expression_type->is_literal_integer_type(function_type_suffix))
       
 18079                     function_type_suffix = &search_constant_type_c::lint_type_name;
       
 18080                 else if (search_expression_type->is_literal_real_type(function_type_suffix))
       
 18081                     function_type_suffix = &search_constant_type_c::lreal_type_name;
       
 18082                 break;
       
 18083                 
       
 18084             }
       
 18085             
       
 18086             
       
 18087             ERROR;
       
 18088         }
       
 18089         
       
 18090     }/*function_move*/
       
 18091     break;
 18065     break;
 18092 
 18066 
 18093 /****
 18067 /****
 18094  *SHL
 18068  *SHL
 18095  */
 18069  */