Bug when function with unconnected input fixed
authorlbessard
Mon, 19 Jan 2009 17:06:22 +0100
changeset 169 bea932bc60b0
parent 168 225db59fe6fe
child 170 e10fbd3707df
Bug when function with unconnected input fixed
stage4/generate_c/generate_c_il.cc
stage4/generate_c/generate_c_st.cc
stage4/generate_c/il_code_gen.c
stage4/generate_c/search_type_code.c
stage4/generate_c/st_code_gen.c
--- a/stage4/generate_c/generate_c_il.cc	Mon Jan 19 08:28:04 2009 +0100
+++ b/stage4/generate_c/generate_c_il.cc	Mon Jan 19 17:06:22 2009 +0100
@@ -949,22 +949,26 @@
     
     function_call_param_iterator_c function_call_param_iterator(symbol);
     
+    int nb_param = 0;
+    if (symbol->il_param_list != NULL)
+      nb_param += ((list_c *)symbol->il_param_list)->n;
+    
     identifier_c en_param_name("EN");
     /* Get the value from EN param */
     symbol_c *EN_param_value = function_call_param_iterator.search(&en_param_name);
     if (EN_param_value == NULL)
       EN_param_value = (symbol_c*)(new boolean_literal_c((symbol_c*)(new bool_type_name_c()), new boolean_true_c()));
+    else
+      nb_param --;
     ADD_PARAM_LIST(EN_param_value, (symbol_c*)(new bool_type_name_c()), function_param_iterator_c::direction_in)
     
     identifier_c eno_param_name("EN0");
     /* Get the value from ENO param */
     symbol_c *ENO_param_value = function_call_param_iterator.search(&eno_param_name);
+    if (ENO_param_value != NULL)
+      nb_param --;
     ADD_PARAM_LIST(ENO_param_value, (symbol_c*)(new bool_type_name_c()), function_param_iterator_c::direction_out)
     
-    int nb_param = 0;
-    if (symbol->il_param_list != NULL)
-      nb_param += ((list_c *)symbol->il_param_list)->n;
-
     #include "st_code_gen.c"
     
   }
--- a/stage4/generate_c/generate_c_st.cc	Mon Jan 19 08:28:04 2009 +0100
+++ b/stage4/generate_c/generate_c_st.cc	Mon Jan 19 17:06:22 2009 +0100
@@ -482,9 +482,9 @@
     if (ENO_param_value != NULL)
       nb_param --;
     ADD_PARAM_LIST(ENO_param_value, (symbol_c*)(new bool_type_name_c()), function_param_iterator_c::direction_out)
-
+    
     #include "st_code_gen.c"
-
+    
   }
   else {
     /* loop through each function parameter, find the value we should pass
@@ -572,7 +572,7 @@
         break;
     } /* switch */
   }  
-
+  
   s4o.print(")");
   s4o.indent_left();
 
--- a/stage4/generate_c/il_code_gen.c	Mon Jan 19 08:28:04 2009 +0100
+++ b/stage4/generate_c/il_code_gen.c	Mon Jan 19 17:06:22 2009 +0100
@@ -44,9 +44,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -75,9 +78,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -106,9 +112,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -137,10 +146,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -169,9 +181,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -200,10 +215,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -232,10 +250,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -264,9 +285,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -295,9 +319,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -326,10 +353,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -358,9 +388,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -389,9 +422,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -420,9 +456,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -451,9 +490,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -482,9 +524,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -513,9 +558,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -544,9 +592,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -575,10 +626,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -607,9 +661,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -638,9 +695,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -669,9 +729,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -700,9 +763,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -731,10 +797,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -763,9 +832,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -794,10 +866,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -826,10 +901,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -858,9 +936,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -889,9 +970,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -920,10 +1004,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -952,9 +1039,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -983,9 +1073,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1014,9 +1107,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1045,9 +1141,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1076,9 +1175,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1107,9 +1209,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1138,9 +1243,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1169,10 +1277,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1201,9 +1312,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1232,9 +1346,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1263,9 +1380,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1294,9 +1414,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1325,10 +1448,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1357,9 +1483,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1388,10 +1517,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1420,10 +1552,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1452,9 +1587,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1483,9 +1621,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1514,10 +1655,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1546,9 +1690,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1577,9 +1724,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1608,9 +1758,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1639,9 +1792,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1670,9 +1826,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1701,9 +1860,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1732,9 +1894,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1763,10 +1928,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1795,9 +1963,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1826,9 +1997,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1857,9 +2031,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1888,9 +2065,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1919,10 +2099,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1951,9 +2134,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1982,10 +2168,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2014,10 +2203,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2046,9 +2238,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2077,9 +2272,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2108,10 +2306,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2140,9 +2341,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2171,9 +2375,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2202,9 +2409,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2233,9 +2443,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2264,9 +2477,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2295,9 +2511,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2326,9 +2545,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2357,10 +2579,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2389,9 +2614,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2420,10 +2648,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2452,10 +2683,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2484,10 +2718,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2516,10 +2753,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2548,10 +2788,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2580,10 +2823,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2612,10 +2858,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2644,10 +2893,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2676,10 +2928,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2708,10 +2963,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2740,10 +2998,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2772,10 +3033,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2804,10 +3068,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2836,10 +3103,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2868,10 +3138,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2900,9 +3173,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2931,9 +3207,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2962,9 +3241,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2993,9 +3275,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3024,10 +3309,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3056,10 +3344,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3088,10 +3379,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3120,9 +3414,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3151,9 +3448,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3182,10 +3482,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3214,9 +3517,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3245,9 +3551,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3276,9 +3585,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3307,9 +3619,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3338,9 +3653,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3369,9 +3687,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3400,9 +3721,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3431,10 +3755,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3463,9 +3790,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3494,10 +3824,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3526,10 +3859,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3558,10 +3894,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3590,10 +3929,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3622,10 +3964,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3654,10 +3999,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3686,10 +4034,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3718,10 +4069,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3750,10 +4104,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3782,10 +4139,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3814,10 +4174,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3846,10 +4209,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3878,10 +4244,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3910,10 +4279,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3942,10 +4314,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3974,10 +4349,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4006,10 +4384,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4038,10 +4419,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4070,10 +4454,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4102,10 +4489,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4134,10 +4524,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4166,10 +4559,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4198,10 +4594,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4230,10 +4629,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4262,10 +4664,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4294,10 +4699,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4326,10 +4734,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4358,10 +4769,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4390,10 +4804,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4422,10 +4839,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4454,9 +4874,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4485,9 +4908,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4516,9 +4942,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4547,9 +4976,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4578,10 +5010,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4610,9 +5045,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4641,10 +5079,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4673,10 +5114,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4705,9 +5149,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4736,10 +5183,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4768,9 +5218,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4799,9 +5252,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4830,9 +5286,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4861,9 +5320,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4892,9 +5354,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4923,9 +5388,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4954,9 +5422,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4985,10 +5456,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5017,9 +5491,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5048,9 +5525,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5079,9 +5559,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5110,9 +5593,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5141,9 +5627,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5172,10 +5661,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5204,9 +5696,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5235,10 +5730,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5267,10 +5765,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5299,9 +5800,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5330,10 +5834,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5362,9 +5869,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5393,9 +5903,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5424,9 +5937,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5455,9 +5971,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5486,9 +6005,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5517,9 +6039,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5548,9 +6073,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5579,10 +6107,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5611,9 +6142,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5642,10 +6176,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5674,10 +6211,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5706,10 +6246,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5738,10 +6281,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5770,10 +6316,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5802,10 +6351,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5834,10 +6386,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5866,10 +6421,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5898,10 +6456,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5930,10 +6491,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5962,10 +6526,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5994,10 +6561,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6026,10 +6596,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6058,10 +6631,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6090,10 +6666,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6122,10 +6701,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6154,10 +6736,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6186,10 +6771,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6218,10 +6806,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6250,9 +6841,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6281,9 +6875,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6312,9 +6909,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6343,9 +6943,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6374,10 +6977,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6406,9 +7012,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6437,10 +7046,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6469,10 +7081,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6501,9 +7116,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6532,9 +7150,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6563,10 +7184,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6595,9 +7219,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6626,9 +7253,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6657,9 +7287,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6688,9 +7321,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6719,9 +7355,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6750,9 +7389,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6781,10 +7423,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6813,9 +7458,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6844,9 +7492,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6875,9 +7526,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6906,9 +7560,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6937,9 +7594,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6968,10 +7628,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7000,9 +7663,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7031,10 +7697,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7063,10 +7732,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7095,9 +7767,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7126,9 +7801,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7157,10 +7835,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7189,9 +7870,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7220,9 +7904,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7251,9 +7938,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7282,9 +7972,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7313,9 +8006,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7344,9 +8040,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7375,10 +8074,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7407,9 +8109,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7438,9 +8143,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7469,9 +8177,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7500,9 +8211,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7531,9 +8245,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7562,10 +8279,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7594,9 +8314,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7625,10 +8348,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7657,10 +8383,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7689,9 +8418,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7720,9 +8452,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7751,10 +8486,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7783,9 +8521,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7814,9 +8555,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7845,9 +8589,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7876,9 +8623,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7907,9 +8657,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7938,9 +8691,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7969,10 +8725,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8001,9 +8760,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8032,9 +8794,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8063,9 +8828,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8094,9 +8862,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8125,9 +8896,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8156,10 +8930,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8188,9 +8965,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8219,10 +8999,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8251,10 +9034,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8283,9 +9069,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8314,9 +9103,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8345,10 +9137,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8377,9 +9172,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8408,9 +9206,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8439,9 +9240,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8470,9 +9274,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8501,9 +9308,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8532,9 +9342,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8563,10 +9376,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8595,9 +9411,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8626,9 +9445,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8657,9 +9479,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8688,9 +9513,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8719,9 +9547,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8750,10 +9581,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8782,9 +9616,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8813,10 +9650,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8845,10 +9685,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8877,9 +9720,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8908,9 +9754,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8939,10 +9788,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8971,9 +9823,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9002,9 +9857,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9033,9 +9891,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9064,9 +9925,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9095,9 +9959,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9126,9 +9993,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9157,10 +10027,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9189,9 +10062,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9220,9 +10096,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9251,9 +10130,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9282,9 +10164,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9313,9 +10198,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9344,10 +10232,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9376,9 +10267,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9407,10 +10301,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9439,10 +10336,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9471,9 +10371,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9502,9 +10405,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9533,10 +10439,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9565,9 +10474,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9596,9 +10508,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9627,9 +10542,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9658,9 +10576,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9689,9 +10610,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9720,9 +10644,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9751,10 +10678,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9783,9 +10713,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9814,9 +10747,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9845,9 +10781,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9876,9 +10815,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9907,9 +10849,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9938,10 +10883,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9970,9 +10918,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10001,10 +10952,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10033,10 +10987,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10065,9 +11022,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10096,9 +11056,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10127,10 +11090,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10159,9 +11125,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10190,9 +11159,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10221,9 +11193,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10252,9 +11227,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10283,9 +11261,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10314,9 +11295,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10345,10 +11329,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10377,9 +11364,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10408,10 +11398,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10440,10 +11433,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10472,10 +11468,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10504,10 +11503,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10536,10 +11538,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10568,10 +11573,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10600,10 +11608,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10632,10 +11643,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10664,10 +11678,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10696,10 +11713,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10728,10 +11748,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10760,10 +11783,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10792,10 +11818,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10824,10 +11853,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10856,10 +11888,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10888,9 +11923,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10919,9 +11957,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10950,9 +11991,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10981,9 +12025,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11012,10 +12059,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11044,9 +12094,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11075,10 +12128,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11107,10 +12163,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11139,9 +12198,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11170,9 +12232,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11201,10 +12266,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11233,9 +12301,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11264,9 +12335,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11295,9 +12369,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11326,9 +12403,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11357,9 +12437,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11388,9 +12471,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11419,9 +12505,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11450,10 +12539,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11482,9 +12574,12 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
-            {
-        
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = (symbol_c*)(new pragma_c("int"));
@@ -11513,10 +12608,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11545,10 +12643,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11577,10 +12678,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11609,10 +12713,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11641,10 +12748,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11673,10 +12783,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11705,10 +12818,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11737,10 +12853,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11769,10 +12888,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 break;
@@ -11800,10 +12922,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 break;
@@ -11831,10 +12956,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__abs_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -11863,10 +12991,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sqrt_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -11895,10 +13026,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__ln_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -11927,10 +13061,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__log_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -11959,10 +13096,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__exp_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -11991,10 +13131,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sin_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12023,10 +13166,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__cos_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12055,10 +13201,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__tan_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12087,10 +13236,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__asin_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12119,10 +13271,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__acos_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12151,10 +13306,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__atan_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -12183,29 +13341,40 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__add_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -12242,25 +13411,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -12273,25 +13451,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                         break;
@@ -12304,25 +13491,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -12356,29 +13552,40 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__mul_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -12415,25 +13622,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_mul"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -12467,25 +13683,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__sub_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -12499,25 +13724,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -12530,36 +13764,51 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -12572,36 +13821,51 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                         break;
@@ -12614,25 +13878,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -12666,25 +13939,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__div_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -12698,25 +13980,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_div"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -12750,25 +14041,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__mod_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -12803,25 +14103,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__expt_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = IN1_type_symbol;
@@ -12860,6 +14169,9 @@
             {
         
                 function_name = (symbol_c*)(new pragma_c("__move_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = last_type_symbol;
                 function_type_suffix = return_type_symbol;
@@ -12888,25 +14200,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__shl_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -12941,25 +14262,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__shr_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -12994,25 +14324,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ror_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -13047,25 +14386,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__rol_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -13100,29 +14448,40 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__and_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13180,29 +14539,40 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__or_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13260,29 +14630,40 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__xor_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13340,10 +14721,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__not_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = return_type_symbol;
@@ -13372,19 +14756,22 @@
             symbol_c *G_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -13393,19 +14780,31 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__sel_"));
+                                
+                                if (G_type_symbol == NULL)
+                                  G_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN0_type_symbol == NULL)
+                                  IN0_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = last_type_symbol;
                                 function_type_suffix = IN0_type_symbol;
@@ -13453,22 +14852,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__max_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13533,22 +14943,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__min_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13613,12 +15034,15 @@
                     identifier_c param_name("IN");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN_param_value == NULL)
                       IN_param_value = function_call_param_iterator.next();
-                    symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    if (IN_param_value != NULL) {
+                      IN_type_symbol = search_expression_type->get_type(IN_param_value);
+                      last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    }
                     
                     
                     {
@@ -13627,19 +15051,31 @@
                             identifier_c param_name("MX");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *MX_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (MX_param_value == NULL)
                               MX_param_value = function_call_param_iterator.next();
-                            symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            if (MX_param_value != NULL) {
+                              MX_type_symbol = search_expression_type->get_type(MX_param_value);
+                              last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__limit_"));
+                                
+                                if (MN_type_symbol == NULL)
+                                  MN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (MX_type_symbol == NULL)
+                                  MX_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = IN_type_symbol;
                                 function_type_suffix = IN_type_symbol;
@@ -13680,19 +15116,22 @@
             symbol_c *K_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_integer_type(K_type_symbol))
+            if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -13701,23 +15140,37 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__mux_"));
                                 
+                                if (nb_param < 3)
+                                  nb_param = 3;
                                 char* nb_param_str = new char[10];
                                 sprintf(nb_param_str, "%d", nb_param);
                                 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                                
+                                if (K_type_symbol == NULL)
+                                  K_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN0_type_symbol == NULL)
+                                  IN0_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
                                 
                                 int base_num = 2;
@@ -13788,22 +15241,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__gt_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13868,22 +15332,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ge_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13948,22 +15423,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__eq_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14028,22 +15514,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__lt_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14108,22 +15605,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__le_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14188,22 +15696,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ne_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14261,10 +15780,13 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__len"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 break;
@@ -14292,25 +15814,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__left"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (L_type_symbol == NULL)
+                          L_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                         break;
@@ -14344,25 +15875,34 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__right"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (L_type_symbol == NULL)
+                          L_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                         break;
@@ -14396,40 +15936,55 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__mid"));
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (L_type_symbol == NULL)
+                                  L_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -14469,25 +16024,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -14500,29 +16064,40 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__concat"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14579,40 +16154,55 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__insert"));
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN2_type_symbol == NULL)
+                                  IN2_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -14652,40 +16242,55 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__delete"));
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (L_type_symbol == NULL)
+                                  L_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -14725,55 +16330,76 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("L");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *L_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (L_param_value == NULL)
                               L_param_value = function_call_param_iterator.next();
-                            symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            if (L_param_value != NULL) {
+                              L_type_symbol = search_expression_type->get_type(L_param_value);
+                              last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(L_type_symbol))
+                            if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                             {
                         
                                 {
                                     identifier_c param_name("P");
                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                                    symbol_c *P_type_symbol = NULL;
                                     
                                     /* Get the value from a foo(<param_value>) style call */
                                     if (P_param_value == NULL)
                                       P_param_value = function_call_param_iterator.next();
-                                    symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    if (P_param_value != NULL) {
+                                      P_type_symbol = search_expression_type->get_type(P_param_value);
+                                      last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    }
                                     
-                                    if(search_expression_type->is_integer_type(P_type_symbol))
+                                    if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                                     {
                                 
                                         function_name = (symbol_c*)(new pragma_c("__replace"));
+                                        
+                                        if (IN1_type_symbol == NULL)
+                                          IN1_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (IN2_type_symbol == NULL)
+                                          IN2_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (L_type_symbol == NULL)
+                                          L_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (P_type_symbol == NULL)
+                                          P_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                         break;
@@ -14819,25 +16445,34 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__find"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                         break;
--- a/stage4/generate_c/search_type_code.c	Mon Jan 19 08:28:04 2009 +0100
+++ b/stage4/generate_c/search_type_code.c	Mon Jan 19 17:06:22 2009 +0100
@@ -58,14 +58,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -91,14 +94,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -124,14 +130,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -157,14 +166,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -190,14 +202,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -223,14 +238,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -256,14 +274,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -289,14 +310,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -322,14 +346,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -355,14 +382,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -388,14 +418,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -421,14 +454,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -454,14 +490,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -487,14 +526,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -520,14 +562,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -553,14 +598,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -586,14 +634,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -619,14 +670,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -652,14 +706,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -685,14 +742,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -718,14 +778,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -751,14 +814,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -784,14 +850,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -817,14 +886,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -850,14 +922,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -883,14 +958,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -916,14 +994,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -949,14 +1030,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -982,14 +1066,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -1015,14 +1102,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -1048,14 +1138,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -1081,14 +1174,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -1114,14 +1210,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1147,14 +1246,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -1180,14 +1282,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -1213,14 +1318,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1246,14 +1354,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -1279,14 +1390,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -1312,14 +1426,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -1345,14 +1462,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -1378,14 +1498,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -1411,14 +1534,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -1444,14 +1570,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -1477,14 +1606,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -1510,14 +1642,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -1543,14 +1678,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -1576,14 +1714,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -1609,14 +1750,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -1642,14 +1786,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -1675,14 +1822,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -1708,14 +1858,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -1741,14 +1894,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1774,14 +1930,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -1807,14 +1966,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -1840,14 +2002,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1873,14 +2038,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -1906,14 +2074,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -1939,14 +2110,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -1972,14 +2146,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -2005,14 +2182,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -2038,14 +2218,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -2071,14 +2254,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -2104,14 +2290,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -2137,14 +2326,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -2170,14 +2362,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -2203,14 +2398,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -2236,14 +2434,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -2269,14 +2470,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -2302,14 +2506,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -2335,14 +2542,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -2368,14 +2578,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -2401,14 +2614,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -2434,14 +2650,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -2467,14 +2686,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -2500,14 +2722,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -2533,14 +2758,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -2566,14 +2794,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -2599,14 +2830,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -2632,14 +2866,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -2665,14 +2902,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -2698,14 +2938,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -2731,14 +2974,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -2764,14 +3010,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -2797,14 +3046,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -2830,14 +3082,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -2863,14 +3118,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -2896,14 +3154,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -2929,14 +3190,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -2962,14 +3226,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -2995,14 +3262,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -3028,14 +3298,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -3061,14 +3334,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -3094,14 +3370,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -3127,14 +3406,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -3160,14 +3442,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -3193,14 +3478,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -3226,14 +3514,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -3259,14 +3550,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -3292,14 +3586,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -3325,14 +3622,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -3358,14 +3658,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -3391,14 +3694,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -3424,14 +3730,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -3457,14 +3766,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -3490,14 +3802,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -3523,14 +3838,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -3556,14 +3874,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -3589,14 +3910,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -3622,14 +3946,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -3655,14 +3982,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -3688,14 +4018,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -3721,14 +4054,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -3754,14 +4090,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -3787,14 +4126,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -3820,14 +4162,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -3853,14 +4198,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -3886,14 +4234,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -3919,14 +4270,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -3952,14 +4306,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -3985,14 +4342,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -4018,14 +4378,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -4051,14 +4414,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -4084,14 +4450,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -4117,14 +4486,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -4150,14 +4522,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -4183,14 +4558,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -4216,14 +4594,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -4249,14 +4630,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -4282,14 +4666,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -4315,14 +4702,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -4348,14 +4738,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -4381,14 +4774,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -4414,14 +4810,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -4447,14 +4846,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -4480,14 +4882,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -4513,14 +4918,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -4546,14 +4954,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -4579,14 +4990,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -4612,14 +5026,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -4645,14 +5062,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -4678,14 +5098,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -4711,14 +5134,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -4744,14 +5170,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -4777,14 +5206,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -4810,14 +5242,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -4843,14 +5278,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -4876,14 +5314,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -4909,14 +5350,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -4942,14 +5386,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -4975,14 +5422,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -5008,14 +5458,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -5041,14 +5494,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -5074,14 +5530,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -5107,14 +5566,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -5140,14 +5602,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -5173,14 +5638,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -5206,14 +5674,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -5239,14 +5710,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -5272,14 +5746,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -5305,14 +5782,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -5338,14 +5818,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -5371,14 +5854,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -5404,14 +5890,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -5437,14 +5926,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -5470,14 +5962,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -5503,14 +5998,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -5536,14 +6034,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -5569,14 +6070,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -5602,14 +6106,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -5635,14 +6142,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -5668,14 +6178,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -5701,14 +6214,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -5734,14 +6250,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -5767,14 +6286,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -5800,14 +6322,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -5833,14 +6358,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -5866,14 +6394,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -5899,14 +6430,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -5932,14 +6466,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -5965,14 +6502,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -5998,14 +6538,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -6031,14 +6574,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -6064,14 +6610,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -6097,14 +6646,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -6130,14 +6682,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -6163,14 +6718,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -6196,14 +6754,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -6229,14 +6790,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -6262,14 +6826,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -6295,14 +6862,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -6328,14 +6898,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -6361,14 +6934,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -6394,14 +6970,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -6427,14 +7006,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -6460,14 +7042,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -6493,14 +7078,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -6526,14 +7114,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -6559,14 +7150,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -6592,14 +7186,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -6625,14 +7222,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -6658,14 +7258,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -6691,14 +7294,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -6724,14 +7330,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -6757,14 +7366,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -6790,14 +7402,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -6823,14 +7438,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -6856,14 +7474,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -6889,14 +7510,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -6922,14 +7546,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -6955,14 +7582,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -6988,14 +7618,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -7021,14 +7654,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -7054,14 +7690,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -7087,14 +7726,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -7120,14 +7762,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -7153,14 +7798,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -7186,14 +7834,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -7219,14 +7870,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -7252,14 +7906,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -7285,14 +7942,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -7318,14 +7978,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -7351,14 +8014,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -7384,14 +8050,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -7417,14 +8086,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -7450,14 +8122,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -7483,14 +8158,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -7516,14 +8194,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -7549,14 +8230,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -7582,14 +8266,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -7615,14 +8302,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -7648,14 +8338,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -7681,14 +8374,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -7714,14 +8410,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -7747,14 +8446,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -7780,14 +8482,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -7813,14 +8518,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -7846,14 +8554,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -7879,14 +8590,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -7912,14 +8626,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -7945,14 +8662,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -7978,14 +8698,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -8011,14 +8734,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -8044,14 +8770,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -8077,14 +8806,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -8110,14 +8842,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -8143,14 +8878,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -8176,14 +8914,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -8209,14 +8950,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -8242,14 +8986,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -8275,14 +9022,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -8308,14 +9058,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -8341,14 +9094,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -8374,14 +9130,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -8407,14 +9166,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -8440,14 +9202,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -8473,14 +9238,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -8506,14 +9274,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -8539,14 +9310,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -8572,14 +9346,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -8605,14 +9382,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -8638,14 +9418,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -8671,14 +9454,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -8704,14 +9490,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -8737,14 +9526,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -8770,14 +9562,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -8803,14 +9598,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -8836,14 +9634,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -8869,14 +9670,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -8902,14 +9706,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -8935,14 +9742,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -8968,14 +9778,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -9001,14 +9814,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -9034,14 +9850,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -9067,14 +9886,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -9100,14 +9922,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -9133,14 +9958,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -9166,14 +9994,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -9199,14 +10030,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -9232,14 +10066,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -9265,14 +10102,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -9298,14 +10138,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -9331,14 +10174,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -9364,14 +10210,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -9397,14 +10246,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -9430,14 +10282,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -9463,14 +10318,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -9496,14 +10354,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -9529,14 +10390,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -9562,14 +10426,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -9595,14 +10462,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -9628,14 +10498,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -9661,14 +10534,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -9694,14 +10570,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -9727,14 +10606,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -9760,14 +10642,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -9793,14 +10678,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -9826,14 +10714,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -9859,14 +10750,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -9892,14 +10786,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -9925,14 +10822,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -9958,14 +10858,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -9991,14 +10894,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -10024,14 +10930,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -10057,14 +10966,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -10090,14 +11002,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -10123,14 +11038,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -10156,14 +11074,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -10189,14 +11110,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -10222,14 +11146,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -10255,14 +11182,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -10288,14 +11218,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -10321,14 +11254,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -10354,14 +11290,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -10387,14 +11326,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -10420,14 +11362,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -10453,14 +11398,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -10486,14 +11434,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -10519,14 +11470,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -10552,14 +11506,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -10585,14 +11542,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -10618,14 +11578,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -10651,14 +11614,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -10684,14 +11650,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -10717,14 +11686,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -10750,14 +11722,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -10783,14 +11758,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -10816,14 +11794,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -10849,14 +11830,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -10882,14 +11866,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -10915,14 +11902,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -10948,14 +11938,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -10981,14 +11974,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -11014,14 +12010,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -11047,14 +12046,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -11080,14 +12082,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -11113,14 +12118,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -11146,14 +12154,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -11179,14 +12190,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -11212,14 +12226,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -11245,14 +12262,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -11278,14 +12298,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -11311,14 +12334,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -11344,14 +12370,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -11377,14 +12406,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -11410,14 +12442,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -11443,14 +12478,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -11476,14 +12514,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -11509,14 +12550,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -11542,14 +12586,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -11575,14 +12622,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -11608,14 +12658,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -11641,14 +12694,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -11674,14 +12730,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -11707,14 +12766,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -11740,14 +12802,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -11773,14 +12838,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -11806,14 +12874,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -11839,14 +12910,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -11872,14 +12946,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -11905,14 +12982,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -11938,14 +13018,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -11971,14 +13054,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -12004,14 +13090,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -12037,14 +13126,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -12070,14 +13162,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -12103,14 +13198,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -12136,14 +13234,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -12169,14 +13270,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -12202,14 +13306,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -12235,14 +13342,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -12268,14 +13378,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -12301,14 +13414,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -12334,14 +13450,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -12367,14 +13486,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -12400,14 +13522,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -12433,14 +13558,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_num_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12466,14 +13594,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12499,14 +13630,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12532,14 +13666,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12565,14 +13702,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12598,14 +13738,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12631,14 +13774,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12664,14 +13810,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12697,14 +13846,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12730,14 +13882,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12763,14 +13918,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -12796,28 +13954,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -12831,21 +13995,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -12859,21 +14026,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -12887,21 +14057,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -12933,28 +14106,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -12968,21 +14147,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13014,28 +14196,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13049,21 +14237,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13077,21 +14268,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13099,7 +14293,7 @@
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -13113,21 +14307,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13135,7 +14332,7 @@
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -13149,21 +14346,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13195,28 +14395,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13230,21 +14436,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -13276,28 +14485,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13329,28 +14544,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_real_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13382,12 +14603,15 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
             
             
             {
@@ -13415,28 +14639,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -13468,28 +14698,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -13521,28 +14757,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -13574,28 +14816,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -13627,28 +14875,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13680,28 +14934,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13733,28 +14993,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -13786,14 +15052,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -13819,26 +15088,32 @@
             identifier_c param_name("G");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *G_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (G_param_value == NULL)
               G_param_value = function_call_param_iterator.next();
-            symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if (G_param_value != NULL) {
+              G_type_symbol = search_expression_type->get_type(G_param_value);
+              last_type_symbol = last_type_symbol && G_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
+            }
+            
+            if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -13847,12 +15122,15 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
@@ -13892,12 +15170,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -13906,12 +15187,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -13945,12 +15229,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -13959,12 +15246,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -13998,12 +15288,15 @@
             identifier_c param_name("MN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *MN_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (MN_param_value == NULL)
               MN_param_value = function_call_param_iterator.next();
-            symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
+            if (MN_param_value != NULL) {
+              MN_type_symbol = search_expression_type->get_type(MN_param_value);
+              last_type_symbol = last_type_symbol && MN_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
+            }
             
             
             {
@@ -14012,12 +15305,15 @@
                     identifier_c param_name("IN");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN_param_value == NULL)
                       IN_param_value = function_call_param_iterator.next();
-                    symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    if (IN_param_value != NULL) {
+                      IN_type_symbol = search_expression_type->get_type(IN_param_value);
+                      last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    }
                     
                     
                     {
@@ -14026,12 +15322,15 @@
                             identifier_c param_name("MX");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *MX_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (MX_param_value == NULL)
                               MX_param_value = function_call_param_iterator.next();
-                            symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            if (MX_param_value != NULL) {
+                              MX_type_symbol = search_expression_type->get_type(MX_param_value);
+                              last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            }
                             
                             
                             {
@@ -14071,26 +15370,32 @@
             identifier_c param_name("K");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *K_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (K_param_value == NULL)
               K_param_value = function_call_param_iterator.next();
-            symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
-            
-            if(search_expression_type->is_integer_type(K_type_symbol))
+            if (K_param_value != NULL) {
+              K_type_symbol = search_expression_type->get_type(K_param_value);
+              last_type_symbol = last_type_symbol && K_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
+            }
+            
+            if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -14099,12 +15404,15 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
@@ -14144,12 +15452,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14158,12 +15469,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14197,12 +15511,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14211,12 +15528,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14250,12 +15570,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14264,12 +15587,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14303,12 +15629,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14317,12 +15646,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14356,12 +15688,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14370,12 +15705,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14409,12 +15747,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -14423,12 +15764,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -14462,14 +15806,17 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -14495,28 +15842,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14548,28 +15901,34 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14601,42 +15960,51 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14674,28 +16042,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -14709,21 +16083,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14755,42 +16132,51 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14828,42 +16214,51 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14901,56 +16296,68 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("L");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *L_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (L_param_value == NULL)
                               L_param_value = function_call_param_iterator.next();
-                            symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            if (L_param_value != NULL) {
+                              L_type_symbol = search_expression_type->get_type(L_param_value);
+                              last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(L_type_symbol))
+                            if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                             {
                         
                                 {
                                     identifier_c param_name("P");
                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                                    symbol_c *P_type_symbol = NULL;
                                     
                                     /* Get the value from a foo(<param_value>) style call */
                                     if (P_param_value == NULL)
                                       P_param_value = function_call_param_iterator.next();
-                                    symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    if (P_param_value != NULL) {
+                                      P_type_symbol = search_expression_type->get_type(P_param_value);
+                                      last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    }
                                     
-                                    if(search_expression_type->is_integer_type(P_type_symbol))
+                                    if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                                     {
                                 
                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -14994,28 +16401,34 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -15061,7 +16474,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -15087,7 +16500,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -15113,7 +16526,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -15139,7 +16552,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -15165,7 +16578,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -15191,7 +16604,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -15217,7 +16630,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -15243,7 +16656,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -15269,7 +16682,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -15295,7 +16708,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -15321,7 +16734,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -15347,7 +16760,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -15373,7 +16786,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -15399,7 +16812,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -15425,7 +16838,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -15451,7 +16864,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -15477,7 +16890,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -15503,7 +16916,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -15529,7 +16942,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -15555,7 +16968,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -15581,7 +16994,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -15607,7 +17020,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -15633,7 +17046,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -15659,7 +17072,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -15685,7 +17098,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -15711,7 +17124,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -15737,7 +17150,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -15763,7 +17176,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -15789,7 +17202,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -15815,7 +17228,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -15841,7 +17254,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -15867,7 +17280,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -15893,7 +17306,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -15919,7 +17332,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -15945,7 +17358,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -15971,7 +17384,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -15997,7 +17410,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -16023,7 +17436,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -16049,7 +17462,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -16075,7 +17488,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -16101,7 +17514,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -16127,7 +17540,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -16153,7 +17566,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -16179,7 +17592,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -16205,7 +17618,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -16231,7 +17644,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -16257,7 +17670,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -16283,7 +17696,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -16309,7 +17722,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -16335,7 +17748,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -16361,7 +17774,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -16387,7 +17800,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -16413,7 +17826,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -16439,7 +17852,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -16465,7 +17878,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -16491,7 +17904,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -16517,7 +17930,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -16543,7 +17956,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -16569,7 +17982,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -16595,7 +18008,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -16621,7 +18034,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -16647,7 +18060,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -16673,7 +18086,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -16699,7 +18112,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -16725,7 +18138,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -16751,7 +18164,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -16777,7 +18190,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -16803,7 +18216,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -16829,7 +18242,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -16855,7 +18268,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -16881,7 +18294,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -16907,7 +18320,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -16933,7 +18346,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -16959,7 +18372,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -16985,7 +18398,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -17011,7 +18424,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -17037,7 +18450,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -17063,7 +18476,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -17089,7 +18502,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -17115,7 +18528,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -17141,7 +18554,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -17167,7 +18580,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -17193,7 +18606,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -17219,7 +18632,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -17245,7 +18658,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -17271,7 +18684,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -17297,7 +18710,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -17323,7 +18736,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -17349,7 +18762,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -17375,7 +18788,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -17401,7 +18814,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -17427,7 +18840,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -17453,7 +18866,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -17479,7 +18892,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -17505,7 +18918,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -17531,7 +18944,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -17557,7 +18970,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -17583,7 +18996,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -17609,7 +19022,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -17635,7 +19048,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -17661,7 +19074,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -17687,7 +19100,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -17713,7 +19126,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -17739,7 +19152,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -17765,7 +19178,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -17791,7 +19204,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -17817,7 +19230,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -17843,7 +19256,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -17869,7 +19282,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -17895,7 +19308,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -17921,7 +19334,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -17947,7 +19360,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -17973,7 +19386,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -17999,7 +19412,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -18025,7 +19438,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -18051,7 +19464,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -18077,7 +19490,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -18103,7 +19516,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -18129,7 +19542,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -18155,7 +19568,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -18181,7 +19594,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -18207,7 +19620,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -18233,7 +19646,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -18259,7 +19672,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -18285,7 +19698,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -18311,7 +19724,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -18337,7 +19750,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -18363,7 +19776,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -18389,7 +19802,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -18415,7 +19828,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -18441,7 +19854,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -18467,7 +19880,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -18493,7 +19906,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -18519,7 +19932,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -18545,7 +19958,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -18571,7 +19984,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -18597,7 +20010,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -18623,7 +20036,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -18649,7 +20062,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -18675,7 +20088,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -18701,7 +20114,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -18727,7 +20140,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -18753,7 +20166,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -18779,7 +20192,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -18805,7 +20218,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -18831,7 +20244,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -18857,7 +20270,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -18883,7 +20296,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -18909,7 +20322,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -18935,7 +20348,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -18961,7 +20374,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -18987,7 +20400,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -19013,7 +20426,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -19039,7 +20452,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -19065,7 +20478,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -19091,7 +20504,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -19117,7 +20530,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -19143,7 +20556,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -19169,7 +20582,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -19195,7 +20608,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -19221,7 +20634,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -19247,7 +20660,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -19273,7 +20686,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -19299,7 +20712,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -19325,7 +20738,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -19351,7 +20764,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -19377,7 +20790,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -19403,7 +20816,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -19429,7 +20842,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -19455,7 +20868,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -19481,7 +20894,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -19507,7 +20920,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -19533,7 +20946,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -19559,7 +20972,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -19585,7 +20998,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -19611,7 +21024,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -19637,7 +21050,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -19663,7 +21076,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -19689,7 +21102,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -19715,7 +21128,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -19741,7 +21154,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -19767,7 +21180,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -19793,7 +21206,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -19819,7 +21232,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -19845,7 +21258,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -19871,7 +21284,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -19897,7 +21310,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -19923,7 +21336,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -19949,7 +21362,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -19975,7 +21388,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -20001,7 +21414,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -20027,7 +21440,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -20053,7 +21466,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -20079,7 +21492,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -20105,7 +21518,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -20131,7 +21544,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -20157,7 +21570,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -20183,7 +21596,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -20209,7 +21622,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -20235,7 +21648,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -20261,7 +21674,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -20287,7 +21700,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -20313,7 +21726,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -20339,7 +21752,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -20365,7 +21778,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -20391,7 +21804,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -20417,7 +21830,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -20443,7 +21856,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -20469,7 +21882,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -20495,7 +21908,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -20521,7 +21934,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -20547,7 +21960,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -20573,7 +21986,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -20599,7 +22012,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -20625,7 +22038,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -20651,7 +22064,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -20677,7 +22090,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -20703,7 +22116,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -20729,7 +22142,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -20755,7 +22168,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -20781,7 +22194,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -20807,7 +22220,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -20833,7 +22246,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -20859,7 +22272,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -20885,7 +22298,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -20911,7 +22324,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -20937,7 +22350,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -20963,7 +22376,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -20989,7 +22402,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -21015,7 +22428,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -21041,7 +22454,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -21067,7 +22480,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -21093,7 +22506,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -21119,7 +22532,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -21145,7 +22558,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -21171,7 +22584,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -21197,7 +22610,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -21223,7 +22636,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -21249,7 +22662,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -21275,7 +22688,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -21301,7 +22714,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -21327,7 +22740,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -21353,7 +22766,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -21379,7 +22792,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -21405,7 +22818,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -21431,7 +22844,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -21457,7 +22870,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -21483,7 +22896,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -21509,7 +22922,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -21535,7 +22948,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -21561,7 +22974,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -21587,7 +23000,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -21613,7 +23026,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -21639,7 +23052,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -21665,7 +23078,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -21691,7 +23104,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -21717,7 +23130,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -21743,7 +23156,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -21769,7 +23182,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -21795,7 +23208,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -21821,7 +23234,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -21847,7 +23260,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -21873,7 +23286,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -21899,7 +23312,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -21925,7 +23338,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -21951,7 +23364,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -21977,7 +23390,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -22003,7 +23416,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -22029,7 +23442,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -22055,7 +23468,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -22081,7 +23494,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -22107,7 +23520,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -22133,7 +23546,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -22159,7 +23572,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -22185,7 +23598,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -22211,7 +23624,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -22237,7 +23650,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -22263,7 +23676,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -22289,7 +23702,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -22315,7 +23728,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -22341,7 +23754,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -22367,7 +23780,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -22393,7 +23806,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -22419,7 +23832,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -22445,7 +23858,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -22471,7 +23884,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -22497,7 +23910,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -22523,7 +23936,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -22549,7 +23962,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -22575,7 +23988,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -22601,7 +24014,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -22627,7 +24040,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -22653,7 +24066,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -22679,7 +24092,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -22705,7 +24118,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -22731,7 +24144,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -22757,7 +24170,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -22783,7 +24196,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -22809,7 +24222,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -22835,7 +24248,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -22861,7 +24274,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -22887,7 +24300,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -22913,7 +24326,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -22939,7 +24352,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -22965,7 +24378,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -22991,7 +24404,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -23017,7 +24430,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -23043,7 +24456,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -23069,7 +24482,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -23095,7 +24508,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -23121,7 +24534,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -23147,7 +24560,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -23173,7 +24586,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -23199,7 +24612,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -23225,7 +24638,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -23251,7 +24664,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -23277,7 +24690,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -23303,7 +24716,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -23329,7 +24742,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -23355,7 +24768,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -23381,7 +24794,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -23407,7 +24820,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -23433,7 +24846,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -23459,7 +24872,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -23485,7 +24898,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -23511,7 +24924,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -23537,7 +24950,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -23563,7 +24976,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -23589,7 +25002,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -23615,7 +25028,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -23641,7 +25054,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -23667,7 +25080,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -23693,7 +25106,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -23719,7 +25132,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -23745,7 +25158,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -23771,7 +25184,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -23797,7 +25210,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -23823,7 +25236,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -23849,7 +25262,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -23875,7 +25288,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -23901,7 +25314,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -23927,7 +25340,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -23953,7 +25366,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -23979,7 +25392,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -24005,7 +25418,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -24031,7 +25444,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -24057,7 +25470,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -24083,7 +25496,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -24109,7 +25522,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -24135,7 +25548,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -24161,7 +25574,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -24187,7 +25600,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -24213,7 +25626,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -24239,7 +25652,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -24265,7 +25678,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -24291,7 +25704,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -24317,7 +25730,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -24343,7 +25756,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -24369,7 +25782,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -24395,7 +25808,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -24421,7 +25834,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -24447,7 +25860,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -24473,7 +25886,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -24499,7 +25912,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -24525,7 +25938,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -24551,7 +25964,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -24577,7 +25990,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -24603,7 +26016,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -24629,7 +26042,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -24655,7 +26068,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -24681,7 +26094,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -24707,7 +26120,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -24733,7 +26146,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
@@ -24759,7 +26172,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -24785,7 +26198,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -24811,7 +26224,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24837,7 +26250,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24863,7 +26276,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24889,7 +26302,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24915,7 +26328,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24941,7 +26354,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24967,7 +26380,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -24993,7 +26406,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -25019,7 +26432,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -25045,7 +26458,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -25071,7 +26484,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -25097,21 +26510,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25125,21 +26541,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -25153,21 +26572,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -25181,21 +26603,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25227,21 +26652,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25255,21 +26683,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25301,21 +26732,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25329,21 +26763,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25357,21 +26794,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25379,7 +26819,7 @@
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -25393,21 +26833,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25415,7 +26858,7 @@
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -25429,21 +26872,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25475,21 +26921,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25503,21 +26952,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -25549,21 +27001,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25595,21 +27050,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_real_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25667,21 +27125,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -25713,21 +27174,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -25759,21 +27223,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -25805,21 +27272,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
+                    
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = IN_type_symbol;
@@ -25851,21 +27321,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25897,21 +27370,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25943,21 +27419,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = last_type_symbol;
@@ -25989,7 +27468,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 symbol_c * return_type_symbol = IN_type_symbol;
@@ -26015,19 +27494,22 @@
             symbol_c *G_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -26036,12 +27518,15 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
@@ -26088,12 +27573,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26134,12 +27622,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26180,12 +27671,15 @@
                     identifier_c param_name("IN");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN_param_value == NULL)
                       IN_param_value = function_call_param_iterator.next();
-                    symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    if (IN_param_value != NULL) {
+                      IN_type_symbol = search_expression_type->get_type(IN_param_value);
+                      last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    }
                     
                     
                     {
@@ -26194,12 +27688,15 @@
                             identifier_c param_name("MX");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *MX_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (MX_param_value == NULL)
                               MX_param_value = function_call_param_iterator.next();
-                            symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            if (MX_param_value != NULL) {
+                              MX_type_symbol = search_expression_type->get_type(MX_param_value);
+                              last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            }
                             
                             
                             {
@@ -26239,19 +27736,22 @@
             symbol_c *K_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_integer_type(K_type_symbol))
+            if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -26260,12 +27760,15 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
@@ -26312,12 +27815,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26358,12 +27864,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26404,12 +27913,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26450,12 +27962,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26496,12 +28011,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26542,12 +28060,15 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
@@ -26581,7 +28102,7 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -26607,21 +28128,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26653,21 +28177,24 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26699,35 +28226,41 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26765,21 +28298,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -26793,21 +28329,24 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26839,35 +28378,41 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26905,35 +28450,41 @@
             symbol_c *IN_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
-                    
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
+                    
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -26971,49 +28522,58 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("L");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *L_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (L_param_value == NULL)
                               L_param_value = function_call_param_iterator.next();
-                            symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            if (L_param_value != NULL) {
+                              L_type_symbol = search_expression_type->get_type(L_param_value);
+                              last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(L_type_symbol))
+                            if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                             {
                         
                                 {
                                     identifier_c param_name("P");
                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                                    symbol_c *P_type_symbol = NULL;
                                     
                                     /* Get the value from a foo(<param_value>) style call */
                                     if (P_param_value == NULL)
                                       P_param_value = function_call_param_iterator.next();
-                                    symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    if (P_param_value != NULL) {
+                                      P_type_symbol = search_expression_type->get_type(P_param_value);
+                                      last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    }
                                     
-                                    if(search_expression_type->is_integer_type(P_type_symbol))
+                                    if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                                     {
                                 
                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -27057,21 +28617,24 @@
             symbol_c *IN1_type_symbol = param_data_type;
             last_type_symbol = param_data_type;
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
-                    
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
+                    
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
--- a/stage4/generate_c/st_code_gen.c	Mon Jan 19 08:28:04 2009 +0100
+++ b/stage4/generate_c/st_code_gen.c	Mon Jan 19 17:06:22 2009 +0100
@@ -41,16 +41,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -76,16 +82,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -111,16 +123,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -146,17 +164,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -182,16 +206,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -217,17 +247,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -253,17 +289,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -289,16 +331,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -324,16 +372,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -359,17 +413,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -395,16 +455,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -430,16 +496,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -465,16 +537,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -500,16 +578,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -535,16 +619,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -570,16 +660,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -605,16 +701,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -640,17 +742,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -676,16 +784,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -711,16 +825,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -746,16 +866,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -781,16 +907,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -816,17 +948,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -852,16 +990,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -887,17 +1031,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -923,17 +1073,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -959,16 +1115,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -994,16 +1156,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1029,17 +1197,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1065,16 +1239,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1100,16 +1280,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1135,16 +1321,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1170,16 +1362,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1205,16 +1403,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1240,16 +1444,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1275,16 +1485,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1310,17 +1526,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1346,16 +1568,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1381,16 +1609,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1416,16 +1650,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1451,16 +1691,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1486,17 +1732,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1522,16 +1774,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1557,17 +1815,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1593,17 +1857,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1629,16 +1899,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1664,16 +1940,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1699,17 +1981,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1735,16 +2023,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1770,16 +2064,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1805,16 +2105,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1840,16 +2146,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1875,16 +2187,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1910,16 +2228,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1945,16 +2269,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -1980,17 +2310,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2016,16 +2352,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2051,16 +2393,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2086,16 +2434,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2121,16 +2475,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2156,17 +2516,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2192,16 +2558,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2227,17 +2599,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2263,17 +2641,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2299,16 +2683,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2334,16 +2724,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2369,17 +2765,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2405,16 +2807,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2440,16 +2848,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2475,16 +2889,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2510,16 +2930,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2545,16 +2971,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2580,16 +3012,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2615,16 +3053,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2650,17 +3094,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2686,16 +3136,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2721,17 +3177,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2757,17 +3219,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2793,17 +3261,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2829,17 +3303,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2865,17 +3345,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2901,17 +3387,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2937,17 +3429,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -2973,17 +3471,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3009,17 +3513,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3045,17 +3555,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3081,17 +3597,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3117,17 +3639,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3153,17 +3681,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3189,17 +3723,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3225,17 +3765,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3261,16 +3807,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3296,16 +3848,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3331,16 +3889,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3366,16 +3930,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3401,17 +3971,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3437,17 +4013,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3473,17 +4055,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3509,16 +4097,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3544,16 +4138,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3579,17 +4179,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3615,16 +4221,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3650,16 +4262,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3685,16 +4303,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3720,16 +4344,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3755,16 +4385,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3790,16 +4426,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3825,16 +4467,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3860,17 +4508,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3896,16 +4550,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3931,17 +4591,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -3967,17 +4633,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4003,17 +4675,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4039,17 +4717,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4075,17 +4759,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4111,17 +4801,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4147,17 +4843,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4183,17 +4885,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4219,17 +4927,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4255,17 +4969,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4291,17 +5011,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4327,17 +5053,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4363,17 +5095,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4399,17 +5137,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4435,17 +5179,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4471,17 +5221,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4507,17 +5263,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4543,17 +5305,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4579,17 +5347,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4615,17 +5389,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4651,17 +5431,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4687,17 +5473,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4723,17 +5515,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4759,17 +5557,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4795,17 +5599,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4831,17 +5641,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4867,17 +5683,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4903,17 +5725,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4939,17 +5767,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -4975,17 +5809,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5011,16 +5851,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5046,16 +5892,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5081,16 +5933,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5116,16 +5974,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5151,17 +6015,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5187,16 +6057,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5222,17 +6098,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5258,17 +6140,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5294,16 +6182,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5329,17 +6223,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5365,16 +6265,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5400,16 +6306,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5435,16 +6347,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5470,16 +6388,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5505,16 +6429,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5540,16 +6470,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5575,16 +6511,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5610,17 +6552,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5646,16 +6594,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5681,16 +6635,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5716,16 +6676,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5751,16 +6717,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5786,16 +6758,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5821,17 +6799,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5857,16 +6841,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5892,17 +6882,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5928,17 +6924,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5964,16 +6966,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -5999,17 +7007,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6035,16 +7049,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6070,16 +7090,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6105,16 +7131,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6140,16 +7172,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6175,16 +7213,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6210,16 +7254,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6245,16 +7295,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6280,17 +7336,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6316,16 +7378,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6351,17 +7419,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6387,17 +7461,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6423,17 +7503,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6459,17 +7545,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6495,17 +7587,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6531,17 +7629,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6567,17 +7671,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6603,17 +7713,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6639,17 +7755,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6675,17 +7797,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6711,17 +7839,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6747,17 +7881,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6783,17 +7923,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6819,17 +7965,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6855,17 +8007,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6891,17 +8049,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6927,17 +8091,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6963,17 +8133,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -6999,17 +8175,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7035,16 +8217,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7070,16 +8258,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7105,16 +8299,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7140,16 +8340,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7175,17 +8381,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7211,16 +8423,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7246,17 +8464,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7282,17 +8506,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7318,16 +8548,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7353,16 +8589,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7388,17 +8630,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7424,16 +8672,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7459,16 +8713,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7494,16 +8754,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7529,16 +8795,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7564,16 +8836,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7599,16 +8877,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7634,17 +8918,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7670,16 +8960,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7705,16 +9001,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7740,16 +9042,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7775,16 +9083,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7810,16 +9124,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7845,17 +9165,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7881,16 +9207,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7916,17 +9248,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7952,17 +9290,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -7988,16 +9332,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8023,16 +9373,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8058,17 +9414,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8094,16 +9456,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8129,16 +9497,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8164,16 +9538,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8199,16 +9579,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8234,16 +9620,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8269,16 +9661,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8304,17 +9702,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8340,16 +9744,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8375,16 +9785,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8410,16 +9826,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8445,16 +9867,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8480,16 +9908,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8515,17 +9949,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8551,16 +9991,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8586,17 +10032,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8622,17 +10074,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8658,16 +10116,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8693,16 +10157,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8728,17 +10198,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8764,16 +10240,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8799,16 +10281,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8834,16 +10322,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8869,16 +10363,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8904,16 +10404,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8939,16 +10445,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -8974,17 +10486,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9010,16 +10528,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9045,16 +10569,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9080,16 +10610,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9115,16 +10651,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9150,16 +10692,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9185,17 +10733,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9221,16 +10775,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9256,17 +10816,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9292,17 +10858,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9328,16 +10900,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9363,16 +10941,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9398,17 +10982,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9434,16 +11024,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9469,16 +11065,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9504,16 +11106,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9539,16 +11147,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9574,16 +11188,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9609,16 +11229,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9644,17 +11270,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9680,16 +11312,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9715,16 +11353,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9750,16 +11394,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9785,16 +11435,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9820,16 +11476,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9855,17 +11517,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9891,16 +11559,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9926,17 +11600,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9962,17 +11642,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -9998,16 +11684,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10033,16 +11725,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10068,17 +11766,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10104,16 +11808,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10139,16 +11849,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10174,16 +11890,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10209,16 +11931,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10244,16 +11972,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10279,16 +12013,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10314,17 +12054,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10350,16 +12096,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10385,16 +12137,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10420,16 +12178,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10455,16 +12219,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10490,16 +12260,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10525,17 +12301,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10561,16 +12343,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10596,17 +12384,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10632,17 +12426,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10668,16 +12468,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10703,16 +12509,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10738,17 +12550,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10774,16 +12592,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10809,16 +12633,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10844,16 +12674,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10879,16 +12715,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10914,16 +12756,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10949,16 +12797,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -10984,17 +12838,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11020,16 +12880,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11055,16 +12921,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11090,16 +12962,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11125,16 +13003,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11160,16 +13044,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11195,17 +13085,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11231,16 +13127,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11266,17 +13168,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11302,17 +13210,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11338,16 +13252,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11373,16 +13293,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11408,17 +13334,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11444,16 +13376,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11479,16 +13417,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11514,16 +13458,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11549,16 +13499,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11584,16 +13540,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11619,16 +13581,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11654,17 +13622,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11690,16 +13664,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11725,17 +13705,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11761,17 +13747,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11797,17 +13789,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11833,17 +13831,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11869,17 +13873,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11905,17 +13915,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11941,17 +13957,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -11977,17 +13999,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12013,17 +14041,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12049,17 +14083,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12085,17 +14125,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12121,17 +14167,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12157,17 +14209,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12193,17 +14251,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12229,17 +14293,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12265,16 +14335,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12300,16 +14376,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12335,16 +14417,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12370,16 +14458,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12405,17 +14499,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12441,16 +14541,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12476,17 +14582,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12512,17 +14624,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12548,16 +14666,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12583,16 +14707,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12618,17 +14748,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12654,16 +14790,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12689,16 +14831,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12724,16 +14872,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12759,16 +14913,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12794,16 +14954,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12829,16 +14995,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12864,16 +15036,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12899,17 +15077,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                 function_type_prefix = return_type_symbol;
@@ -12935,16 +15119,22 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
-            {
-        
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
+            {
+        
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = (symbol_c*)(new pragma_c("int"));
@@ -12970,17 +15160,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13006,17 +15202,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13042,17 +15244,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13078,17 +15286,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13114,17 +15328,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13150,17 +15370,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13186,17 +15412,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13222,17 +15454,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
                 function_type_prefix = return_type_symbol;
@@ -13258,17 +15496,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                 break;
@@ -13293,17 +15537,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
                 break;
@@ -13328,17 +15578,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_num_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__abs_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13364,17 +15620,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sqrt_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13400,17 +15662,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__ln_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13436,17 +15704,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__log_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13472,17 +15746,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__exp_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13508,17 +15788,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__sin_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13544,17 +15830,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__cos_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13580,17 +15872,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__tan_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13616,17 +15914,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__asin_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13652,17 +15956,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__acos_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13688,17 +15998,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_real_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__atan_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = IN_type_symbol;
@@ -13724,36 +16040,50 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__add_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13790,25 +16120,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -13821,25 +16160,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                         break;
@@ -13852,25 +16200,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -13901,36 +16258,50 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__mul_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -13967,25 +16338,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_mul"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -14016,32 +16396,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__sub_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -14055,25 +16447,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -14086,36 +16487,51 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -14128,36 +16544,51 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
                         
                     }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
                         break;
@@ -14170,25 +16601,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_sub"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -14219,32 +16659,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__div_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -14258,25 +16710,34 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_div"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
                         break;
@@ -14307,32 +16768,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_num_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__mod_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = return_type_symbol;
@@ -14364,32 +16837,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_real_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_num_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__expt_"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = last_type_symbol;
                         function_type_suffix = IN1_type_symbol;
@@ -14421,17 +16906,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
             
             
             {
         
                 function_name = (symbol_c*)(new pragma_c("__move_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = last_type_symbol;
                 function_type_suffix = return_type_symbol;
@@ -14457,32 +16948,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__shl_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -14514,32 +17017,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__shr_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -14571,32 +17086,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ror_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -14628,32 +17155,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_nbinary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
             {
         
                 {
                     identifier_c param_name("N");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *N_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (N_param_value == NULL)
                       N_param_value = function_call_param_iterator.next();
-                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    if (N_param_value != NULL) {
+                      N_type_symbol = search_expression_type->get_type(N_param_value);
+                      last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(N_type_symbol))
+                    if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__rol_"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (N_type_symbol == NULL)
+                          N_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = IN_type_symbol;
                         function_type_suffix = IN_type_symbol;
@@ -14685,36 +17224,50 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__and_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14769,36 +17322,50 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__or_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14853,36 +17420,50 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_binary_type(IN1_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_binary_type(IN2_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__xor_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -14937,17 +17518,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_binary_type(IN_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__not_"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = IN_type_symbol;
                 function_type_suffix = return_type_symbol;
@@ -14973,26 +17560,32 @@
             identifier_c param_name("G");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *G_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (G_param_value == NULL)
               G_param_value = function_call_param_iterator.next();
-            symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
+            if (G_param_value != NULL) {
+              G_type_symbol = search_expression_type->get_type(G_param_value);
+              last_type_symbol = last_type_symbol && G_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
+            }
+            
+            if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -15001,19 +17594,31 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__sel_"));
+                                
+                                if (G_type_symbol == NULL)
+                                  G_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN0_type_symbol == NULL)
+                                  IN0_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = last_type_symbol;
                                 function_type_suffix = IN0_type_symbol;
@@ -15051,12 +17656,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15065,22 +17673,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__max_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15135,12 +17754,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15149,22 +17771,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__min_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15219,12 +17852,15 @@
             identifier_c param_name("MN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *MN_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (MN_param_value == NULL)
               MN_param_value = function_call_param_iterator.next();
-            symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
+            if (MN_param_value != NULL) {
+              MN_type_symbol = search_expression_type->get_type(MN_param_value);
+              last_type_symbol = last_type_symbol && MN_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
+            }
             
             
             {
@@ -15233,12 +17869,15 @@
                     identifier_c param_name("IN");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN_param_value == NULL)
                       IN_param_value = function_call_param_iterator.next();
-                    symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    if (IN_param_value != NULL) {
+                      IN_type_symbol = search_expression_type->get_type(IN_param_value);
+                      last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+                    }
                     
                     
                     {
@@ -15247,19 +17886,31 @@
                             identifier_c param_name("MX");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *MX_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (MX_param_value == NULL)
                               MX_param_value = function_call_param_iterator.next();
-                            symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            if (MX_param_value != NULL) {
+                              MX_type_symbol = search_expression_type->get_type(MX_param_value);
+                              last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__limit_"));
+                                
+                                if (MN_type_symbol == NULL)
+                                  MN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (MX_type_symbol == NULL)
+                                  MX_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = IN_type_symbol;
                                 function_type_suffix = IN_type_symbol;
@@ -15297,26 +17948,32 @@
             identifier_c param_name("K");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *K_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (K_param_value == NULL)
               K_param_value = function_call_param_iterator.next();
-            symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
-            
-            if(search_expression_type->is_integer_type(K_type_symbol))
+            if (K_param_value != NULL) {
+              K_type_symbol = search_expression_type->get_type(K_param_value);
+              last_type_symbol = last_type_symbol && K_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
+            }
+            
+            if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN0");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN0_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN0_param_value == NULL)
                       IN0_param_value = function_call_param_iterator.next();
-                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    if (IN0_param_value != NULL) {
+                      IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
+                      last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
+                    }
                     
                     
                     {
@@ -15325,23 +17982,37 @@
                             identifier_c param_name("IN1");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *IN1_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (IN1_param_value == NULL)
                               IN1_param_value = function_call_param_iterator.next();
-                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-                            last_type_symbol = last_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 ;
+                            if (IN1_param_value != NULL) {
+                              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+                              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 ;
+                            }
                             
                             
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__mux_"));
                                 
+                                if (nb_param < 3)
+                                  nb_param = 3;
                                 char* nb_param_str = new char[10];
                                 sprintf(nb_param_str, "%d", nb_param);
                                 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                                
+                                if (K_type_symbol == NULL)
+                                  K_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN0_type_symbol == NULL)
+                                  IN0_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
                                 
                                 int base_num = 2;
@@ -15402,12 +18073,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15416,22 +18090,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__gt_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15486,12 +18171,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15500,22 +18188,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ge_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15570,12 +18269,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15584,22 +18286,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__eq_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15654,12 +18367,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15668,22 +18384,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__lt_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15738,12 +18465,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15752,22 +18482,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__le_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15822,12 +18563,15 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
             
             
             {
@@ -15836,22 +18580,33 @@
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
                     
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__ne_"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -15906,17 +18661,23 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 function_name = (symbol_c*)(new pragma_c("__len"));
+                
+                if (IN_type_symbol == NULL)
+                  IN_type_symbol = last_type_symbol;
                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                 break;
@@ -15941,32 +18702,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__left"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (L_type_symbol == NULL)
+                          L_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                         break;
@@ -15997,32 +18770,44 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__right"));
+                        
+                        if (IN_type_symbol == NULL)
+                          IN_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (L_type_symbol == NULL)
+                          L_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                         break;
@@ -16053,47 +18838,65 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__mid"));
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (L_type_symbol == NULL)
+                                  L_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -16130,32 +18933,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__time_add"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
                         break;
@@ -16168,29 +18983,40 @@
                 
             }
             
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__concat"));
                         
+                        if (nb_param < 2)
+                          nb_param = 2;
                         char* nb_param_str = new char[10];
                         sprintf(nb_param_str, "%d", nb_param);
                         ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         
                         int base_num = 3;
@@ -16244,47 +19070,65 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__insert"));
+                                
+                                if (IN1_type_symbol == NULL)
+                                  IN1_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (IN2_type_symbol == NULL)
+                                  IN2_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -16321,47 +19165,65 @@
             identifier_c param_name("IN");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
-            
-            /* Get the value from a foo(<param_value>) style call */
-            if (IN_param_value == NULL)
-              IN_param_value = function_call_param_iterator.next();
-            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
-            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            symbol_c *IN_type_symbol = NULL;
+            
+            /* Get the value from a foo(<param_value>) style call */
+            if (IN_param_value == NULL)
+              IN_param_value = function_call_param_iterator.next();
+            if (IN_param_value != NULL) {
+              IN_type_symbol = search_expression_type->get_type(IN_param_value);
+              last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
+            }
+            
+            if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("L");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *L_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (L_param_value == NULL)
                       L_param_value = function_call_param_iterator.next();
-                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    if (L_param_value != NULL) {
+                      L_type_symbol = search_expression_type->get_type(L_param_value);
+                      last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                    }
                     
-                    if(search_expression_type->is_integer_type(L_type_symbol))
+                    if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("P");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *P_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (P_param_value == NULL)
                               P_param_value = function_call_param_iterator.next();
-                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            if (P_param_value != NULL) {
+                              P_type_symbol = search_expression_type->get_type(P_param_value);
+                              last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(P_type_symbol))
+                            if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                             {
                         
                                 function_name = (symbol_c*)(new pragma_c("__delete"));
+                                
+                                if (IN_type_symbol == NULL)
+                                  IN_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (L_type_symbol == NULL)
+                                  L_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                
+                                if (P_type_symbol == NULL)
+                                  P_type_symbol = last_type_symbol;
                                 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                 break;
@@ -16398,62 +19260,86 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         {
                             identifier_c param_name("L");
                             /* Get the value from a foo(<param_name> = <param_value>) style call */
                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
+                            symbol_c *L_type_symbol = NULL;
                             
                             /* Get the value from a foo(<param_value>) style call */
                             if (L_param_value == NULL)
                               L_param_value = function_call_param_iterator.next();
-                            symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
-                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            if (L_param_value != NULL) {
+                              L_type_symbol = search_expression_type->get_type(L_param_value);
+                              last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
+                            }
                             
-                            if(search_expression_type->is_integer_type(L_type_symbol))
+                            if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
                             {
                         
                                 {
                                     identifier_c param_name("P");
                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
+                                    symbol_c *P_type_symbol = NULL;
                                     
                                     /* Get the value from a foo(<param_value>) style call */
                                     if (P_param_value == NULL)
                                       P_param_value = function_call_param_iterator.next();
-                                    symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
-                                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    if (P_param_value != NULL) {
+                                      P_type_symbol = search_expression_type->get_type(P_param_value);
+                                      last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
+                                    }
                                     
-                                    if(search_expression_type->is_integer_type(P_type_symbol))
+                                    if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
                                     {
                                 
                                         function_name = (symbol_c*)(new pragma_c("__replace"));
+                                        
+                                        if (IN1_type_symbol == NULL)
+                                          IN1_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (IN2_type_symbol == NULL)
+                                          IN2_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (L_type_symbol == NULL)
+                                          L_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+                                        
+                                        if (P_type_symbol == NULL)
+                                          P_type_symbol = last_type_symbol;
                                         ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in)
                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
                                         break;
@@ -16496,32 +19382,44 @@
             identifier_c param_name("IN1");
             /* Get the value from a foo(<param_name> = <param_value>) style call */
             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
+            symbol_c *IN1_type_symbol = NULL;
             
             /* Get the value from a foo(<param_value>) style call */
             if (IN1_param_value == NULL)
               IN1_param_value = function_call_param_iterator.next();
-            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
-            last_type_symbol = last_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 ;
-            
-            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+            if (IN1_param_value != NULL) {
+              IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+              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 ;
+            }
+            
+            if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
             {
         
                 {
                     identifier_c param_name("IN2");
                     /* Get the value from a foo(<param_name> = <param_value>) style call */
                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
+                    symbol_c *IN2_type_symbol = NULL;
                     
                     /* Get the value from a foo(<param_value>) style call */
                     if (IN2_param_value == NULL)
                       IN2_param_value = function_call_param_iterator.next();
-                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
-                    last_type_symbol = last_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 ;
+                    if (IN2_param_value != NULL) {
+                      IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+                      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 ;
+                    }
                     
-                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+                    if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
                     {
                 
                         function_name = (symbol_c*)(new pragma_c("__find"));
+                        
+                        if (IN1_type_symbol == NULL)
+                          IN1_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+                        
+                        if (IN2_type_symbol == NULL)
+                          IN2_type_symbol = last_type_symbol;
                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
                         break;