--- a/lib/iec_std_lib.h Wed Oct 15 15:38:58 2008 +0200
+++ b/lib/iec_std_lib.h Fri Oct 24 16:37:46 2008 +0200
@@ -42,12 +42,9 @@
*/
#include "iec_types_all.h"
-#define __TIME_CMP(t1, t2) (t2.tv_sec == t1.tv_sec ? t1.tv_nsec - t2.tv_nsec : t1.tv_sec - t2.tv_sec)
extern TIME __CURRENT_TIME;
extern BOOL __DEBUG;
-#define __STR_CMP(str1, str2) memcmp((char*)&str1.body,(char*)&str2.body, str1.len < str2.len ? str1.len : str2.len)
-
/* TODO
typedef struct {
__strlen_t len;
@@ -234,28 +231,46 @@
return ts;
}
+/********************/
+/* EN/ENO PARAMS */
+/********************/
+
+#define EN_ENO_PARAMS BOOL EN, BOOL *ENO
+#define TEST_EN(TYPENAME)\
+ if (!EN) {\
+ if (ENO != NULL)\
+ *ENO = __BOOL_LITERAL(FALSE);\
+ return __INIT_##TYPENAME;\
+ }\
+ else if (ENO != NULL)\
+ *ENO = __BOOL_LITERAL(TRUE);
+#define TEST_EN_COND(TYPENAME, COND)\
+ if (!EN || (COND)) {\
+ if (ENO != NULL)\
+ *ENO = __BOOL_LITERAL(FALSE);\
+ return __INIT_##TYPENAME;\
+ }\
+ else if (ENO != NULL)\
+ *ENO = __BOOL_LITERAL(TRUE);
+
/***************/
/* Time ops */
/***************/
-static inline TIME __date_and_time_to_time_of_day(TIME IN){
- return (TIME){IN.tv_sec % 86400, IN.tv_nsec};
-}
-static inline TIME __date_and_time_to_date(TIME IN){
- return (TIME){IN.tv_sec - (IN.tv_sec % (24*60*60)), 0};
-}
-static inline TIME __time_add(TIME IN1, TIME IN2){
+#define __TIME_CMP(t1, t2) (t2.tv_sec == t1.tv_sec ? t1.tv_nsec - t2.tv_nsec : t1.tv_sec - t2.tv_sec)
+
+static inline TIME __TIME_ADD(TIME IN1, TIME IN2){
TIME res ={IN1.tv_sec + IN2.tv_sec,
IN1.tv_nsec + IN2.tv_nsec };
__normalize_timespec(&res);
return res;
}
-static inline TIME __time_sub(TIME IN1, TIME IN2){
+static inline TIME __TIME_SUB(TIME IN1, TIME IN2){
TIME res ={IN1.tv_sec - IN2.tv_sec,
IN1.tv_nsec - IN2.tv_nsec };
__normalize_timespec(&res);
return res;
}
-static inline TIME __time_mul(TIME IN1, LREAL IN2){
+static inline TIME __TIME_MUL(TIME IN1, LREAL IN2){
LREAL s_f = IN1.tv_sec * IN2;
time_t s = s_f;
div_t ns = div((LREAL)IN1.tv_nsec * IN2, 1000000000);
@@ -264,7 +279,7 @@
__normalize_timespec(&res);
return res;
}
-static inline TIME __time_div(TIME IN1, LREAL IN2){
+static inline TIME __TIME_DIV(TIME IN1, LREAL IN2){
LREAL s_f = IN1.tv_sec / IN2;
time_t s = s_f;
TIME res = {s,
@@ -273,27 +288,58 @@
return res;
}
+static inline TIME __date_and_time_to_time_of_day(EN_ENO_PARAMS, TIME IN){
+ TEST_EN(TIME)
+ return (TIME){IN.tv_sec % 86400, IN.tv_nsec};
+}
+static inline TIME __date_and_time_to_date(EN_ENO_PARAMS, TIME IN){
+ TEST_EN(TIME)
+ return (TIME){IN.tv_sec - (IN.tv_sec % (24*60*60)), 0};
+}
+static inline TIME __time_add(EN_ENO_PARAMS, TIME IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __TIME_ADD(IN1, IN2);
+}
+static inline TIME __time_sub(EN_ENO_PARAMS, TIME IN1, TIME IN2){
+ TEST_EN(TIME)
+ return __TIME_SUB(IN1, IN2);
+}
+static inline TIME __time_mul(EN_ENO_PARAMS, TIME IN1, LREAL IN2){
+ TEST_EN(TIME)
+ return __TIME_MUL(IN1, IN2);
+}
+static inline TIME __time_div(EN_ENO_PARAMS, TIME IN1, LREAL IN2){
+ TEST_EN(TIME)
+ return __TIME_DIV(IN1, IN2);
+}
+
/***************/
/* String ops */
/***************/
-static inline UINT __len(STRING IN){
+#define __STR_CMP(str1, str2) memcmp((char*)&str1.body,(char*)&str2.body, str1.len < str2.len ? str1.len : str2.len)
+
+static inline UINT __len(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(UINT)
return IN.len;
}
-static inline STRING __left(STRING IN, SINT L){
+static inline STRING __left(EN_ENO_PARAMS, STRING IN, SINT L){
+ TEST_EN_COND(STRING, L < 0)
STRING res = __INIT_STRING;
L = L < IN.len ? L : IN.len;
memcpy(&res.body, &IN.body, L);
res.len = L;
return res;
}
-static inline STRING __right(STRING IN, SINT L){
+static inline STRING __right(EN_ENO_PARAMS, STRING IN, SINT L){
+ TEST_EN_COND(STRING, L < 0)
STRING res = __INIT_STRING;
L = L < IN.len ? L : IN.len;
memcpy(&res.body, &IN.body[IN.len - L], L);
res.len = L;
return res;
}
-static inline STRING __mid(STRING IN, SINT L, SINT P){
+static inline STRING __mid(EN_ENO_PARAMS, STRING IN, SINT L, SINT P){
+ TEST_EN_COND(STRING, L < 0 || P < 0)
STRING res = __INIT_STRING;
if(P <= IN.len){
P -= 1; /* now can be used as [index]*/
@@ -303,7 +349,8 @@
}
return res;
}
-static inline STRING __concat(SINT param_count, ...){
+static inline STRING __concat(EN_ENO_PARAMS, SINT param_count, ...){
+ TEST_EN(STRING)
va_list ap;
UINT i;
__strlen_t charcount = 0;
@@ -325,7 +372,8 @@
va_end (ap); /* Clean up. */
return res;
}
-static inline STRING __insert(STRING IN1, STRING IN2, SINT P){
+static inline STRING __insert(EN_ENO_PARAMS, STRING IN1, STRING IN2, SINT P){
+ TEST_EN_COND(STRING, P < 0)
STRING res = __INIT_STRING;
__strlen_t to_copy;
@@ -343,7 +391,8 @@
return res;
}
-static inline STRING __delete(STRING IN, SINT L, SINT P){
+static inline STRING __delete(EN_ENO_PARAMS, STRING IN, SINT L, SINT P){
+ TEST_EN_COND(STRING, L < 0 || P < 0)
STRING res = __INIT_STRING;
__strlen_t to_copy;
@@ -359,7 +408,8 @@
return res;
}
-static inline STRING __replace(STRING IN1, STRING IN2, SINT L, SINT P){
+static inline STRING __replace(EN_ENO_PARAMS, STRING IN1, STRING IN2, SINT L, SINT P){
+ TEST_EN_COND(STRING, L < 0 || P < 0)
STRING res = __INIT_STRING;
__strlen_t to_copy;
@@ -400,7 +450,8 @@
}
return count2 == IN2->len -1 ? 0 : count1 + 1;
}
-static inline UINT __find(STRING IN1, STRING IN2){
+static inline UINT __find(EN_ENO_PARAMS, STRING IN1, STRING IN2){
+ TEST_EN(UINT)
return __pfind(&IN1, &IN2);
}
@@ -410,31 +461,36 @@
/***************/
/* TO_STRING */
/***************/
-static inline STRING __bool_to_string(BOOL IN)
+static inline STRING __bool_to_string(EN_ENO_PARAMS, BOOL IN)
{
+ TEST_EN(STRING)
if(IN)
return (STRING){4, "TRUE"};
return (STRING){5,"FALSE"};
}
-static inline STRING __bit_to_string(LWORD IN){
+static inline STRING __bit_to_string(EN_ENO_PARAMS, LWORD IN){
+ TEST_EN(STRING)
STRING res = __INIT_STRING;
res.len = snprintf((char*)res.body, STR_MAX_LEN, "16#%llx", IN);
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __real_to_string(LREAL IN){
+static inline STRING __real_to_string(EN_ENO_PARAMS, LREAL IN){
+ TEST_EN(STRING)
STRING res = __INIT_STRING;
res.len = snprintf((char*)res.body, STR_MAX_LEN, "%.10g", IN);
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __sint_to_string(LINT IN){
+static inline STRING __sint_to_string(EN_ENO_PARAMS, LINT IN){
+ TEST_EN(STRING)
STRING res = __INIT_STRING;
res.len = snprintf((char*)res.body, STR_MAX_LEN, "%lld", IN);
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __uint_to_string(ULINT IN){
+static inline STRING __uint_to_string(EN_ENO_PARAMS, ULINT IN){
+ TEST_EN(STRING)
STRING res = __INIT_STRING;
res.len = snprintf((char*)res.body, STR_MAX_LEN, "%llu", IN);
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
@@ -443,7 +499,8 @@
/***************/
/* FROM_STRING */
/***************/
-static inline BOOL __string_to_bool(STRING IN){
+static inline BOOL __string_to_bool(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(BOOL)
return IN.len == 5 ? !memcmp(&IN.body,"TRUE", IN.len) : 0;
}
@@ -510,16 +567,20 @@
return res;
}
-static inline LINT __string_to_sint(STRING IN){
+static inline LINT __string_to_sint(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(LINT)
return (LWORD)__pstring_to_sint(&IN);
}
-static inline LWORD __string_to_bit(STRING IN){
+static inline LWORD __string_to_bit(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(LWORD)
return (LWORD)__pstring_to_sint(&IN);
}
-static inline ULINT __string_to_uint(STRING IN){
+static inline ULINT __string_to_uint(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(ULINT)
return (ULINT)__pstring_to_sint(&IN);
}
-static inline LREAL __string_to_real(STRING IN){
+static inline LREAL __string_to_real(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(LREAL)
/* search the dot */
__strlen_t l = IN.len;
while(--l > 0 && IN.body[l] != '.');
@@ -533,14 +594,17 @@
/***************/
/* TO_TIME */
/***************/
-static inline TIME __int_to_time(LINT IN){
+static inline TIME __int_to_time(EN_ENO_PARAMS, LINT IN){
+ TEST_EN(TIME)
return (TIME){IN, 0};
}
-static inline TIME __real_to_time(LREAL IN){
+static inline TIME __real_to_time(EN_ENO_PARAMS, LREAL IN){
+ TEST_EN(TIME)
return (TIME){IN, (IN - (LINT)IN) * 1000000000};
}
-static inline TIME __string_to_time(STRING IN){
+static inline TIME __string_to_time(EN_ENO_PARAMS, STRING IN){
+ TEST_EN(TIME)
/* TODO :
*
* Duration literals without underlines: T#14ms T#-14ms T#14.7s T#14.7m
@@ -576,13 +640,16 @@
/***************/
/* FROM_TIME */
/***************/
-static inline LREAL __time_to_real(TIME IN){
+static inline LREAL __time_to_real(EN_ENO_PARAMS, TIME IN){
+ TEST_EN(LREAL)
return (LREAL)IN.tv_sec + ((LREAL)IN.tv_nsec/1000000000);
}
-static inline LINT __time_to_int(TIME IN){
+static inline LINT __time_to_int(EN_ENO_PARAMS, TIME IN){
+ TEST_EN(LINT)
return IN.tv_sec;
}
-static inline STRING __time_to_string(TIME IN){
+static inline STRING __time_to_string(EN_ENO_PARAMS, TIME IN){
+ TEST_EN(STRING)
/*t#5d14h12m18s3.5ms*/
STRING res = __INIT_STRING;
div_t days = div(IN.tv_sec ,86400);
@@ -608,7 +675,8 @@
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __date_to_string(DATE IN){
+static inline STRING __date_to_string(EN_ENO_PARAMS, DATE IN){
+ TEST_EN(STRING)
/* D#1984-06-25 */
STRING res = __INIT_STRING;
struct tm* broken_down_time;
@@ -621,7 +689,8 @@
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __tod_to_string(TOD IN){
+static inline STRING __tod_to_string(EN_ENO_PARAMS, TOD IN){
+ TEST_EN(STRING)
/* TOD#15:36:55.36 */
STRING res = __INIT_STRING;
struct tm* broken_down_time;
@@ -638,7 +707,8 @@
if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
return res;
}
-static inline STRING __dt_to_string(DT IN){
+static inline STRING __dt_to_string(EN_ENO_PARAMS, DT IN){
+ TEST_EN(STRING)
/* DT#1984-06-25-15:36:55.36 */
STRING res;
struct tm* broken_down_time;
@@ -669,7 +739,8 @@
}
/* BCD */
#define __bcd_digit(fac)
-static inline ULINT __bcd_to_uint(LWORD IN){
+static inline ULINT __bcd_to_uint(EN_ENO_PARAMS, LWORD IN){
+ TEST_EN(ULINT)
return IN & 0xf +
!(IN >>= 4) ? 0 : IN & 0xf * 10ULL +
!(IN >>= 4) ? 0 : IN & 0xf * 100ULL +
@@ -688,7 +759,8 @@
!(IN >>= 4) ? 0 : IN & 0xf * 1000000000000000ULL;
}
-static inline LWORD __uint_to_bcd(ULINT IN){
+static inline LWORD __uint_to_bcd(EN_ENO_PARAMS, ULINT IN){
+ TEST_EN(LWORD)
return (IN - (IN /= 10))|
(IN - (IN /= 10)) << 4 |
(IN - (IN /= 10)) << 8 |
@@ -707,60 +779,6 @@
(IN - (IN /= 10)) << 60;
}
-/**************/
-/* Binary ops */
-/**************/
-#define __ror_(TYPENAME)\
-static inline TYPENAME __ror_##TYPENAME( TYPENAME IN, USINT N){\
- N %= 8*sizeof(TYPENAME);\
- return (IN >> N) | (IN << 8*sizeof(TYPENAME)-N);\
-}
-/* Call previously defined macro for each ANY_NBIT */
-ANY_NBIT(__ror_)
-
-#define __rol_(TYPENAME)\
-static inline TYPENAME __rol_##TYPENAME( TYPENAME IN, USINT N){\
- N %= 8*sizeof(TYPENAME);\
- return (IN << N) | (IN >> 8*sizeof(TYPENAME)-N);\
-}
-/* Call previously defined macro for each ANY_NBIT */
-ANY_NBIT(__rol_)
-
-/**************/
-/* Selection */
-/**************/
- /**************/
- /* limit */
- /**************/
-
-#define __limit_(TYPENAME)\
-static inline TYPENAME __limit_##TYPENAME( TYPENAME MN, TYPENAME IN, TYPENAME MX){\
- return IN > MN ? IN < MX ? IN : MX : MN;\
-}
-
-/* Call previously defined macro for each concerned type */
-ANY_NBIT(__limit_)
-ANY_NUM(__limit_)
-
-#define __limit_time(TYPENAME)\
-static inline TIME __limit_##TYPENAME( TYPENAME MN, TYPENAME IN, TYPENAME MX){\
- return __TIME_CMP(IN, MN) > 0 ? /* IN>MN ?*/\
- __TIME_CMP(IN, MX) < 0 ? /* IN<MX ?*/\
- IN : MX : MN;\
-}
-
-/* Call previously defined macro for each concerned type */
-ANY_DATE(__limit_time)
-__limit_time(TIME)
-
-static inline STRING __limit_STRING( STRING MN, STRING IN, STRING MX){
- return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
-}
-
- /**************/
- /* MAX */
- /**************/
-
/* workaround for va-atgs limitation on shorter that int params */
#define VA_ARGS_REAL LREAL
#define VA_ARGS_LREAL LREAL
@@ -784,8 +802,213 @@
#define VA_ARGS_TOD TOD
#define VA_ARGS_DT DT
+/*******************************************/
+/* Arithmetic and bitwise functions */
+/*******************************************/
+#define __arith_expand(fname,TYPENAME, OP) \
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+ TEST_EN(TYPENAME)\
+ va_list ap;\
+ UINT i;\
+ \
+ va_start (ap, op1); /* Initialize the argument list. */\
+ \
+ for (i = 0; i < param_count - 1; i++){\
+ op1 = op1 OP va_arg (ap, VA_ARGS_##TYPENAME);\
+ }\
+ \
+ va_end (ap); /* Clean up. */\
+ return op1;\
+}
+
+#define __arith_static(fname,TYPENAME, OP) \
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+ TEST_EN(TYPENAME)\
+ return op1 OP op2;\
+}
+
+/**************/
+/* ADD */
+/**************/
+#define __add_(TYPENAME) __arith_expand(__add_, TYPENAME, + )
+ANY_NUM(__add_)
+
+/**************/
+/* MUL */
+/**************/
+#define __mul_(TYPENAME) __arith_expand(__mul_, TYPENAME, * )
+ANY_NUM(__mul_)
+
+/**************/
+/* SUB */
+/**************/
+#define __sub_(TYPENAME) __arith_static(__sub_, TYPENAME, - )
+ANY_NUM(__sub_)
+
+/**************/
+/* DIV */
+/**************/
+#define __div_(TYPENAME)\
+static inline TYPENAME __div_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1, TYPENAME op2){\
+ TEST_EN_COND(TYPENAME, op2 == 0)\
+ return op1 / op2;\
+}
+ANY_NUM(__div_)
+
+/**************/
+/* MOD */
+/**************/
+#define __mod_(TYPENAME) __arith_static(__mod_, TYPENAME, % )
+ANY_INT(__mod_)
+
+/**************/
+/* AND */
+/**************/
+__arith_expand(__and_, BOOL, && )
+#define __and_(TYPENAME) __arith_expand(__and_, TYPENAME, & )
+ANY_NBIT(__and_)
+
+/*************/
+/* OR */
+/*************/
+__arith_expand(__or_, BOOL, || )
+#define __or_(TYPENAME) __arith_expand(__or_, TYPENAME, |)
+ANY_NBIT(__or_)
+
+/**************/
+/* XOR */
+/**************/
+static inline BOOL __xor_BOOL(EN_ENO_PARAMS, UINT param_count, BOOL op1, ...){
+ TEST_EN(BOOL)
+ va_list ap;
+ UINT i;
+
+ va_start (ap, op1); /* Initialize the argument list. */
+
+ for (i = 0; i < param_count - 1; i++){
+ BOOL tmp = va_arg (ap, VA_ARGS_BOOL);
+ op1 = (op1 && !tmp) || (!op1 && tmp);
+ }
+
+ va_end (ap); /* Clean up. */
+ return op1;
+}
+#define __xor_(TYPENAME) __arith_expand(__xor_, TYPENAME, ^)
+ANY_NBIT(__xor_)
+
+/**************/
+/* NOT */
+/**************/
+static inline BOOL __not_BOOL(EN_ENO_PARAMS, BOOL op1){
+ TEST_EN(BOOL)
+ return !op1;
+}
+
+#define __not_(TYPENAME)\
+static inline TYPENAME __not_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+ TEST_EN(TYPENAME)\
+ return ~op1;\
+}
+ANY_NBIT(__not_)
+
+/***************/
+/* MOVE */
+/***************/
+#define __move_(TYPENAME)\
+static inline TYPENAME __move_##TYPENAME(EN_ENO_PARAMS, TYPENAME op1){\
+ TEST_EN(TYPENAME)\
+ return op1;\
+}
+ANY(__move_)
+
+/**************/
+/* Binary ops */
+/**************/
+#define __shift_(fname, TYPENAME, OP)\
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, TYPENAME IN, USINT N) {\
+ TEST_EN_COND(TYPENAME, N < 0)\
+ return IN OP N;\
+}
+
+#define __shl_(TYPENAME) __shift_(__shl_, TYPENAME, << )
+/* Call previously defined macro for each ANY_NBIT */
+ANY_NBIT(__shl_)
+
+#define __shr_(TYPENAME) __shift_(__shr_, TYPENAME, >> )
+/* Call previously defined macro for each ANY_NBIT */
+ANY_NBIT(__shr_)
+
+#define __ror_(TYPENAME)\
+static inline TYPENAME __ror_##TYPENAME(EN_ENO_PARAMS, TYPENAME IN, USINT N){\
+ TEST_EN_COND(TYPENAME, N < 0)\
+ N %= 8*sizeof(TYPENAME);\
+ return (IN >> N) | (IN << 8*sizeof(TYPENAME)-N);\
+}
+/* Call previously defined macro for each ANY_NBIT */
+ANY_NBIT(__ror_)
+
+#define __rol_(TYPENAME)\
+static inline TYPENAME __rol_##TYPENAME(EN_ENO_PARAMS, TYPENAME IN, USINT N){\
+ TEST_EN_COND(TYPENAME, N < 0)\
+ N %= 8*sizeof(TYPENAME);\
+ return (IN << N) | (IN >> 8*sizeof(TYPENAME)-N);\
+}
+/* Call previously defined macro for each ANY_NBIT */
+ANY_NBIT(__rol_)
+
+/**************/
+/* Selection */
+/**************/
+
+ /**************/
+ /* SEL */
+ /**************/
+
+#define __sel_(TYPENAME)\
+static inline TYPENAME __sel_##TYPENAME(EN_ENO_PARAMS, BOOL G, TYPENAME op0, TYPENAME op1){\
+ TEST_EN(TYPENAME)\
+ return G ? op1 : op0;\
+}
+ANY(__sel_)
+
+ /**************/
+ /* limit */
+ /**************/
+
+#define __limit_(TYPENAME)\
+static inline TYPENAME __limit_##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+ TEST_EN(TYPENAME)\
+ return IN > MN ? IN < MX ? IN : MX : MN;\
+}
+
+/* Call previously defined macro for each concerned type */
+ANY_NBIT(__limit_)
+ANY_NUM(__limit_)
+
+#define __limit_time(TYPENAME)\
+static inline TYPENAME __limit_##TYPENAME(EN_ENO_PARAMS, TYPENAME MN, TYPENAME IN, TYPENAME MX){\
+ TEST_EN(TYPENAME)\
+ return __TIME_CMP(IN, MN) > 0 ? /* IN>MN ?*/\
+ __TIME_CMP(IN, MX) < 0 ? /* IN<MX ?*/\
+ IN : MX : MN;\
+}
+
+/* Call previously defined macro for each concerned type */
+ANY_DATE(__limit_time)
+__limit_time(TIME)
+
+static inline STRING __limit_STRING(EN_ENO_PARAMS, STRING MN, STRING IN, STRING MX){
+ TEST_EN(STRING)
+ return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
+}
+
+ /**************/
+ /* MAX */
+ /**************/
+
#define __extrem_(fname,TYPENAME, COND) \
-static inline TYPENAME fname##TYPENAME( UINT param_count, TYPENAME op1, ...){\
+static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+ TEST_EN(TYPENAME)\
va_list ap;\
UINT i;\
\
@@ -830,7 +1053,8 @@
/* MUX */
/**************/
#define __mux_(TYPENAME) \
-static inline TYPENAME __mux_##TYPENAME( UINT param_count, UINT K, ...){\
+static inline TYPENAME __mux_##TYPENAME(EN_ENO_PARAMS, UINT param_count, UINT K, ...){\
+ TEST_EN_COND(TYPENAME, K < 0 || K >= param_count)\
va_list ap;\
UINT i;\
TYPENAME tmp = __INIT_##TYPENAME;\
@@ -858,7 +1082,8 @@
/**************/
#define __compare_(fname,TYPENAME, COND) \
-static inline BOOL fname##TYPENAME( UINT param_count, TYPENAME op1, ...){\
+static inline BOOL fname##TYPENAME(EN_ENO_PARAMS, UINT param_count, TYPENAME op1, ...){\
+ TEST_EN(BOOL)\
va_list ap;\
UINT i;\
\
@@ -885,6 +1110,7 @@
#define __compare_time(fname, TYPENAME, TEST) __compare_(fname, TYPENAME, __TIME_CMP(op1, tmp) TEST 0)
#define __compare_string(fname, TEST) __compare_(fname, STRING, __STR_CMP(op1, tmp) TEST 0 )
+
/**************/
/* GT */
/**************/
--- a/lib/iec_std_lib_generated.h Wed Oct 15 15:38:58 2008 +0200
+++ b/lib/iec_std_lib_generated.h Fri Oct 24 16:37:46 2008 +0200
@@ -15,10 +15,12 @@
*/
/****
- * IEC 61131-3 standard function lib
+ * IEC 61131-3 standard function library
* generated code, do not edit by hand
*/
+
+
/* Macro that expand to subtypes */
#define ANY(DO) ANY_DERIVED(DO) ANY_ELEMENTARY(DO)
#define ANY_DERIVED(DO)
--- a/stage1_2/standard_function_names.c Wed Oct 15 15:38:58 2008 +0200
+++ b/stage1_2/standard_function_names.c Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,386 +21,386 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
-
const char *standard_function_names[] = {
+"REAL_TO_SINT",
+"REAL_TO_LINT",
+"REAL_TO_DINT",
+"REAL_TO_DATE",
+"REAL_TO_DWORD",
+"REAL_TO_DT",
+"REAL_TO_TOD",
+"REAL_TO_UDINT",
+"REAL_TO_WORD",
+"REAL_TO_STRING",
+"REAL_TO_LWORD",
+"REAL_TO_UINT",
+"REAL_TO_LREAL",
+"REAL_TO_BYTE",
+"REAL_TO_USINT",
+"REAL_TO_ULINT",
+"REAL_TO_BOOL",
+"REAL_TO_TIME",
+"REAL_TO_INT",
+"SINT_TO_REAL",
+"SINT_TO_LINT",
+"SINT_TO_DINT",
+"SINT_TO_DATE",
+"SINT_TO_DWORD",
+"SINT_TO_DT",
+"SINT_TO_TOD",
+"SINT_TO_UDINT",
+"SINT_TO_WORD",
+"SINT_TO_STRING",
+"SINT_TO_LWORD",
+"SINT_TO_UINT",
+"SINT_TO_LREAL",
+"SINT_TO_BYTE",
+"SINT_TO_USINT",
+"SINT_TO_ULINT",
+"SINT_TO_BOOL",
+"SINT_TO_TIME",
+"SINT_TO_INT",
+"LINT_TO_REAL",
+"LINT_TO_SINT",
+"LINT_TO_DINT",
+"LINT_TO_DATE",
+"LINT_TO_DWORD",
+"LINT_TO_DT",
+"LINT_TO_TOD",
+"LINT_TO_UDINT",
+"LINT_TO_WORD",
+"LINT_TO_STRING",
+"LINT_TO_LWORD",
+"LINT_TO_UINT",
+"LINT_TO_LREAL",
+"LINT_TO_BYTE",
+"LINT_TO_USINT",
+"LINT_TO_ULINT",
+"LINT_TO_BOOL",
+"LINT_TO_TIME",
+"LINT_TO_INT",
+"DINT_TO_REAL",
+"DINT_TO_SINT",
+"DINT_TO_LINT",
+"DINT_TO_DATE",
+"DINT_TO_DWORD",
+"DINT_TO_DT",
+"DINT_TO_TOD",
+"DINT_TO_UDINT",
+"DINT_TO_WORD",
+"DINT_TO_STRING",
+"DINT_TO_LWORD",
+"DINT_TO_UINT",
+"DINT_TO_LREAL",
+"DINT_TO_BYTE",
+"DINT_TO_USINT",
+"DINT_TO_ULINT",
+"DINT_TO_BOOL",
+"DINT_TO_TIME",
+"DINT_TO_INT",
+"DATE_TO_REAL",
+"DATE_TO_SINT",
+"DATE_TO_LINT",
+"DATE_TO_DINT",
+"DATE_TO_DWORD",
+"DATE_TO_UDINT",
+"DATE_TO_WORD",
+"DATE_TO_STRING",
+"DATE_TO_LWORD",
+"DATE_TO_UINT",
+"DATE_TO_LREAL",
+"DATE_TO_BYTE",
+"DATE_TO_USINT",
+"DATE_TO_ULINT",
+"DATE_TO_INT",
+"DWORD_TO_REAL",
+"DWORD_TO_SINT",
+"DWORD_TO_LINT",
+"DWORD_TO_DINT",
+"DWORD_TO_DATE",
+"DWORD_TO_DT",
+"DWORD_TO_TOD",
+"DWORD_TO_UDINT",
+"DWORD_TO_WORD",
+"DWORD_TO_STRING",
+"DWORD_TO_LWORD",
+"DWORD_TO_UINT",
+"DWORD_TO_LREAL",
+"DWORD_TO_BYTE",
+"DWORD_TO_USINT",
+"DWORD_TO_ULINT",
+"DWORD_TO_BOOL",
+"DWORD_TO_TIME",
+"DWORD_TO_INT",
+"DT_TO_REAL",
+"DT_TO_SINT",
+"DT_TO_LINT",
+"DT_TO_DINT",
+"DT_TO_DWORD",
+"DT_TO_UDINT",
+"DT_TO_WORD",
+"DT_TO_STRING",
+"DT_TO_LWORD",
+"DT_TO_UINT",
+"DT_TO_LREAL",
+"DT_TO_BYTE",
+"DT_TO_USINT",
+"DT_TO_ULINT",
+"DT_TO_INT",
+"TOD_TO_REAL",
+"TOD_TO_SINT",
+"TOD_TO_LINT",
+"TOD_TO_DINT",
+"TOD_TO_DWORD",
+"TOD_TO_UDINT",
+"TOD_TO_WORD",
+"TOD_TO_STRING",
+"TOD_TO_LWORD",
+"TOD_TO_UINT",
+"TOD_TO_LREAL",
+"TOD_TO_BYTE",
+"TOD_TO_USINT",
+"TOD_TO_ULINT",
+"TOD_TO_INT",
+"UDINT_TO_REAL",
+"UDINT_TO_SINT",
+"UDINT_TO_LINT",
+"UDINT_TO_DINT",
+"UDINT_TO_DATE",
+"UDINT_TO_DWORD",
+"UDINT_TO_DT",
+"UDINT_TO_TOD",
+"UDINT_TO_WORD",
+"UDINT_TO_STRING",
+"UDINT_TO_LWORD",
+"UDINT_TO_UINT",
+"UDINT_TO_LREAL",
+"UDINT_TO_BYTE",
+"UDINT_TO_USINT",
+"UDINT_TO_ULINT",
+"UDINT_TO_BOOL",
+"UDINT_TO_TIME",
+"UDINT_TO_INT",
+"WORD_TO_REAL",
+"WORD_TO_SINT",
+"WORD_TO_LINT",
+"WORD_TO_DINT",
+"WORD_TO_DATE",
+"WORD_TO_DWORD",
+"WORD_TO_DT",
+"WORD_TO_TOD",
+"WORD_TO_UDINT",
+"WORD_TO_STRING",
+"WORD_TO_LWORD",
+"WORD_TO_UINT",
+"WORD_TO_LREAL",
+"WORD_TO_BYTE",
+"WORD_TO_USINT",
+"WORD_TO_ULINT",
+"WORD_TO_BOOL",
+"WORD_TO_TIME",
+"WORD_TO_INT",
+"STRING_TO_REAL",
+"STRING_TO_SINT",
+"STRING_TO_LINT",
+"STRING_TO_DINT",
+"STRING_TO_DATE",
+"STRING_TO_DWORD",
+"STRING_TO_DT",
+"STRING_TO_TOD",
+"STRING_TO_UDINT",
+"STRING_TO_WORD",
+"STRING_TO_LWORD",
+"STRING_TO_UINT",
+"STRING_TO_LREAL",
+"STRING_TO_BYTE",
+"STRING_TO_USINT",
+"STRING_TO_ULINT",
+"STRING_TO_BOOL",
+"STRING_TO_TIME",
+"STRING_TO_INT",
+"LWORD_TO_REAL",
+"LWORD_TO_SINT",
+"LWORD_TO_LINT",
+"LWORD_TO_DINT",
+"LWORD_TO_DATE",
+"LWORD_TO_DWORD",
+"LWORD_TO_DT",
+"LWORD_TO_TOD",
+"LWORD_TO_UDINT",
+"LWORD_TO_WORD",
+"LWORD_TO_STRING",
+"LWORD_TO_UINT",
+"LWORD_TO_LREAL",
+"LWORD_TO_BYTE",
+"LWORD_TO_USINT",
+"LWORD_TO_ULINT",
+"LWORD_TO_BOOL",
+"LWORD_TO_TIME",
+"LWORD_TO_INT",
+"UINT_TO_REAL",
+"UINT_TO_SINT",
+"UINT_TO_LINT",
+"UINT_TO_DINT",
+"UINT_TO_DATE",
+"UINT_TO_DWORD",
+"UINT_TO_DT",
+"UINT_TO_TOD",
+"UINT_TO_UDINT",
+"UINT_TO_WORD",
+"UINT_TO_STRING",
+"UINT_TO_LWORD",
+"UINT_TO_LREAL",
+"UINT_TO_BYTE",
+"UINT_TO_USINT",
+"UINT_TO_ULINT",
+"UINT_TO_BOOL",
+"UINT_TO_TIME",
+"UINT_TO_INT",
+"LREAL_TO_REAL",
+"LREAL_TO_SINT",
+"LREAL_TO_LINT",
+"LREAL_TO_DINT",
+"LREAL_TO_DATE",
+"LREAL_TO_DWORD",
+"LREAL_TO_DT",
+"LREAL_TO_TOD",
+"LREAL_TO_UDINT",
+"LREAL_TO_WORD",
+"LREAL_TO_STRING",
+"LREAL_TO_LWORD",
+"LREAL_TO_UINT",
+"LREAL_TO_BYTE",
+"LREAL_TO_USINT",
+"LREAL_TO_ULINT",
+"LREAL_TO_BOOL",
+"LREAL_TO_TIME",
+"LREAL_TO_INT",
+"BYTE_TO_REAL",
+"BYTE_TO_SINT",
+"BYTE_TO_LINT",
+"BYTE_TO_DINT",
+"BYTE_TO_DATE",
+"BYTE_TO_DWORD",
+"BYTE_TO_DT",
+"BYTE_TO_TOD",
+"BYTE_TO_UDINT",
+"BYTE_TO_WORD",
+"BYTE_TO_STRING",
+"BYTE_TO_LWORD",
+"BYTE_TO_UINT",
+"BYTE_TO_LREAL",
+"BYTE_TO_USINT",
+"BYTE_TO_ULINT",
+"BYTE_TO_BOOL",
+"BYTE_TO_TIME",
+"BYTE_TO_INT",
+"USINT_TO_REAL",
+"USINT_TO_SINT",
+"USINT_TO_LINT",
+"USINT_TO_DINT",
+"USINT_TO_DATE",
+"USINT_TO_DWORD",
+"USINT_TO_DT",
+"USINT_TO_TOD",
+"USINT_TO_UDINT",
+"USINT_TO_WORD",
+"USINT_TO_STRING",
+"USINT_TO_LWORD",
+"USINT_TO_UINT",
+"USINT_TO_LREAL",
+"USINT_TO_BYTE",
+"USINT_TO_ULINT",
+"USINT_TO_BOOL",
+"USINT_TO_TIME",
+"USINT_TO_INT",
+"ULINT_TO_REAL",
+"ULINT_TO_SINT",
+"ULINT_TO_LINT",
+"ULINT_TO_DINT",
+"ULINT_TO_DATE",
+"ULINT_TO_DWORD",
+"ULINT_TO_DT",
+"ULINT_TO_TOD",
+"ULINT_TO_UDINT",
+"ULINT_TO_WORD",
+"ULINT_TO_STRING",
+"ULINT_TO_LWORD",
+"ULINT_TO_UINT",
+"ULINT_TO_LREAL",
+"ULINT_TO_BYTE",
+"ULINT_TO_USINT",
+"ULINT_TO_BOOL",
+"ULINT_TO_TIME",
+"ULINT_TO_INT",
+"BOOL_TO_REAL",
"BOOL_TO_SINT",
+"BOOL_TO_LINT",
+"BOOL_TO_DINT",
+"BOOL_TO_DATE",
+"BOOL_TO_DWORD",
+"BOOL_TO_DT",
+"BOOL_TO_TOD",
+"BOOL_TO_UDINT",
+"BOOL_TO_WORD",
+"BOOL_TO_STRING",
+"BOOL_TO_LWORD",
+"BOOL_TO_UINT",
+"BOOL_TO_LREAL",
+"BOOL_TO_BYTE",
+"BOOL_TO_USINT",
+"BOOL_TO_ULINT",
+"BOOL_TO_TIME",
"BOOL_TO_INT",
-"BOOL_TO_DINT",
-"BOOL_TO_LINT",
-"BOOL_TO_USINT",
-"BOOL_TO_UINT",
-"BOOL_TO_UDINT",
-"BOOL_TO_ULINT",
-"BOOL_TO_REAL",
-"BOOL_TO_LREAL",
-"BOOL_TO_TIME",
-"BOOL_TO_DATE",
-"BOOL_TO_TOD",
-"BOOL_TO_DT",
-"BOOL_TO_STRING",
-"BOOL_TO_BYTE",
-"BOOL_TO_WORD",
-"BOOL_TO_DWORD",
-"BOOL_TO_LWORD",
-"SINT_TO_BOOL",
-"SINT_TO_INT",
-"SINT_TO_DINT",
-"SINT_TO_LINT",
-"SINT_TO_USINT",
-"SINT_TO_UINT",
-"SINT_TO_UDINT",
-"SINT_TO_ULINT",
-"SINT_TO_REAL",
-"SINT_TO_LREAL",
-"SINT_TO_TIME",
-"SINT_TO_DATE",
-"SINT_TO_TOD",
-"SINT_TO_DT",
-"SINT_TO_STRING",
-"SINT_TO_BYTE",
-"SINT_TO_WORD",
-"SINT_TO_DWORD",
-"SINT_TO_LWORD",
+"TIME_TO_REAL",
+"TIME_TO_SINT",
+"TIME_TO_LINT",
+"TIME_TO_DINT",
+"TIME_TO_DWORD",
+"TIME_TO_UDINT",
+"TIME_TO_WORD",
+"TIME_TO_STRING",
+"TIME_TO_LWORD",
+"TIME_TO_UINT",
+"TIME_TO_LREAL",
+"TIME_TO_BYTE",
+"TIME_TO_USINT",
+"TIME_TO_ULINT",
+"TIME_TO_INT",
+"INT_TO_REAL",
+"INT_TO_SINT",
+"INT_TO_LINT",
+"INT_TO_DINT",
+"INT_TO_DATE",
+"INT_TO_DWORD",
+"INT_TO_DT",
+"INT_TO_TOD",
+"INT_TO_UDINT",
+"INT_TO_WORD",
+"INT_TO_STRING",
+"INT_TO_LWORD",
+"INT_TO_UINT",
+"INT_TO_LREAL",
+"INT_TO_BYTE",
+"INT_TO_USINT",
+"INT_TO_ULINT",
"INT_TO_BOOL",
-"INT_TO_SINT",
-"INT_TO_DINT",
-"INT_TO_LINT",
-"INT_TO_USINT",
-"INT_TO_UINT",
-"INT_TO_UDINT",
-"INT_TO_ULINT",
-"INT_TO_REAL",
-"INT_TO_LREAL",
"INT_TO_TIME",
-"INT_TO_DATE",
-"INT_TO_TOD",
-"INT_TO_DT",
-"INT_TO_STRING",
-"INT_TO_BYTE",
-"INT_TO_WORD",
-"INT_TO_DWORD",
-"INT_TO_LWORD",
-"DINT_TO_BOOL",
-"DINT_TO_SINT",
-"DINT_TO_INT",
-"DINT_TO_LINT",
-"DINT_TO_USINT",
-"DINT_TO_UINT",
-"DINT_TO_UDINT",
-"DINT_TO_ULINT",
-"DINT_TO_REAL",
-"DINT_TO_LREAL",
-"DINT_TO_TIME",
-"DINT_TO_DATE",
-"DINT_TO_TOD",
-"DINT_TO_DT",
-"DINT_TO_STRING",
-"DINT_TO_BYTE",
-"DINT_TO_WORD",
-"DINT_TO_DWORD",
-"DINT_TO_LWORD",
-"LINT_TO_BOOL",
-"LINT_TO_SINT",
-"LINT_TO_INT",
-"LINT_TO_DINT",
-"LINT_TO_USINT",
-"LINT_TO_UINT",
-"LINT_TO_UDINT",
-"LINT_TO_ULINT",
-"LINT_TO_REAL",
-"LINT_TO_LREAL",
-"LINT_TO_TIME",
-"LINT_TO_DATE",
-"LINT_TO_TOD",
-"LINT_TO_DT",
-"LINT_TO_STRING",
-"LINT_TO_BYTE",
-"LINT_TO_WORD",
-"LINT_TO_DWORD",
-"LINT_TO_LWORD",
-"USINT_TO_BOOL",
-"USINT_TO_SINT",
-"USINT_TO_INT",
-"USINT_TO_DINT",
-"USINT_TO_LINT",
-"USINT_TO_UINT",
-"USINT_TO_UDINT",
-"USINT_TO_ULINT",
-"USINT_TO_REAL",
-"USINT_TO_LREAL",
-"USINT_TO_TIME",
-"USINT_TO_DATE",
-"USINT_TO_TOD",
-"USINT_TO_DT",
-"USINT_TO_STRING",
-"USINT_TO_BYTE",
-"USINT_TO_WORD",
-"USINT_TO_DWORD",
-"USINT_TO_LWORD",
-"UINT_TO_BOOL",
-"UINT_TO_SINT",
-"UINT_TO_INT",
-"UINT_TO_DINT",
-"UINT_TO_LINT",
-"UINT_TO_USINT",
-"UINT_TO_UDINT",
-"UINT_TO_ULINT",
-"UINT_TO_REAL",
-"UINT_TO_LREAL",
-"UINT_TO_TIME",
-"UINT_TO_DATE",
-"UINT_TO_TOD",
-"UINT_TO_DT",
-"UINT_TO_STRING",
-"UINT_TO_BYTE",
-"UINT_TO_WORD",
-"UINT_TO_DWORD",
-"UINT_TO_LWORD",
-"UDINT_TO_BOOL",
-"UDINT_TO_SINT",
-"UDINT_TO_INT",
-"UDINT_TO_DINT",
-"UDINT_TO_LINT",
-"UDINT_TO_USINT",
-"UDINT_TO_UINT",
-"UDINT_TO_ULINT",
-"UDINT_TO_REAL",
-"UDINT_TO_LREAL",
-"UDINT_TO_TIME",
-"UDINT_TO_DATE",
-"UDINT_TO_TOD",
-"UDINT_TO_DT",
-"UDINT_TO_STRING",
-"UDINT_TO_BYTE",
-"UDINT_TO_WORD",
-"UDINT_TO_DWORD",
-"UDINT_TO_LWORD",
-"ULINT_TO_BOOL",
-"ULINT_TO_SINT",
-"ULINT_TO_INT",
-"ULINT_TO_DINT",
-"ULINT_TO_LINT",
-"ULINT_TO_USINT",
-"ULINT_TO_UINT",
-"ULINT_TO_UDINT",
-"ULINT_TO_REAL",
-"ULINT_TO_LREAL",
-"ULINT_TO_TIME",
-"ULINT_TO_DATE",
-"ULINT_TO_TOD",
-"ULINT_TO_DT",
-"ULINT_TO_STRING",
-"ULINT_TO_BYTE",
-"ULINT_TO_WORD",
-"ULINT_TO_DWORD",
-"ULINT_TO_LWORD",
-"REAL_TO_BOOL",
-"REAL_TO_SINT",
-"REAL_TO_INT",
-"REAL_TO_DINT",
-"REAL_TO_LINT",
-"REAL_TO_USINT",
-"REAL_TO_UINT",
-"REAL_TO_UDINT",
-"REAL_TO_ULINT",
-"REAL_TO_LREAL",
-"REAL_TO_TIME",
-"REAL_TO_DATE",
-"REAL_TO_TOD",
-"REAL_TO_DT",
-"REAL_TO_STRING",
-"REAL_TO_BYTE",
-"REAL_TO_WORD",
-"REAL_TO_DWORD",
-"REAL_TO_LWORD",
-"LREAL_TO_BOOL",
-"LREAL_TO_SINT",
-"LREAL_TO_INT",
-"LREAL_TO_DINT",
-"LREAL_TO_LINT",
-"LREAL_TO_USINT",
-"LREAL_TO_UINT",
-"LREAL_TO_UDINT",
-"LREAL_TO_ULINT",
-"LREAL_TO_REAL",
-"LREAL_TO_TIME",
-"LREAL_TO_DATE",
-"LREAL_TO_TOD",
-"LREAL_TO_DT",
-"LREAL_TO_STRING",
-"LREAL_TO_BYTE",
-"LREAL_TO_WORD",
-"LREAL_TO_DWORD",
-"LREAL_TO_LWORD",
-"TIME_TO_SINT",
-"TIME_TO_INT",
-"TIME_TO_DINT",
-"TIME_TO_LINT",
-"TIME_TO_USINT",
-"TIME_TO_UINT",
-"TIME_TO_UDINT",
-"TIME_TO_ULINT",
-"TIME_TO_REAL",
-"TIME_TO_LREAL",
-"TIME_TO_STRING",
-"TIME_TO_BYTE",
-"TIME_TO_WORD",
-"TIME_TO_DWORD",
-"TIME_TO_LWORD",
-"DATE_TO_SINT",
-"DATE_TO_INT",
-"DATE_TO_DINT",
-"DATE_TO_LINT",
-"DATE_TO_USINT",
-"DATE_TO_UINT",
-"DATE_TO_UDINT",
-"DATE_TO_ULINT",
-"DATE_TO_REAL",
-"DATE_TO_LREAL",
-"DATE_TO_STRING",
-"DATE_TO_BYTE",
-"DATE_TO_WORD",
-"DATE_TO_DWORD",
-"DATE_TO_LWORD",
-"TOD_TO_SINT",
-"TOD_TO_INT",
-"TOD_TO_DINT",
-"TOD_TO_LINT",
-"TOD_TO_USINT",
-"TOD_TO_UINT",
-"TOD_TO_UDINT",
-"TOD_TO_ULINT",
-"TOD_TO_REAL",
-"TOD_TO_LREAL",
-"TOD_TO_STRING",
-"TOD_TO_BYTE",
-"TOD_TO_WORD",
-"TOD_TO_DWORD",
-"TOD_TO_LWORD",
-"DT_TO_SINT",
-"DT_TO_INT",
-"DT_TO_DINT",
-"DT_TO_LINT",
-"DT_TO_USINT",
-"DT_TO_UINT",
-"DT_TO_UDINT",
-"DT_TO_ULINT",
-"DT_TO_REAL",
-"DT_TO_LREAL",
-"DT_TO_STRING",
-"DT_TO_BYTE",
-"DT_TO_WORD",
-"DT_TO_DWORD",
-"DT_TO_LWORD",
-"STRING_TO_BOOL",
-"STRING_TO_SINT",
-"STRING_TO_INT",
-"STRING_TO_DINT",
-"STRING_TO_LINT",
-"STRING_TO_USINT",
-"STRING_TO_UINT",
-"STRING_TO_UDINT",
-"STRING_TO_ULINT",
-"STRING_TO_REAL",
-"STRING_TO_LREAL",
-"STRING_TO_TIME",
-"STRING_TO_DATE",
-"STRING_TO_TOD",
-"STRING_TO_DT",
-"STRING_TO_BYTE",
-"STRING_TO_WORD",
-"STRING_TO_DWORD",
-"STRING_TO_LWORD",
-"BYTE_TO_BOOL",
-"BYTE_TO_SINT",
-"BYTE_TO_INT",
-"BYTE_TO_DINT",
-"BYTE_TO_LINT",
-"BYTE_TO_USINT",
-"BYTE_TO_UINT",
-"BYTE_TO_UDINT",
-"BYTE_TO_ULINT",
-"BYTE_TO_REAL",
-"BYTE_TO_LREAL",
-"BYTE_TO_TIME",
-"BYTE_TO_DATE",
-"BYTE_TO_TOD",
-"BYTE_TO_DT",
-"BYTE_TO_STRING",
-"BYTE_TO_WORD",
-"BYTE_TO_DWORD",
-"BYTE_TO_LWORD",
-"WORD_TO_BOOL",
-"WORD_TO_SINT",
-"WORD_TO_INT",
-"WORD_TO_DINT",
-"WORD_TO_LINT",
-"WORD_TO_USINT",
-"WORD_TO_UINT",
-"WORD_TO_UDINT",
-"WORD_TO_ULINT",
-"WORD_TO_REAL",
-"WORD_TO_LREAL",
-"WORD_TO_TIME",
-"WORD_TO_DATE",
-"WORD_TO_TOD",
-"WORD_TO_DT",
-"WORD_TO_STRING",
-"WORD_TO_BYTE",
-"WORD_TO_DWORD",
-"WORD_TO_LWORD",
-"DWORD_TO_BOOL",
-"DWORD_TO_SINT",
-"DWORD_TO_INT",
-"DWORD_TO_DINT",
-"DWORD_TO_LINT",
-"DWORD_TO_USINT",
-"DWORD_TO_UINT",
-"DWORD_TO_UDINT",
-"DWORD_TO_ULINT",
-"DWORD_TO_REAL",
-"DWORD_TO_LREAL",
-"DWORD_TO_TIME",
-"DWORD_TO_DATE",
-"DWORD_TO_TOD",
-"DWORD_TO_DT",
-"DWORD_TO_STRING",
-"DWORD_TO_BYTE",
-"DWORD_TO_WORD",
-"DWORD_TO_LWORD",
-"LWORD_TO_BOOL",
-"LWORD_TO_SINT",
-"LWORD_TO_INT",
-"LWORD_TO_DINT",
-"LWORD_TO_LINT",
-"LWORD_TO_USINT",
-"LWORD_TO_UINT",
-"LWORD_TO_UDINT",
-"LWORD_TO_ULINT",
-"LWORD_TO_REAL",
-"LWORD_TO_LREAL",
-"LWORD_TO_TIME",
-"LWORD_TO_DATE",
-"LWORD_TO_TOD",
-"LWORD_TO_DT",
-"LWORD_TO_STRING",
-"LWORD_TO_BYTE",
-"LWORD_TO_WORD",
-"LWORD_TO_DWORD",
"TRUNC",
+"BCD_TO_UDINT",
+"BCD_TO_UINT",
+"BCD_TO_ULINT",
"BCD_TO_USINT",
-"BCD_TO_UINT",
-"BCD_TO_UDINT",
-"BCD_TO_ULINT",
+"UDINT_TO_BCD",
+"UINT_TO_BCD",
"USINT_TO_BCD",
-"UINT_TO_BCD",
-"UDINT_TO_BCD",
"ULINT_TO_BCD",
"DATE_AND_TIME_TO_TIME_OF_DAY",
"DATE_AND_TIME_TO_DATE",
--- a/stage4/generate_c/function_type_decl.h Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/function_type_decl.h Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,385 +21,386 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
typedef enum {
+ function_real_to_sint,
+ function_real_to_lint,
+ function_real_to_dint,
+ function_real_to_date,
+ function_real_to_dword,
+ function_real_to_dt,
+ function_real_to_tod,
+ function_real_to_udint,
+ function_real_to_word,
+ function_real_to_string,
+ function_real_to_lword,
+ function_real_to_uint,
+ function_real_to_lreal,
+ function_real_to_byte,
+ function_real_to_usint,
+ function_real_to_ulint,
+ function_real_to_bool,
+ function_real_to_time,
+ function_real_to_int,
+ function_sint_to_real,
+ function_sint_to_lint,
+ function_sint_to_dint,
+ function_sint_to_date,
+ function_sint_to_dword,
+ function_sint_to_dt,
+ function_sint_to_tod,
+ function_sint_to_udint,
+ function_sint_to_word,
+ function_sint_to_string,
+ function_sint_to_lword,
+ function_sint_to_uint,
+ function_sint_to_lreal,
+ function_sint_to_byte,
+ function_sint_to_usint,
+ function_sint_to_ulint,
+ function_sint_to_bool,
+ function_sint_to_time,
+ function_sint_to_int,
+ function_lint_to_real,
+ function_lint_to_sint,
+ function_lint_to_dint,
+ function_lint_to_date,
+ function_lint_to_dword,
+ function_lint_to_dt,
+ function_lint_to_tod,
+ function_lint_to_udint,
+ function_lint_to_word,
+ function_lint_to_string,
+ function_lint_to_lword,
+ function_lint_to_uint,
+ function_lint_to_lreal,
+ function_lint_to_byte,
+ function_lint_to_usint,
+ function_lint_to_ulint,
+ function_lint_to_bool,
+ function_lint_to_time,
+ function_lint_to_int,
+ function_dint_to_real,
+ function_dint_to_sint,
+ function_dint_to_lint,
+ function_dint_to_date,
+ function_dint_to_dword,
+ function_dint_to_dt,
+ function_dint_to_tod,
+ function_dint_to_udint,
+ function_dint_to_word,
+ function_dint_to_string,
+ function_dint_to_lword,
+ function_dint_to_uint,
+ function_dint_to_lreal,
+ function_dint_to_byte,
+ function_dint_to_usint,
+ function_dint_to_ulint,
+ function_dint_to_bool,
+ function_dint_to_time,
+ function_dint_to_int,
+ function_date_to_real,
+ function_date_to_sint,
+ function_date_to_lint,
+ function_date_to_dint,
+ function_date_to_dword,
+ function_date_to_udint,
+ function_date_to_word,
+ function_date_to_string,
+ function_date_to_lword,
+ function_date_to_uint,
+ function_date_to_lreal,
+ function_date_to_byte,
+ function_date_to_usint,
+ function_date_to_ulint,
+ function_date_to_int,
+ function_dword_to_real,
+ function_dword_to_sint,
+ function_dword_to_lint,
+ function_dword_to_dint,
+ function_dword_to_date,
+ function_dword_to_dt,
+ function_dword_to_tod,
+ function_dword_to_udint,
+ function_dword_to_word,
+ function_dword_to_string,
+ function_dword_to_lword,
+ function_dword_to_uint,
+ function_dword_to_lreal,
+ function_dword_to_byte,
+ function_dword_to_usint,
+ function_dword_to_ulint,
+ function_dword_to_bool,
+ function_dword_to_time,
+ function_dword_to_int,
+ function_dt_to_real,
+ function_dt_to_sint,
+ function_dt_to_lint,
+ function_dt_to_dint,
+ function_dt_to_dword,
+ function_dt_to_udint,
+ function_dt_to_word,
+ function_dt_to_string,
+ function_dt_to_lword,
+ function_dt_to_uint,
+ function_dt_to_lreal,
+ function_dt_to_byte,
+ function_dt_to_usint,
+ function_dt_to_ulint,
+ function_dt_to_int,
+ function_tod_to_real,
+ function_tod_to_sint,
+ function_tod_to_lint,
+ function_tod_to_dint,
+ function_tod_to_dword,
+ function_tod_to_udint,
+ function_tod_to_word,
+ function_tod_to_string,
+ function_tod_to_lword,
+ function_tod_to_uint,
+ function_tod_to_lreal,
+ function_tod_to_byte,
+ function_tod_to_usint,
+ function_tod_to_ulint,
+ function_tod_to_int,
+ function_udint_to_real,
+ function_udint_to_sint,
+ function_udint_to_lint,
+ function_udint_to_dint,
+ function_udint_to_date,
+ function_udint_to_dword,
+ function_udint_to_dt,
+ function_udint_to_tod,
+ function_udint_to_word,
+ function_udint_to_string,
+ function_udint_to_lword,
+ function_udint_to_uint,
+ function_udint_to_lreal,
+ function_udint_to_byte,
+ function_udint_to_usint,
+ function_udint_to_ulint,
+ function_udint_to_bool,
+ function_udint_to_time,
+ function_udint_to_int,
+ function_word_to_real,
+ function_word_to_sint,
+ function_word_to_lint,
+ function_word_to_dint,
+ function_word_to_date,
+ function_word_to_dword,
+ function_word_to_dt,
+ function_word_to_tod,
+ function_word_to_udint,
+ function_word_to_string,
+ function_word_to_lword,
+ function_word_to_uint,
+ function_word_to_lreal,
+ function_word_to_byte,
+ function_word_to_usint,
+ function_word_to_ulint,
+ function_word_to_bool,
+ function_word_to_time,
+ function_word_to_int,
+ function_string_to_real,
+ function_string_to_sint,
+ function_string_to_lint,
+ function_string_to_dint,
+ function_string_to_date,
+ function_string_to_dword,
+ function_string_to_dt,
+ function_string_to_tod,
+ function_string_to_udint,
+ function_string_to_word,
+ function_string_to_lword,
+ function_string_to_uint,
+ function_string_to_lreal,
+ function_string_to_byte,
+ function_string_to_usint,
+ function_string_to_ulint,
+ function_string_to_bool,
+ function_string_to_time,
+ function_string_to_int,
+ function_lword_to_real,
+ function_lword_to_sint,
+ function_lword_to_lint,
+ function_lword_to_dint,
+ function_lword_to_date,
+ function_lword_to_dword,
+ function_lword_to_dt,
+ function_lword_to_tod,
+ function_lword_to_udint,
+ function_lword_to_word,
+ function_lword_to_string,
+ function_lword_to_uint,
+ function_lword_to_lreal,
+ function_lword_to_byte,
+ function_lword_to_usint,
+ function_lword_to_ulint,
+ function_lword_to_bool,
+ function_lword_to_time,
+ function_lword_to_int,
+ function_uint_to_real,
+ function_uint_to_sint,
+ function_uint_to_lint,
+ function_uint_to_dint,
+ function_uint_to_date,
+ function_uint_to_dword,
+ function_uint_to_dt,
+ function_uint_to_tod,
+ function_uint_to_udint,
+ function_uint_to_word,
+ function_uint_to_string,
+ function_uint_to_lword,
+ function_uint_to_lreal,
+ function_uint_to_byte,
+ function_uint_to_usint,
+ function_uint_to_ulint,
+ function_uint_to_bool,
+ function_uint_to_time,
+ function_uint_to_int,
+ function_lreal_to_real,
+ function_lreal_to_sint,
+ function_lreal_to_lint,
+ function_lreal_to_dint,
+ function_lreal_to_date,
+ function_lreal_to_dword,
+ function_lreal_to_dt,
+ function_lreal_to_tod,
+ function_lreal_to_udint,
+ function_lreal_to_word,
+ function_lreal_to_string,
+ function_lreal_to_lword,
+ function_lreal_to_uint,
+ function_lreal_to_byte,
+ function_lreal_to_usint,
+ function_lreal_to_ulint,
+ function_lreal_to_bool,
+ function_lreal_to_time,
+ function_lreal_to_int,
+ function_byte_to_real,
+ function_byte_to_sint,
+ function_byte_to_lint,
+ function_byte_to_dint,
+ function_byte_to_date,
+ function_byte_to_dword,
+ function_byte_to_dt,
+ function_byte_to_tod,
+ function_byte_to_udint,
+ function_byte_to_word,
+ function_byte_to_string,
+ function_byte_to_lword,
+ function_byte_to_uint,
+ function_byte_to_lreal,
+ function_byte_to_usint,
+ function_byte_to_ulint,
+ function_byte_to_bool,
+ function_byte_to_time,
+ function_byte_to_int,
+ function_usint_to_real,
+ function_usint_to_sint,
+ function_usint_to_lint,
+ function_usint_to_dint,
+ function_usint_to_date,
+ function_usint_to_dword,
+ function_usint_to_dt,
+ function_usint_to_tod,
+ function_usint_to_udint,
+ function_usint_to_word,
+ function_usint_to_string,
+ function_usint_to_lword,
+ function_usint_to_uint,
+ function_usint_to_lreal,
+ function_usint_to_byte,
+ function_usint_to_ulint,
+ function_usint_to_bool,
+ function_usint_to_time,
+ function_usint_to_int,
+ function_ulint_to_real,
+ function_ulint_to_sint,
+ function_ulint_to_lint,
+ function_ulint_to_dint,
+ function_ulint_to_date,
+ function_ulint_to_dword,
+ function_ulint_to_dt,
+ function_ulint_to_tod,
+ function_ulint_to_udint,
+ function_ulint_to_word,
+ function_ulint_to_string,
+ function_ulint_to_lword,
+ function_ulint_to_uint,
+ function_ulint_to_lreal,
+ function_ulint_to_byte,
+ function_ulint_to_usint,
+ function_ulint_to_bool,
+ function_ulint_to_time,
+ function_ulint_to_int,
+ function_bool_to_real,
function_bool_to_sint,
+ function_bool_to_lint,
+ function_bool_to_dint,
+ function_bool_to_date,
+ function_bool_to_dword,
+ function_bool_to_dt,
+ function_bool_to_tod,
+ function_bool_to_udint,
+ function_bool_to_word,
+ function_bool_to_string,
+ function_bool_to_lword,
+ function_bool_to_uint,
+ function_bool_to_lreal,
+ function_bool_to_byte,
+ function_bool_to_usint,
+ function_bool_to_ulint,
+ function_bool_to_time,
function_bool_to_int,
- function_bool_to_dint,
- function_bool_to_lint,
- function_bool_to_usint,
- function_bool_to_uint,
- function_bool_to_udint,
- function_bool_to_ulint,
- function_bool_to_real,
- function_bool_to_lreal,
- function_bool_to_time,
- function_bool_to_date,
- function_bool_to_tod,
- function_bool_to_dt,
- function_bool_to_string,
- function_bool_to_byte,
- function_bool_to_word,
- function_bool_to_dword,
- function_bool_to_lword,
- function_sint_to_bool,
- function_sint_to_int,
- function_sint_to_dint,
- function_sint_to_lint,
- function_sint_to_usint,
- function_sint_to_uint,
- function_sint_to_udint,
- function_sint_to_ulint,
- function_sint_to_real,
- function_sint_to_lreal,
- function_sint_to_time,
- function_sint_to_date,
- function_sint_to_tod,
- function_sint_to_dt,
- function_sint_to_string,
- function_sint_to_byte,
- function_sint_to_word,
- function_sint_to_dword,
- function_sint_to_lword,
+ function_time_to_real,
+ function_time_to_sint,
+ function_time_to_lint,
+ function_time_to_dint,
+ function_time_to_dword,
+ function_time_to_udint,
+ function_time_to_word,
+ function_time_to_string,
+ function_time_to_lword,
+ function_time_to_uint,
+ function_time_to_lreal,
+ function_time_to_byte,
+ function_time_to_usint,
+ function_time_to_ulint,
+ function_time_to_int,
+ function_int_to_real,
+ function_int_to_sint,
+ function_int_to_lint,
+ function_int_to_dint,
+ function_int_to_date,
+ function_int_to_dword,
+ function_int_to_dt,
+ function_int_to_tod,
+ function_int_to_udint,
+ function_int_to_word,
+ function_int_to_string,
+ function_int_to_lword,
+ function_int_to_uint,
+ function_int_to_lreal,
+ function_int_to_byte,
+ function_int_to_usint,
+ function_int_to_ulint,
function_int_to_bool,
- function_int_to_sint,
- function_int_to_dint,
- function_int_to_lint,
- function_int_to_usint,
- function_int_to_uint,
- function_int_to_udint,
- function_int_to_ulint,
- function_int_to_real,
- function_int_to_lreal,
function_int_to_time,
- function_int_to_date,
- function_int_to_tod,
- function_int_to_dt,
- function_int_to_string,
- function_int_to_byte,
- function_int_to_word,
- function_int_to_dword,
- function_int_to_lword,
- function_dint_to_bool,
- function_dint_to_sint,
- function_dint_to_int,
- function_dint_to_lint,
- function_dint_to_usint,
- function_dint_to_uint,
- function_dint_to_udint,
- function_dint_to_ulint,
- function_dint_to_real,
- function_dint_to_lreal,
- function_dint_to_time,
- function_dint_to_date,
- function_dint_to_tod,
- function_dint_to_dt,
- function_dint_to_string,
- function_dint_to_byte,
- function_dint_to_word,
- function_dint_to_dword,
- function_dint_to_lword,
- function_lint_to_bool,
- function_lint_to_sint,
- function_lint_to_int,
- function_lint_to_dint,
- function_lint_to_usint,
- function_lint_to_uint,
- function_lint_to_udint,
- function_lint_to_ulint,
- function_lint_to_real,
- function_lint_to_lreal,
- function_lint_to_time,
- function_lint_to_date,
- function_lint_to_tod,
- function_lint_to_dt,
- function_lint_to_string,
- function_lint_to_byte,
- function_lint_to_word,
- function_lint_to_dword,
- function_lint_to_lword,
- function_usint_to_bool,
- function_usint_to_sint,
- function_usint_to_int,
- function_usint_to_dint,
- function_usint_to_lint,
- function_usint_to_uint,
- function_usint_to_udint,
- function_usint_to_ulint,
- function_usint_to_real,
- function_usint_to_lreal,
- function_usint_to_time,
- function_usint_to_date,
- function_usint_to_tod,
- function_usint_to_dt,
- function_usint_to_string,
- function_usint_to_byte,
- function_usint_to_word,
- function_usint_to_dword,
- function_usint_to_lword,
- function_uint_to_bool,
- function_uint_to_sint,
- function_uint_to_int,
- function_uint_to_dint,
- function_uint_to_lint,
- function_uint_to_usint,
- function_uint_to_udint,
- function_uint_to_ulint,
- function_uint_to_real,
- function_uint_to_lreal,
- function_uint_to_time,
- function_uint_to_date,
- function_uint_to_tod,
- function_uint_to_dt,
- function_uint_to_string,
- function_uint_to_byte,
- function_uint_to_word,
- function_uint_to_dword,
- function_uint_to_lword,
- function_udint_to_bool,
- function_udint_to_sint,
- function_udint_to_int,
- function_udint_to_dint,
- function_udint_to_lint,
- function_udint_to_usint,
- function_udint_to_uint,
- function_udint_to_ulint,
- function_udint_to_real,
- function_udint_to_lreal,
- function_udint_to_time,
- function_udint_to_date,
- function_udint_to_tod,
- function_udint_to_dt,
- function_udint_to_string,
- function_udint_to_byte,
- function_udint_to_word,
- function_udint_to_dword,
- function_udint_to_lword,
- function_ulint_to_bool,
- function_ulint_to_sint,
- function_ulint_to_int,
- function_ulint_to_dint,
- function_ulint_to_lint,
- function_ulint_to_usint,
- function_ulint_to_uint,
- function_ulint_to_udint,
- function_ulint_to_real,
- function_ulint_to_lreal,
- function_ulint_to_time,
- function_ulint_to_date,
- function_ulint_to_tod,
- function_ulint_to_dt,
- function_ulint_to_string,
- function_ulint_to_byte,
- function_ulint_to_word,
- function_ulint_to_dword,
- function_ulint_to_lword,
- function_real_to_bool,
- function_real_to_sint,
- function_real_to_int,
- function_real_to_dint,
- function_real_to_lint,
- function_real_to_usint,
- function_real_to_uint,
- function_real_to_udint,
- function_real_to_ulint,
- function_real_to_lreal,
- function_real_to_time,
- function_real_to_date,
- function_real_to_tod,
- function_real_to_dt,
- function_real_to_string,
- function_real_to_byte,
- function_real_to_word,
- function_real_to_dword,
- function_real_to_lword,
- function_lreal_to_bool,
- function_lreal_to_sint,
- function_lreal_to_int,
- function_lreal_to_dint,
- function_lreal_to_lint,
- function_lreal_to_usint,
- function_lreal_to_uint,
- function_lreal_to_udint,
- function_lreal_to_ulint,
- function_lreal_to_real,
- function_lreal_to_time,
- function_lreal_to_date,
- function_lreal_to_tod,
- function_lreal_to_dt,
- function_lreal_to_string,
- function_lreal_to_byte,
- function_lreal_to_word,
- function_lreal_to_dword,
- function_lreal_to_lword,
- function_time_to_sint,
- function_time_to_int,
- function_time_to_dint,
- function_time_to_lint,
- function_time_to_usint,
- function_time_to_uint,
- function_time_to_udint,
- function_time_to_ulint,
- function_time_to_real,
- function_time_to_lreal,
- function_time_to_string,
- function_time_to_byte,
- function_time_to_word,
- function_time_to_dword,
- function_time_to_lword,
- function_date_to_sint,
- function_date_to_int,
- function_date_to_dint,
- function_date_to_lint,
- function_date_to_usint,
- function_date_to_uint,
- function_date_to_udint,
- function_date_to_ulint,
- function_date_to_real,
- function_date_to_lreal,
- function_date_to_string,
- function_date_to_byte,
- function_date_to_word,
- function_date_to_dword,
- function_date_to_lword,
- function_tod_to_sint,
- function_tod_to_int,
- function_tod_to_dint,
- function_tod_to_lint,
- function_tod_to_usint,
- function_tod_to_uint,
- function_tod_to_udint,
- function_tod_to_ulint,
- function_tod_to_real,
- function_tod_to_lreal,
- function_tod_to_string,
- function_tod_to_byte,
- function_tod_to_word,
- function_tod_to_dword,
- function_tod_to_lword,
- function_dt_to_sint,
- function_dt_to_int,
- function_dt_to_dint,
- function_dt_to_lint,
- function_dt_to_usint,
- function_dt_to_uint,
- function_dt_to_udint,
- function_dt_to_ulint,
- function_dt_to_real,
- function_dt_to_lreal,
- function_dt_to_string,
- function_dt_to_byte,
- function_dt_to_word,
- function_dt_to_dword,
- function_dt_to_lword,
- function_string_to_bool,
- function_string_to_sint,
- function_string_to_int,
- function_string_to_dint,
- function_string_to_lint,
- function_string_to_usint,
- function_string_to_uint,
- function_string_to_udint,
- function_string_to_ulint,
- function_string_to_real,
- function_string_to_lreal,
- function_string_to_time,
- function_string_to_date,
- function_string_to_tod,
- function_string_to_dt,
- function_string_to_byte,
- function_string_to_word,
- function_string_to_dword,
- function_string_to_lword,
- function_byte_to_bool,
- function_byte_to_sint,
- function_byte_to_int,
- function_byte_to_dint,
- function_byte_to_lint,
- function_byte_to_usint,
- function_byte_to_uint,
- function_byte_to_udint,
- function_byte_to_ulint,
- function_byte_to_real,
- function_byte_to_lreal,
- function_byte_to_time,
- function_byte_to_date,
- function_byte_to_tod,
- function_byte_to_dt,
- function_byte_to_string,
- function_byte_to_word,
- function_byte_to_dword,
- function_byte_to_lword,
- function_word_to_bool,
- function_word_to_sint,
- function_word_to_int,
- function_word_to_dint,
- function_word_to_lint,
- function_word_to_usint,
- function_word_to_uint,
- function_word_to_udint,
- function_word_to_ulint,
- function_word_to_real,
- function_word_to_lreal,
- function_word_to_time,
- function_word_to_date,
- function_word_to_tod,
- function_word_to_dt,
- function_word_to_string,
- function_word_to_byte,
- function_word_to_dword,
- function_word_to_lword,
- function_dword_to_bool,
- function_dword_to_sint,
- function_dword_to_int,
- function_dword_to_dint,
- function_dword_to_lint,
- function_dword_to_usint,
- function_dword_to_uint,
- function_dword_to_udint,
- function_dword_to_ulint,
- function_dword_to_real,
- function_dword_to_lreal,
- function_dword_to_time,
- function_dword_to_date,
- function_dword_to_tod,
- function_dword_to_dt,
- function_dword_to_string,
- function_dword_to_byte,
- function_dword_to_word,
- function_dword_to_lword,
- function_lword_to_bool,
- function_lword_to_sint,
- function_lword_to_int,
- function_lword_to_dint,
- function_lword_to_lint,
- function_lword_to_usint,
- function_lword_to_uint,
- function_lword_to_udint,
- function_lword_to_ulint,
- function_lword_to_real,
- function_lword_to_lreal,
- function_lword_to_time,
- function_lword_to_date,
- function_lword_to_tod,
- function_lword_to_dt,
- function_lword_to_string,
- function_lword_to_byte,
- function_lword_to_word,
- function_lword_to_dword,
function_trunc,
+ function_bcd_to_udint,
+ function_bcd_to_uint,
+ function_bcd_to_ulint,
function_bcd_to_usint,
- function_bcd_to_uint,
- function_bcd_to_udint,
- function_bcd_to_ulint,
+ function_udint_to_bcd,
+ function_uint_to_bcd,
function_usint_to_bcd,
- function_uint_to_bcd,
- function_udint_to_bcd,
function_ulint_to_bcd,
function_date_and_time_to_time_of_day,
function_date_and_time_to_date,
--- a/stage4/generate_c/generate_c_base.cc Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/generate_c_base.cc Fri Oct 24 16:37:46 2008 +0200
@@ -49,10 +49,19 @@
-
-
-
-
+typedef struct
+{
+ symbol_c *param_value;
+ symbol_c *param_type;
+ function_param_iterator_c::param_direction_t param_direction;
+} FUNCTION_PARAM;
+
+#define ADD_PARAM_LIST(value, type, direction)\
+ param = new FUNCTION_PARAM;\
+ param->param_value = value;\
+ param->param_type = type;\
+ param->param_direction = direction;\
+ param_list.push_back(*param);
@@ -201,7 +210,7 @@
symbol_c *r_exp) {
s4o.print(function);
compare_type->accept(*this);
- s4o.print("(2, ");
+ s4o.print("(__BOOL_LITERAL(TRUE), NULL, 2, ");
l_exp->accept(*this);
s4o.print(", ");
r_exp->accept(*this);
--- a/stage4/generate_c/generate_c_il.cc Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/generate_c_il.cc Fri Oct 24 16:37:46 2008 +0200
@@ -413,7 +413,7 @@
s4o.print(" = ");
s4o.print(operation);
this->default_variable_name.current_type->accept(*this);
- s4o.print("(2, ");
+ s4o.print("(__BOOL_LITERAL(TRUE), NULL, 2, ");
this->default_variable_name.accept(*this);
s4o.print(", ");
o->accept(*this);
@@ -602,46 +602,47 @@
void *visit(il_function_call_c *symbol) {
function_declaration_c *f_decl = function_symtable.find_value(symbol->function_name);
+ symbol_c* function_type_prefix = NULL;
+ symbol_c* function_name = NULL;
+ symbol_c* function_type_suffix = NULL;
+ std::list<FUNCTION_PARAM> param_list;
+ FUNCTION_PARAM *param;
+
+ symbol_c *param_data_type = default_variable_name.current_type;
+ symbol_c *return_data_type = NULL;
+
if (f_decl == function_symtable.end_value()) {
- /* should never occur. The function being called MUST be in the symtable... */
function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
if (current_function_type == function_none) ERROR;
- symbol_c *param_data_type = default_variable_name.current_type;
- symbol_c *return_data_type = (symbol_c *)search_expression_type->compute_standard_function_il(symbol, param_data_type);
+ return_data_type = (symbol_c *)search_expression_type->compute_standard_function_il(symbol, param_data_type);
if (NULL == return_data_type) ERROR;
- default_variable_name.current_type = return_data_type;
- this->default_variable_name.accept(*this);
- default_variable_name.current_type = param_data_type;
- s4o.print(" = ");
-
function_call_param_iterator_c function_call_param_iterator(symbol);
+ /* Add the value from EN param */
+ ADD_PARAM_LIST((symbol_c*)(new boolean_literal_c((symbol_c*)(new bool_type_name_c()), new boolean_true_c())),
+ (symbol_c*)(new bool_type_name_c()),
+ function_param_iterator_c::direction_in)
+
+ /* Add the value from ENO param */
+ ADD_PARAM_LIST(NULL, (symbol_c*)(new bool_type_name_c()), function_param_iterator_c::direction_out)
+
int nb_param = 1;
if (symbol->il_operand_list != NULL)
nb_param += ((list_c *)symbol->il_operand_list)->n;
#include "il_code_gen.c"
- /* the data type returned by the function, and stored in the il default variable... */
- default_variable_name.current_type = return_data_type;
}
else {
/* determine the base data type returned by the function being called... */
search_base_type_c search_base_type;
- symbol_c *return_data_type = (symbol_c *)f_decl->type_name->accept(search_base_type);
- symbol_c *param_data_type = default_variable_name.current_type;
+ return_data_type = (symbol_c *)f_decl->type_name->accept(search_base_type);
if (NULL == return_data_type) ERROR;
- default_variable_name.current_type = return_data_type;
- this->default_variable_name.accept(*this);
- default_variable_name.current_type = param_data_type;
- s4o.print(" = ");
-
- symbol->function_name->accept(*this);
- s4o.print("(");
-
+ function_name = symbol->function_name;
+
/* loop through each function parameter, find the value we should pass
* to it, and then output the c equivalent...
*/
@@ -650,15 +651,11 @@
identifier_c *param_name;
function_call_param_iterator_c function_call_param_iterator(symbol);
for(int i = 1; (param_name = fp_iterator.next()) != NULL; i++) {
- if (i != 1)
- s4o.print(", ");
-
symbol_c *param_type = fp_iterator.param_type();
if (param_type == NULL) ERROR;
-
+
function_param_iterator_c::param_direction_t param_direction = fp_iterator.param_direction();
-
-
+
symbol_c *param_value = NULL;
/* if it is the first parameter, semantics specifies that we should
@@ -681,43 +678,77 @@
/* Get the value from a foo(<param_value>) style call */
if (param_value == NULL)
param_value = function_call_param_iterator.next();
-
- switch (param_direction) {
- case function_param_iterator_c::direction_in:
- if (param_value == NULL) {
- /* No value given for parameter, so we must use the default... */
- /* First check whether default value specified in function declaration...*/
- param_value = fp_iterator.default_value();
- }
- if (param_value == NULL) {
- /* If not, get the default value of this variable's type */
- param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
- }
- if (param_value == NULL) ERROR;
+
+ if (param_value == NULL && param_direction == function_param_iterator_c::direction_in) {
+ /* No value given for parameter, so we must use the default... */
+ /* First check whether default value specified in function declaration...*/
+ param_value = fp_iterator.default_value();
+ }
+
+ ADD_PARAM_LIST(param_value, param_type, fp_iterator.param_direction())
+ } /* for(...) */
+ }
+
+ default_variable_name.current_type = return_data_type;
+ this->default_variable_name.accept(*this);
+ default_variable_name.current_type = param_data_type;
+ s4o.print(" = ");
+
+ if (function_type_prefix != NULL) {
+ s4o.print("(");
+ function_type_prefix->accept(*this);
+ s4o.print(")");
+ }
+ if (function_name != NULL)
+ function_name->accept(*this);
+ if (function_type_suffix != NULL)
+ function_type_suffix->accept(*this);
+ s4o.print("(");
+ s4o.indent_right();
+
+ std::list<FUNCTION_PARAM>::iterator pt;
+ for(pt = param_list.begin(); pt != param_list.end(); pt++) {
+ if (pt != param_list.begin())
+ s4o.print(",\n"+s4o.indent_spaces);
+ symbol_c *param_value = pt->param_value;
+ symbol_c *param_type = pt->param_type;
+
+ switch (pt->param_direction) {
+ case function_param_iterator_c::direction_in:
+ if (param_value == NULL) {
+ /* If not, get the default value of this variable's type */
+ param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
+ }
+ if (param_value == NULL) ERROR;
+ if (search_base_type.type_is_subrange(param_type)) {
+ s4o.print("__CHECK_");
+ param_type->accept(*this);
+ s4o.print("(");
+ }
+ param_value->accept(*this);
+ if (search_base_type.type_is_subrange(param_type))
+ s4o.print(")");
+ break;
+ case function_param_iterator_c::direction_out:
+ case function_param_iterator_c::direction_inout:
+ current_param_is_pointer = true;
+ if (param_value == NULL) {
+ s4o.print("NULL");
+ } else {
param_value->accept(*this);
- break;
- case function_param_iterator_c::direction_out:
- case function_param_iterator_c::direction_inout:
- current_param_is_pointer = true;
- if (param_value == NULL) {
- s4o.print("NULL");
- } else {
- param_value->accept(*this);
- }
- current_param_is_pointer = false;
- break;
- case function_param_iterator_c::direction_extref:
- /* TODO! */
- ERROR;
- break;
- } /* switch */
- } /* for(...) */
-
- s4o.print(")");
- /* the data type returned by the function, and stored in the il default variable... */
- default_variable_name.current_type = return_data_type;
- }
-
+ }
+ current_param_is_pointer = false;
+ break;
+ case function_param_iterator_c::direction_extref:
+ /* TODO! */
+ ERROR;
+ break;
+ } /* switch */
+ }
+
+ s4o.print(")");
+ /* the data type returned by the function, and stored in the il default variable... */
+ default_variable_name.current_type = return_data_type;
return NULL;
}
@@ -901,55 +932,117 @@
void *visit(il_formal_funct_call_c *symbol) {
function_declaration_c *f_decl = function_symtable.find_value(symbol->function_name);
- if (f_decl == function_symtable.end_value())
- /* should never occur. The function being called MUST be in the symtable... */
- ERROR;
-
- symbol->function_name->accept(*this);
+ symbol_c* function_type_prefix = NULL;
+ symbol_c* function_name = NULL;
+ symbol_c* function_type_suffix = NULL;
+ std::list<FUNCTION_PARAM> param_list;
+ FUNCTION_PARAM *param;
+
+ symbol_c *return_data_type = NULL;
+
+ if (f_decl == function_symtable.end_value()) {
+ function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
+ if (current_function_type == function_none) ERROR;
+
+ return_data_type = (symbol_c *)search_expression_type->compute_standard_function_default(NULL, symbol);
+ if (NULL == return_data_type) ERROR;
+
+ function_call_param_iterator_c function_call_param_iterator(symbol);
+
+ 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()));
+ 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);
+ 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"
+
+ }
+ else {
+ /* determine the base data type returned by the function being called... */
+ search_base_type_c search_base_type;
+ return_data_type = (symbol_c *)f_decl->type_name->accept(search_base_type);
+ if (NULL == return_data_type) ERROR;
+
+ function_name = symbol->function_name;
+
+ /* loop through each function parameter, find the value we should pass
+ * to it, and then output the c equivalent...
+ */
+
+ function_param_iterator_c fp_iterator(f_decl);
+ identifier_c *param_name;
+ function_call_param_iterator_c function_call_param_iterator(symbol);
+ for(int i = 1; (param_name = fp_iterator.next()) != NULL; i++) {
+ symbol_c *param_type = fp_iterator.param_type();
+ if (param_type == NULL) ERROR;
+
+ function_param_iterator_c::param_direction_t param_direction = fp_iterator.param_direction();
+
+
+ symbol_c *param_value = NULL;
+
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ if (param_value == NULL)
+ param_value = function_call_param_iterator.search(param_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ /* NOTE: the following line of code is not required in this case, but it doesn't
+ * harm to leave it in, as in the case of a formal syntax function call,
+ * it will always return NULL.
+ * We leave it in in case we later decide to merge this part of the code together
+ * with the function calling code in generate_c_st_c, which does require
+ * the following line...
+ */
+ if (param_value == NULL)
+ param_value = function_call_param_iterator.next();
+
+ if (param_value == NULL) {
+ /* No value given for parameter, so we must use the default... */
+ /* First check whether default value specified in function declaration...*/
+ param_value = fp_iterator.default_value();
+ }
+
+ ADD_PARAM_LIST(param_value, param_type, fp_iterator.param_direction())
+ }
+ }
+
+ default_variable_name.current_type = return_data_type;
+ this->default_variable_name.accept(*this);
+ s4o.print(" = ");
+
+ if (function_type_prefix != NULL) {
+ s4o.print("(");
+ function_type_prefix->accept(*this);
+ s4o.print(")");
+ }
+ if (function_name != NULL)
+ function_name->accept(*this);
+ if (function_type_suffix != NULL)
+ function_type_suffix->accept(*this);
s4o.print("(");
-
- /* loop through each function parameter, find the value we should pass
- * to it, and then output the c equivalent...
- */
-
- function_param_iterator_c fp_iterator(f_decl);
- identifier_c *param_name;
- function_call_param_iterator_c function_call_param_iterator(symbol);
- for(int i = 1; (param_name = fp_iterator.next()) != NULL; i++) {
- if (i != 1)
- s4o.print(", ");
-
- symbol_c *param_type = fp_iterator.param_type();
- if (param_type == NULL) ERROR;
-
- function_param_iterator_c::param_direction_t param_direction = fp_iterator.param_direction();
-
-
- symbol_c *param_value = NULL;
-
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- if (param_value == NULL)
- param_value = function_call_param_iterator.search(param_name);
-
- /* Get the value from a foo(<param_value>) style call */
- /* NOTE: the following line of code is not required in this case, but it doesn't
- * harm to leave it in, as in the case of a formal syntax function call,
- * it will always return NULL.
- * We leave it in in case we later decide to merge this part of the code together
- * with the function calling code in generate_c_st_c, which does require
- * the following line...
- */
- if (param_value == NULL)
- param_value = function_call_param_iterator.next();
-
- switch (param_direction) {
+ s4o.indent_right();
+
+ std::list<FUNCTION_PARAM>::iterator pt;
+ for(pt = param_list.begin(); pt != param_list.end(); pt++) {
+ if (pt != param_list.begin())
+ s4o.print(",\n"+s4o.indent_spaces);
+ symbol_c *param_value = pt->param_value;
+ symbol_c *param_type = pt->param_type;
+
+ switch (pt->param_direction) {
case function_param_iterator_c::direction_in:
if (param_value == NULL) {
- /* No value given for parameter, so we must use the default... */
- /* First check whether default value specified in function declaration...*/
- param_value = fp_iterator.default_value();
- }
- if (param_value == NULL) {
/* If not, get the default value of this variable's type */
param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
}
@@ -962,27 +1055,27 @@
param_value->accept(*this);
if (search_base_type.type_is_subrange(param_type))
s4o.print(")");
- break;
+ break;
case function_param_iterator_c::direction_out:
case function_param_iterator_c::direction_inout:
+ current_param_is_pointer = true;
if (param_value == NULL) {
- /* no parameter value given, so we pass a previously declared temporary variable. */
- std::string *temp_var_name = temp_var_name_factory.new_name();
- s4o.print(*temp_var_name);
- delete temp_var_name;
- } else {
+ s4o.print("NULL");
+ } else {
param_value->accept(*this);
- }
- break;
+ }
+ current_param_is_pointer = false;
+ break;
case function_param_iterator_c::direction_extref:
/* TODO! */
ERROR;
- break;
+ break;
} /* switch */
} /* for(...) */
// symbol->parameter_assignment->accept(*this);
s4o.print(")");
+ /* the data type returned by the function, and stored in the il default variable... */
return NULL;
}
@@ -1279,7 +1372,7 @@
void *visit(ADD_operator_c *symbol) {
if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
search_expression_type->is_time_type(this->current_operand_type)) {
- XXX_function("__time_add", &(this->default_variable_name), this->current_operand);
+ XXX_function("__TIME_ADD", &(this->default_variable_name), this->current_operand);
/* the data type resulting from this operation... */
this->default_variable_name.current_type = this->current_operand_type;
return NULL;
@@ -1298,7 +1391,7 @@
void *visit(SUB_operator_c *symbol) {
if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
search_expression_type->is_time_type(this->current_operand_type)) {
- XXX_function("__time_sub", &(this->default_variable_name), this->current_operand);
+ XXX_function("__TIME_SUB", &(this->default_variable_name), this->current_operand);
/* the data type resulting from this operation... */
this->default_variable_name.current_type = this->current_operand_type;
return NULL;
@@ -1317,9 +1410,8 @@
void *visit(MUL_operator_c *symbol) {
if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
search_expression_type->is_integer_type(this->current_operand_type)) {
- XXX_function("__time_mul", &(this->default_variable_name), this->current_operand);
+ XXX_function("__TIME_MUL", &(this->default_variable_name), this->current_operand);
/* the data type resulting from this operation... */
- this->default_variable_name.current_type = this->current_operand_type;
return NULL;
}
if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
@@ -1334,13 +1426,19 @@
}
void *visit(DIV_operator_c *symbol) {
+ if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
+ search_expression_type->is_integer_type(this->current_operand_type)) {
+ XXX_function("__TIME_DIV", &(this->default_variable_name), this->current_operand);
+ /* the data type resulting from this operation... */
+ return NULL;
+ }
if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
XXX_operator(&(this->default_variable_name), " /= ", this->current_operand);
/* the data type resulting from this operation... */
this->default_variable_name.current_type = this->current_operand_type;
}
- else {ERROR;}
+ ERROR;
return NULL;
}
@@ -1351,7 +1449,7 @@
/* the data type resulting from this operation... */
this->default_variable_name.current_type = this->current_operand_type;
}
- else {ERROR;}
+ ERROR;
return NULL;
}
--- a/stage4/generate_c/generate_c_sfc.cc Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/generate_c_sfc.cc Fri Oct 24 16:37:46 2008 +0200
@@ -85,6 +85,7 @@
}
~generate_c_sfc_elements_c(void) {
+ transition_list.clear();
delete generate_c_il;
delete generate_c_st;
delete generate_c_code;
@@ -623,7 +624,7 @@
/* generate elapsed_time initialisations */
s4o.print(s4o.indent_spaces + "// Calculate elapsed_time\n");
s4o.print(s4o.indent_spaces +"current_time = __CURRENT_TIME;\n");
- s4o.print(s4o.indent_spaces +"elapsed_time = __time_sub(current_time, ");
+ s4o.print(s4o.indent_spaces +"elapsed_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, current_time, ");
print_variable_prefix();
s4o.print("__lasttick_time);\n");
s4o.print(s4o.indent_spaces);
@@ -647,7 +648,7 @@
s4o.indent_right();
s4o.print(s4o.indent_spaces);
print_variable_prefix();
- s4o.print("__step_list[i].elapsed_time = __time_add(");
+ s4o.print("__step_list[i].elapsed_time = __time_add(__BOOL_LITERAL(TRUE), NULL, ");
print_variable_prefix();
s4o.print("__step_list[i].elapsed_time, elapsed_time);\n");
s4o.indent_left();
@@ -671,19 +672,19 @@
print_variable_prefix();
s4o.print("__action_list[i].reset = 0;\n");
s4o.print(s4o.indent_spaces + "if (");
- s4o.print("__gt_TIME(2, ");
- print_variable_prefix();
- s4o.print("__action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0))) {\n");
- s4o.indent_right();
- s4o.print(s4o.indent_spaces);
- print_variable_prefix();
- s4o.print("__action_list[i].set_remaining_time = __time_sub(");
+ s4o.print("__TIME_CMP(");
+ print_variable_prefix();
+ s4o.print("__action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) > 0) {\n");
+ s4o.indent_right();
+ s4o.print(s4o.indent_spaces);
+ print_variable_prefix();
+ s4o.print("__action_list[i].set_remaining_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, ");
print_variable_prefix();
s4o.print("__action_list[i].set_remaining_time, elapsed_time);\n");
s4o.print(s4o.indent_spaces + "if (");
- s4o.print("__le_TIME(2, ");
- print_variable_prefix();
- s4o.print("__action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0))) {\n");
+ s4o.print("__TIME_CMP(");
+ print_variable_prefix();
+ s4o.print("__action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) <= 0) {\n");
s4o.indent_right();
s4o.print(s4o.indent_spaces);
print_variable_prefix();
@@ -696,19 +697,19 @@
s4o.indent_left();
s4o.print(s4o.indent_spaces + "}\n");
s4o.print(s4o.indent_spaces + "if (");
- s4o.print("__gt_TIME(2, ");
- print_variable_prefix();
- s4o.print("__action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0))) {\n");
- s4o.indent_right();
- s4o.print(s4o.indent_spaces);
- print_variable_prefix();
- s4o.print("__action_list[i].reset_remaining_time = __time_sub(");
+ s4o.print("__TIME_CMP(");
+ print_variable_prefix();
+ s4o.print("__action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) > 0) {\n");
+ s4o.indent_right();
+ s4o.print(s4o.indent_spaces);
+ print_variable_prefix();
+ s4o.print("__action_list[i].reset_remaining_time = __time_sub(__BOOL_LITERAL(TRUE), NULL, ");
print_variable_prefix();
s4o.print("__action_list[i].reset_remaining_time, elapsed_time);\n");
s4o.print(s4o.indent_spaces + "if (");
- s4o.print("__le_TIME(2, ");
- print_variable_prefix();
- s4o.print("__action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0))) {\n");
+ s4o.print("__TIME_CMP(");
+ print_variable_prefix();
+ s4o.print("__action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) <= 0) {\n");
s4o.indent_right();
s4o.print(s4o.indent_spaces);
print_variable_prefix();
--- a/stage4/generate_c/generate_c_st.cc Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/generate_c_st.cc Fri Oct 24 16:37:46 2008 +0200
@@ -355,7 +355,7 @@
if ((typeid(*left_type) == typeid(time_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)) ||
(typeid(*left_type) == typeid(tod_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)) ||
(typeid(*left_type) == typeid(dt_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)))
- return print_binary_function("__time_add", symbol->l_exp, symbol->r_exp);
+ return print_binary_function("__TIME_ADD", symbol->l_exp, symbol->r_exp);
if (!search_expression_type->is_same_type(left_type, right_type))
ERROR;
if (search_expression_type->is_integer_type(left_type) || search_expression_type->is_real_type(left_type))
@@ -373,7 +373,7 @@
(typeid(*left_type) == typeid(tod_type_name_c) && typeid(*right_type) == typeid(tod_type_name_c)) ||
(typeid(*left_type) == typeid(dt_type_name_c) && typeid(*right_type) == typeid(time_type_name_c)) ||
(typeid(*left_type) == typeid(dt_type_name_c) && typeid(*right_type) == typeid(dt_type_name_c)))
- return print_binary_function("__time_sub", symbol->l_exp, symbol->r_exp);
+ return print_binary_function("__TIME_SUB", symbol->l_exp, symbol->r_exp);
if (!search_expression_type->is_same_type(left_type, right_type))
ERROR;
if (search_expression_type->is_integer_type(left_type) || search_expression_type->is_real_type(left_type))
@@ -387,7 +387,7 @@
symbol_c *right_type = search_expression_type->get_type(symbol->r_exp);
if ((typeid(*left_type) == typeid(time_type_name_c) && search_expression_type->is_integer_type(right_type)) ||
(typeid(*left_type) == typeid(time_type_name_c) && search_expression_type->is_real_type(right_type)))
- return print_binary_function("__time_mul", symbol->l_exp, symbol->r_exp);
+ return print_binary_function("__TIME_MUL", symbol->l_exp, symbol->r_exp);
if (!search_expression_type->is_same_type(left_type, right_type))
ERROR;
if (search_expression_type->is_integer_type(left_type) || search_expression_type->is_real_type(left_type))
@@ -399,6 +399,9 @@
void *visit(div_expression_c *symbol) {
symbol_c *left_type = search_expression_type->get_type(symbol->l_exp);
symbol_c *right_type = search_expression_type->get_type(symbol->r_exp);
+ if ((typeid(*left_type) == typeid(time_type_name_c) && search_expression_type->is_integer_type(right_type)) ||
+ (typeid(*left_type) == typeid(time_type_name_c) && search_expression_type->is_real_type(right_type)))
+ return print_binary_function("__TIME_DIV", symbol->l_exp, symbol->r_exp);
if (!search_expression_type->is_same_type(left_type, right_type))
ERROR;
if (search_expression_type->is_integer_type(left_type) || search_expression_type->is_real_type(left_type))
@@ -445,6 +448,12 @@
void *visit(function_invocation_c *symbol) {
function_declaration_c *f_decl = function_symtable.find_value(symbol->function_name);
+ symbol_c* function_type_prefix = NULL;
+ symbol_c* function_name = NULL;
+ symbol_c* function_type_suffix = NULL;
+ std::list<FUNCTION_PARAM> param_list;
+ FUNCTION_PARAM *param;
+
if (f_decl == function_symtable.end_value()) {
/* The function called is not in the symtable, so we test if it is a
* standard function defined in standard */
@@ -456,6 +465,18 @@
function_call_param_iterator_c function_call_param_iterator(symbol);
+ 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()));
+ 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);
+ ADD_PARAM_LIST(ENO_param_value, (symbol_c*)(new bool_type_name_c()), function_param_iterator_c::direction_out)
+
int nb_param = ((list_c *)symbol->parameter_assignment_list)->n;
#include "st_code_gen.c"
@@ -467,69 +488,89 @@
*/
function_param_iterator_c fp_iterator(f_decl);
- symbol->function_name->accept(*this);
- s4o.print("(");
- s4o.indent_right();
+ function_name = symbol->function_name;
identifier_c *param_name;
function_call_param_iterator_c function_call_param_iterator(symbol);
for(int i = 1; (param_name = fp_iterator.next()) != NULL; i++) {
- if (i != 1)
- s4o.print(",\n"+s4o.indent_spaces);
-
+
function_param_iterator_c::param_direction_t param_direction = fp_iterator.param_direction();
-
+
/* Get the value from a foo(<param_name> = <param_value>) style call */
symbol_c *param_value = function_call_param_iterator.search(param_name);
/* Get the value from a foo(<param_value>) style call */
if (param_value == NULL)
param_value = function_call_param_iterator.next();
-
+
+ if (param_value == NULL && param_direction == function_param_iterator_c::direction_in) {
+ /* No value given for parameter, so we must use the default... */
+ /* First check whether default value specified in function declaration...*/
+ param_value = fp_iterator.default_value();
+ }
+
symbol_c *param_type = fp_iterator.param_type();
if (param_type == NULL) ERROR;
-
- switch (param_direction) {
- case function_param_iterator_c::direction_in:
- if (param_value == NULL) {
- /* No value given for parameter, so we must use the default... */
- /* First check whether default value specified in function declaration...*/
- param_value = fp_iterator.default_value();
- }
- if (param_value == NULL) {
- /* If not, get the default value of this variable's type */
- param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
- }
- if (param_value == NULL) ERROR;
- if (search_base_type.type_is_subrange(param_type)) {
- s4o.print("__CHECK_");
- param_type->accept(*this);
- s4o.print("(");
- }
- param_value->accept(*this);
- if (search_base_type.type_is_subrange(param_type))
- s4o.print(")");
- break;
- case function_param_iterator_c::direction_out:
- case function_param_iterator_c::direction_inout:
- current_param_is_pointer = true;
- if (param_value == NULL) {
- s4o.print("NULL");
- } else {
- param_value->accept(*this);
- }
- current_param_is_pointer = false;
- break;
- case function_param_iterator_c::direction_extref:
- /* TODO! */
- ERROR;
- break;
- } /* switch */
+
+ ADD_PARAM_LIST(param_value, param_type, param_direction)
} /* for(...) */
// symbol->parameter_assignment->accept(*this);
+ }
+
+ if (function_type_prefix != NULL) {
+ s4o.print("(");
+ function_type_prefix->accept(*this);
s4o.print(")");
- s4o.indent_left();
- }
+ }
+ if (function_name != NULL)
+ function_name->accept(*this);
+ if (function_type_suffix != NULL)
+ function_type_suffix->accept(*this);
+ s4o.print("(");
+ s4o.indent_right();
+
+ std::list<FUNCTION_PARAM>::iterator pt;
+ for(pt = param_list.begin(); pt != param_list.end(); pt++) {
+ if (pt != param_list.begin())
+ s4o.print(",\n"+s4o.indent_spaces);
+ symbol_c *param_value = pt->param_value;
+ symbol_c *param_type = pt->param_type;
+
+ switch (pt->param_direction) {
+ case function_param_iterator_c::direction_in:
+ if (param_value == NULL) {
+ /* If not, get the default value of this variable's type */
+ param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
+ }
+ if (param_value == NULL) ERROR;
+ if (search_base_type.type_is_subrange(param_type)) {
+ s4o.print("__CHECK_");
+ param_type->accept(*this);
+ s4o.print("(");
+ }
+ param_value->accept(*this);
+ if (search_base_type.type_is_subrange(param_type))
+ s4o.print(")");
+ break;
+ case function_param_iterator_c::direction_out:
+ case function_param_iterator_c::direction_inout:
+ current_param_is_pointer = true;
+ if (param_value == NULL) {
+ s4o.print("NULL");
+ } else {
+ param_value->accept(*this);
+ }
+ current_param_is_pointer = false;
+ break;
+ case function_param_iterator_c::direction_extref:
+ /* TODO! */
+ ERROR;
+ break;
+ } /* switch */
+ }
+
+ s4o.print(")");
+ s4o.indent_left();
return NULL;
}
--- a/stage4/generate_c/get_function_type_decl.c Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/get_function_type_decl.c Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,1130 +21,1131 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
function_type_t get_function_type(identifier_c *function_name) {
+if (!strcasecmp(function_name->value, "REAL_TO_SINT"))
+ return function_real_to_sint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_LINT"))
+ return function_real_to_lint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_DINT"))
+ return function_real_to_dint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_DATE"))
+ return function_real_to_date;
+
+if (!strcasecmp(function_name->value, "REAL_TO_DWORD"))
+ return function_real_to_dword;
+
+if (!strcasecmp(function_name->value, "REAL_TO_DT"))
+ return function_real_to_dt;
+
+if (!strcasecmp(function_name->value, "REAL_TO_TOD"))
+ return function_real_to_tod;
+
+if (!strcasecmp(function_name->value, "REAL_TO_UDINT"))
+ return function_real_to_udint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_WORD"))
+ return function_real_to_word;
+
+if (!strcasecmp(function_name->value, "REAL_TO_STRING"))
+ return function_real_to_string;
+
+if (!strcasecmp(function_name->value, "REAL_TO_LWORD"))
+ return function_real_to_lword;
+
+if (!strcasecmp(function_name->value, "REAL_TO_UINT"))
+ return function_real_to_uint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_LREAL"))
+ return function_real_to_lreal;
+
+if (!strcasecmp(function_name->value, "REAL_TO_BYTE"))
+ return function_real_to_byte;
+
+if (!strcasecmp(function_name->value, "REAL_TO_USINT"))
+ return function_real_to_usint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_ULINT"))
+ return function_real_to_ulint;
+
+if (!strcasecmp(function_name->value, "REAL_TO_BOOL"))
+ return function_real_to_bool;
+
+if (!strcasecmp(function_name->value, "REAL_TO_TIME"))
+ return function_real_to_time;
+
+if (!strcasecmp(function_name->value, "REAL_TO_INT"))
+ return function_real_to_int;
+
+if (!strcasecmp(function_name->value, "SINT_TO_REAL"))
+ return function_sint_to_real;
+
+if (!strcasecmp(function_name->value, "SINT_TO_LINT"))
+ return function_sint_to_lint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_DINT"))
+ return function_sint_to_dint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_DATE"))
+ return function_sint_to_date;
+
+if (!strcasecmp(function_name->value, "SINT_TO_DWORD"))
+ return function_sint_to_dword;
+
+if (!strcasecmp(function_name->value, "SINT_TO_DT"))
+ return function_sint_to_dt;
+
+if (!strcasecmp(function_name->value, "SINT_TO_TOD"))
+ return function_sint_to_tod;
+
+if (!strcasecmp(function_name->value, "SINT_TO_UDINT"))
+ return function_sint_to_udint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_WORD"))
+ return function_sint_to_word;
+
+if (!strcasecmp(function_name->value, "SINT_TO_STRING"))
+ return function_sint_to_string;
+
+if (!strcasecmp(function_name->value, "SINT_TO_LWORD"))
+ return function_sint_to_lword;
+
+if (!strcasecmp(function_name->value, "SINT_TO_UINT"))
+ return function_sint_to_uint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_LREAL"))
+ return function_sint_to_lreal;
+
+if (!strcasecmp(function_name->value, "SINT_TO_BYTE"))
+ return function_sint_to_byte;
+
+if (!strcasecmp(function_name->value, "SINT_TO_USINT"))
+ return function_sint_to_usint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_ULINT"))
+ return function_sint_to_ulint;
+
+if (!strcasecmp(function_name->value, "SINT_TO_BOOL"))
+ return function_sint_to_bool;
+
+if (!strcasecmp(function_name->value, "SINT_TO_TIME"))
+ return function_sint_to_time;
+
+if (!strcasecmp(function_name->value, "SINT_TO_INT"))
+ return function_sint_to_int;
+
+if (!strcasecmp(function_name->value, "LINT_TO_REAL"))
+ return function_lint_to_real;
+
+if (!strcasecmp(function_name->value, "LINT_TO_SINT"))
+ return function_lint_to_sint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_DINT"))
+ return function_lint_to_dint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_DATE"))
+ return function_lint_to_date;
+
+if (!strcasecmp(function_name->value, "LINT_TO_DWORD"))
+ return function_lint_to_dword;
+
+if (!strcasecmp(function_name->value, "LINT_TO_DT"))
+ return function_lint_to_dt;
+
+if (!strcasecmp(function_name->value, "LINT_TO_TOD"))
+ return function_lint_to_tod;
+
+if (!strcasecmp(function_name->value, "LINT_TO_UDINT"))
+ return function_lint_to_udint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_WORD"))
+ return function_lint_to_word;
+
+if (!strcasecmp(function_name->value, "LINT_TO_STRING"))
+ return function_lint_to_string;
+
+if (!strcasecmp(function_name->value, "LINT_TO_LWORD"))
+ return function_lint_to_lword;
+
+if (!strcasecmp(function_name->value, "LINT_TO_UINT"))
+ return function_lint_to_uint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_LREAL"))
+ return function_lint_to_lreal;
+
+if (!strcasecmp(function_name->value, "LINT_TO_BYTE"))
+ return function_lint_to_byte;
+
+if (!strcasecmp(function_name->value, "LINT_TO_USINT"))
+ return function_lint_to_usint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_ULINT"))
+ return function_lint_to_ulint;
+
+if (!strcasecmp(function_name->value, "LINT_TO_BOOL"))
+ return function_lint_to_bool;
+
+if (!strcasecmp(function_name->value, "LINT_TO_TIME"))
+ return function_lint_to_time;
+
+if (!strcasecmp(function_name->value, "LINT_TO_INT"))
+ return function_lint_to_int;
+
+if (!strcasecmp(function_name->value, "DINT_TO_REAL"))
+ return function_dint_to_real;
+
+if (!strcasecmp(function_name->value, "DINT_TO_SINT"))
+ return function_dint_to_sint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_LINT"))
+ return function_dint_to_lint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_DATE"))
+ return function_dint_to_date;
+
+if (!strcasecmp(function_name->value, "DINT_TO_DWORD"))
+ return function_dint_to_dword;
+
+if (!strcasecmp(function_name->value, "DINT_TO_DT"))
+ return function_dint_to_dt;
+
+if (!strcasecmp(function_name->value, "DINT_TO_TOD"))
+ return function_dint_to_tod;
+
+if (!strcasecmp(function_name->value, "DINT_TO_UDINT"))
+ return function_dint_to_udint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_WORD"))
+ return function_dint_to_word;
+
+if (!strcasecmp(function_name->value, "DINT_TO_STRING"))
+ return function_dint_to_string;
+
+if (!strcasecmp(function_name->value, "DINT_TO_LWORD"))
+ return function_dint_to_lword;
+
+if (!strcasecmp(function_name->value, "DINT_TO_UINT"))
+ return function_dint_to_uint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_LREAL"))
+ return function_dint_to_lreal;
+
+if (!strcasecmp(function_name->value, "DINT_TO_BYTE"))
+ return function_dint_to_byte;
+
+if (!strcasecmp(function_name->value, "DINT_TO_USINT"))
+ return function_dint_to_usint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_ULINT"))
+ return function_dint_to_ulint;
+
+if (!strcasecmp(function_name->value, "DINT_TO_BOOL"))
+ return function_dint_to_bool;
+
+if (!strcasecmp(function_name->value, "DINT_TO_TIME"))
+ return function_dint_to_time;
+
+if (!strcasecmp(function_name->value, "DINT_TO_INT"))
+ return function_dint_to_int;
+
+if (!strcasecmp(function_name->value, "DATE_TO_REAL"))
+ return function_date_to_real;
+
+if (!strcasecmp(function_name->value, "DATE_TO_SINT"))
+ return function_date_to_sint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_LINT"))
+ return function_date_to_lint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_DINT"))
+ return function_date_to_dint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_DWORD"))
+ return function_date_to_dword;
+
+if (!strcasecmp(function_name->value, "DATE_TO_UDINT"))
+ return function_date_to_udint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_WORD"))
+ return function_date_to_word;
+
+if (!strcasecmp(function_name->value, "DATE_TO_STRING"))
+ return function_date_to_string;
+
+if (!strcasecmp(function_name->value, "DATE_TO_LWORD"))
+ return function_date_to_lword;
+
+if (!strcasecmp(function_name->value, "DATE_TO_UINT"))
+ return function_date_to_uint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_LREAL"))
+ return function_date_to_lreal;
+
+if (!strcasecmp(function_name->value, "DATE_TO_BYTE"))
+ return function_date_to_byte;
+
+if (!strcasecmp(function_name->value, "DATE_TO_USINT"))
+ return function_date_to_usint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_ULINT"))
+ return function_date_to_ulint;
+
+if (!strcasecmp(function_name->value, "DATE_TO_INT"))
+ return function_date_to_int;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_REAL"))
+ return function_dword_to_real;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_SINT"))
+ return function_dword_to_sint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_LINT"))
+ return function_dword_to_lint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_DINT"))
+ return function_dword_to_dint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_DATE"))
+ return function_dword_to_date;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_DT"))
+ return function_dword_to_dt;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_TOD"))
+ return function_dword_to_tod;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_UDINT"))
+ return function_dword_to_udint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_WORD"))
+ return function_dword_to_word;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_STRING"))
+ return function_dword_to_string;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_LWORD"))
+ return function_dword_to_lword;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_UINT"))
+ return function_dword_to_uint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_LREAL"))
+ return function_dword_to_lreal;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_BYTE"))
+ return function_dword_to_byte;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_USINT"))
+ return function_dword_to_usint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_ULINT"))
+ return function_dword_to_ulint;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_BOOL"))
+ return function_dword_to_bool;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_TIME"))
+ return function_dword_to_time;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_INT"))
+ return function_dword_to_int;
+
+if (!strcasecmp(function_name->value, "DT_TO_REAL"))
+ return function_dt_to_real;
+
+if (!strcasecmp(function_name->value, "DT_TO_SINT"))
+ return function_dt_to_sint;
+
+if (!strcasecmp(function_name->value, "DT_TO_LINT"))
+ return function_dt_to_lint;
+
+if (!strcasecmp(function_name->value, "DT_TO_DINT"))
+ return function_dt_to_dint;
+
+if (!strcasecmp(function_name->value, "DT_TO_DWORD"))
+ return function_dt_to_dword;
+
+if (!strcasecmp(function_name->value, "DT_TO_UDINT"))
+ return function_dt_to_udint;
+
+if (!strcasecmp(function_name->value, "DT_TO_WORD"))
+ return function_dt_to_word;
+
+if (!strcasecmp(function_name->value, "DT_TO_STRING"))
+ return function_dt_to_string;
+
+if (!strcasecmp(function_name->value, "DT_TO_LWORD"))
+ return function_dt_to_lword;
+
+if (!strcasecmp(function_name->value, "DT_TO_UINT"))
+ return function_dt_to_uint;
+
+if (!strcasecmp(function_name->value, "DT_TO_LREAL"))
+ return function_dt_to_lreal;
+
+if (!strcasecmp(function_name->value, "DT_TO_BYTE"))
+ return function_dt_to_byte;
+
+if (!strcasecmp(function_name->value, "DT_TO_USINT"))
+ return function_dt_to_usint;
+
+if (!strcasecmp(function_name->value, "DT_TO_ULINT"))
+ return function_dt_to_ulint;
+
+if (!strcasecmp(function_name->value, "DT_TO_INT"))
+ return function_dt_to_int;
+
+if (!strcasecmp(function_name->value, "TOD_TO_REAL"))
+ return function_tod_to_real;
+
+if (!strcasecmp(function_name->value, "TOD_TO_SINT"))
+ return function_tod_to_sint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_LINT"))
+ return function_tod_to_lint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_DINT"))
+ return function_tod_to_dint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_DWORD"))
+ return function_tod_to_dword;
+
+if (!strcasecmp(function_name->value, "TOD_TO_UDINT"))
+ return function_tod_to_udint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_WORD"))
+ return function_tod_to_word;
+
+if (!strcasecmp(function_name->value, "TOD_TO_STRING"))
+ return function_tod_to_string;
+
+if (!strcasecmp(function_name->value, "TOD_TO_LWORD"))
+ return function_tod_to_lword;
+
+if (!strcasecmp(function_name->value, "TOD_TO_UINT"))
+ return function_tod_to_uint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_LREAL"))
+ return function_tod_to_lreal;
+
+if (!strcasecmp(function_name->value, "TOD_TO_BYTE"))
+ return function_tod_to_byte;
+
+if (!strcasecmp(function_name->value, "TOD_TO_USINT"))
+ return function_tod_to_usint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_ULINT"))
+ return function_tod_to_ulint;
+
+if (!strcasecmp(function_name->value, "TOD_TO_INT"))
+ return function_tod_to_int;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_REAL"))
+ return function_udint_to_real;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_SINT"))
+ return function_udint_to_sint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_LINT"))
+ return function_udint_to_lint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_DINT"))
+ return function_udint_to_dint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_DATE"))
+ return function_udint_to_date;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_DWORD"))
+ return function_udint_to_dword;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_DT"))
+ return function_udint_to_dt;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_TOD"))
+ return function_udint_to_tod;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_WORD"))
+ return function_udint_to_word;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_STRING"))
+ return function_udint_to_string;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_LWORD"))
+ return function_udint_to_lword;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_UINT"))
+ return function_udint_to_uint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_LREAL"))
+ return function_udint_to_lreal;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_BYTE"))
+ return function_udint_to_byte;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_USINT"))
+ return function_udint_to_usint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_ULINT"))
+ return function_udint_to_ulint;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_BOOL"))
+ return function_udint_to_bool;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_TIME"))
+ return function_udint_to_time;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_INT"))
+ return function_udint_to_int;
+
+if (!strcasecmp(function_name->value, "WORD_TO_REAL"))
+ return function_word_to_real;
+
+if (!strcasecmp(function_name->value, "WORD_TO_SINT"))
+ return function_word_to_sint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_LINT"))
+ return function_word_to_lint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_DINT"))
+ return function_word_to_dint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_DATE"))
+ return function_word_to_date;
+
+if (!strcasecmp(function_name->value, "WORD_TO_DWORD"))
+ return function_word_to_dword;
+
+if (!strcasecmp(function_name->value, "WORD_TO_DT"))
+ return function_word_to_dt;
+
+if (!strcasecmp(function_name->value, "WORD_TO_TOD"))
+ return function_word_to_tod;
+
+if (!strcasecmp(function_name->value, "WORD_TO_UDINT"))
+ return function_word_to_udint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_STRING"))
+ return function_word_to_string;
+
+if (!strcasecmp(function_name->value, "WORD_TO_LWORD"))
+ return function_word_to_lword;
+
+if (!strcasecmp(function_name->value, "WORD_TO_UINT"))
+ return function_word_to_uint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_LREAL"))
+ return function_word_to_lreal;
+
+if (!strcasecmp(function_name->value, "WORD_TO_BYTE"))
+ return function_word_to_byte;
+
+if (!strcasecmp(function_name->value, "WORD_TO_USINT"))
+ return function_word_to_usint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_ULINT"))
+ return function_word_to_ulint;
+
+if (!strcasecmp(function_name->value, "WORD_TO_BOOL"))
+ return function_word_to_bool;
+
+if (!strcasecmp(function_name->value, "WORD_TO_TIME"))
+ return function_word_to_time;
+
+if (!strcasecmp(function_name->value, "WORD_TO_INT"))
+ return function_word_to_int;
+
+if (!strcasecmp(function_name->value, "STRING_TO_REAL"))
+ return function_string_to_real;
+
+if (!strcasecmp(function_name->value, "STRING_TO_SINT"))
+ return function_string_to_sint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_LINT"))
+ return function_string_to_lint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_DINT"))
+ return function_string_to_dint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_DATE"))
+ return function_string_to_date;
+
+if (!strcasecmp(function_name->value, "STRING_TO_DWORD"))
+ return function_string_to_dword;
+
+if (!strcasecmp(function_name->value, "STRING_TO_DT"))
+ return function_string_to_dt;
+
+if (!strcasecmp(function_name->value, "STRING_TO_TOD"))
+ return function_string_to_tod;
+
+if (!strcasecmp(function_name->value, "STRING_TO_UDINT"))
+ return function_string_to_udint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_WORD"))
+ return function_string_to_word;
+
+if (!strcasecmp(function_name->value, "STRING_TO_LWORD"))
+ return function_string_to_lword;
+
+if (!strcasecmp(function_name->value, "STRING_TO_UINT"))
+ return function_string_to_uint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_LREAL"))
+ return function_string_to_lreal;
+
+if (!strcasecmp(function_name->value, "STRING_TO_BYTE"))
+ return function_string_to_byte;
+
+if (!strcasecmp(function_name->value, "STRING_TO_USINT"))
+ return function_string_to_usint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_ULINT"))
+ return function_string_to_ulint;
+
+if (!strcasecmp(function_name->value, "STRING_TO_BOOL"))
+ return function_string_to_bool;
+
+if (!strcasecmp(function_name->value, "STRING_TO_TIME"))
+ return function_string_to_time;
+
+if (!strcasecmp(function_name->value, "STRING_TO_INT"))
+ return function_string_to_int;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_REAL"))
+ return function_lword_to_real;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_SINT"))
+ return function_lword_to_sint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_LINT"))
+ return function_lword_to_lint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_DINT"))
+ return function_lword_to_dint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_DATE"))
+ return function_lword_to_date;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_DWORD"))
+ return function_lword_to_dword;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_DT"))
+ return function_lword_to_dt;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_TOD"))
+ return function_lword_to_tod;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_UDINT"))
+ return function_lword_to_udint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_WORD"))
+ return function_lword_to_word;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_STRING"))
+ return function_lword_to_string;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_UINT"))
+ return function_lword_to_uint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_LREAL"))
+ return function_lword_to_lreal;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_BYTE"))
+ return function_lword_to_byte;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_USINT"))
+ return function_lword_to_usint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_ULINT"))
+ return function_lword_to_ulint;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_BOOL"))
+ return function_lword_to_bool;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_TIME"))
+ return function_lword_to_time;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_INT"))
+ return function_lword_to_int;
+
+if (!strcasecmp(function_name->value, "UINT_TO_REAL"))
+ return function_uint_to_real;
+
+if (!strcasecmp(function_name->value, "UINT_TO_SINT"))
+ return function_uint_to_sint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_LINT"))
+ return function_uint_to_lint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_DINT"))
+ return function_uint_to_dint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_DATE"))
+ return function_uint_to_date;
+
+if (!strcasecmp(function_name->value, "UINT_TO_DWORD"))
+ return function_uint_to_dword;
+
+if (!strcasecmp(function_name->value, "UINT_TO_DT"))
+ return function_uint_to_dt;
+
+if (!strcasecmp(function_name->value, "UINT_TO_TOD"))
+ return function_uint_to_tod;
+
+if (!strcasecmp(function_name->value, "UINT_TO_UDINT"))
+ return function_uint_to_udint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_WORD"))
+ return function_uint_to_word;
+
+if (!strcasecmp(function_name->value, "UINT_TO_STRING"))
+ return function_uint_to_string;
+
+if (!strcasecmp(function_name->value, "UINT_TO_LWORD"))
+ return function_uint_to_lword;
+
+if (!strcasecmp(function_name->value, "UINT_TO_LREAL"))
+ return function_uint_to_lreal;
+
+if (!strcasecmp(function_name->value, "UINT_TO_BYTE"))
+ return function_uint_to_byte;
+
+if (!strcasecmp(function_name->value, "UINT_TO_USINT"))
+ return function_uint_to_usint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_ULINT"))
+ return function_uint_to_ulint;
+
+if (!strcasecmp(function_name->value, "UINT_TO_BOOL"))
+ return function_uint_to_bool;
+
+if (!strcasecmp(function_name->value, "UINT_TO_TIME"))
+ return function_uint_to_time;
+
+if (!strcasecmp(function_name->value, "UINT_TO_INT"))
+ return function_uint_to_int;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_REAL"))
+ return function_lreal_to_real;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_SINT"))
+ return function_lreal_to_sint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_LINT"))
+ return function_lreal_to_lint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_DINT"))
+ return function_lreal_to_dint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_DATE"))
+ return function_lreal_to_date;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_DWORD"))
+ return function_lreal_to_dword;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_DT"))
+ return function_lreal_to_dt;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_TOD"))
+ return function_lreal_to_tod;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_UDINT"))
+ return function_lreal_to_udint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_WORD"))
+ return function_lreal_to_word;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_STRING"))
+ return function_lreal_to_string;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_LWORD"))
+ return function_lreal_to_lword;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_UINT"))
+ return function_lreal_to_uint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_BYTE"))
+ return function_lreal_to_byte;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_USINT"))
+ return function_lreal_to_usint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_ULINT"))
+ return function_lreal_to_ulint;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_BOOL"))
+ return function_lreal_to_bool;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_TIME"))
+ return function_lreal_to_time;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_INT"))
+ return function_lreal_to_int;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_REAL"))
+ return function_byte_to_real;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_SINT"))
+ return function_byte_to_sint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_LINT"))
+ return function_byte_to_lint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_DINT"))
+ return function_byte_to_dint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_DATE"))
+ return function_byte_to_date;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_DWORD"))
+ return function_byte_to_dword;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_DT"))
+ return function_byte_to_dt;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_TOD"))
+ return function_byte_to_tod;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_UDINT"))
+ return function_byte_to_udint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_WORD"))
+ return function_byte_to_word;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_STRING"))
+ return function_byte_to_string;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_LWORD"))
+ return function_byte_to_lword;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_UINT"))
+ return function_byte_to_uint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_LREAL"))
+ return function_byte_to_lreal;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_USINT"))
+ return function_byte_to_usint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_ULINT"))
+ return function_byte_to_ulint;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_BOOL"))
+ return function_byte_to_bool;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_TIME"))
+ return function_byte_to_time;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_INT"))
+ return function_byte_to_int;
+
+if (!strcasecmp(function_name->value, "USINT_TO_REAL"))
+ return function_usint_to_real;
+
+if (!strcasecmp(function_name->value, "USINT_TO_SINT"))
+ return function_usint_to_sint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_LINT"))
+ return function_usint_to_lint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_DINT"))
+ return function_usint_to_dint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_DATE"))
+ return function_usint_to_date;
+
+if (!strcasecmp(function_name->value, "USINT_TO_DWORD"))
+ return function_usint_to_dword;
+
+if (!strcasecmp(function_name->value, "USINT_TO_DT"))
+ return function_usint_to_dt;
+
+if (!strcasecmp(function_name->value, "USINT_TO_TOD"))
+ return function_usint_to_tod;
+
+if (!strcasecmp(function_name->value, "USINT_TO_UDINT"))
+ return function_usint_to_udint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_WORD"))
+ return function_usint_to_word;
+
+if (!strcasecmp(function_name->value, "USINT_TO_STRING"))
+ return function_usint_to_string;
+
+if (!strcasecmp(function_name->value, "USINT_TO_LWORD"))
+ return function_usint_to_lword;
+
+if (!strcasecmp(function_name->value, "USINT_TO_UINT"))
+ return function_usint_to_uint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_LREAL"))
+ return function_usint_to_lreal;
+
+if (!strcasecmp(function_name->value, "USINT_TO_BYTE"))
+ return function_usint_to_byte;
+
+if (!strcasecmp(function_name->value, "USINT_TO_ULINT"))
+ return function_usint_to_ulint;
+
+if (!strcasecmp(function_name->value, "USINT_TO_BOOL"))
+ return function_usint_to_bool;
+
+if (!strcasecmp(function_name->value, "USINT_TO_TIME"))
+ return function_usint_to_time;
+
+if (!strcasecmp(function_name->value, "USINT_TO_INT"))
+ return function_usint_to_int;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_REAL"))
+ return function_ulint_to_real;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_SINT"))
+ return function_ulint_to_sint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_LINT"))
+ return function_ulint_to_lint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_DINT"))
+ return function_ulint_to_dint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_DATE"))
+ return function_ulint_to_date;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_DWORD"))
+ return function_ulint_to_dword;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_DT"))
+ return function_ulint_to_dt;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_TOD"))
+ return function_ulint_to_tod;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_UDINT"))
+ return function_ulint_to_udint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_WORD"))
+ return function_ulint_to_word;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_STRING"))
+ return function_ulint_to_string;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_LWORD"))
+ return function_ulint_to_lword;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_UINT"))
+ return function_ulint_to_uint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_LREAL"))
+ return function_ulint_to_lreal;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_BYTE"))
+ return function_ulint_to_byte;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_USINT"))
+ return function_ulint_to_usint;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_BOOL"))
+ return function_ulint_to_bool;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_TIME"))
+ return function_ulint_to_time;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_INT"))
+ return function_ulint_to_int;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_REAL"))
+ return function_bool_to_real;
+
if (!strcasecmp(function_name->value, "BOOL_TO_SINT"))
return function_bool_to_sint;
+if (!strcasecmp(function_name->value, "BOOL_TO_LINT"))
+ return function_bool_to_lint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_DINT"))
+ return function_bool_to_dint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_DATE"))
+ return function_bool_to_date;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_DWORD"))
+ return function_bool_to_dword;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_DT"))
+ return function_bool_to_dt;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_TOD"))
+ return function_bool_to_tod;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_UDINT"))
+ return function_bool_to_udint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_WORD"))
+ return function_bool_to_word;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_STRING"))
+ return function_bool_to_string;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_LWORD"))
+ return function_bool_to_lword;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_UINT"))
+ return function_bool_to_uint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_LREAL"))
+ return function_bool_to_lreal;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_BYTE"))
+ return function_bool_to_byte;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_USINT"))
+ return function_bool_to_usint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_ULINT"))
+ return function_bool_to_ulint;
+
+if (!strcasecmp(function_name->value, "BOOL_TO_TIME"))
+ return function_bool_to_time;
+
if (!strcasecmp(function_name->value, "BOOL_TO_INT"))
return function_bool_to_int;
-if (!strcasecmp(function_name->value, "BOOL_TO_DINT"))
- return function_bool_to_dint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_LINT"))
- return function_bool_to_lint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_USINT"))
- return function_bool_to_usint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_UINT"))
- return function_bool_to_uint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_UDINT"))
- return function_bool_to_udint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_ULINT"))
- return function_bool_to_ulint;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_REAL"))
- return function_bool_to_real;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_LREAL"))
- return function_bool_to_lreal;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_TIME"))
- return function_bool_to_time;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_DATE"))
- return function_bool_to_date;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_TOD"))
- return function_bool_to_tod;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_DT"))
- return function_bool_to_dt;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_STRING"))
- return function_bool_to_string;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_BYTE"))
- return function_bool_to_byte;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_WORD"))
- return function_bool_to_word;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_DWORD"))
- return function_bool_to_dword;
-
-if (!strcasecmp(function_name->value, "BOOL_TO_LWORD"))
- return function_bool_to_lword;
-
-if (!strcasecmp(function_name->value, "SINT_TO_BOOL"))
- return function_sint_to_bool;
-
-if (!strcasecmp(function_name->value, "SINT_TO_INT"))
- return function_sint_to_int;
-
-if (!strcasecmp(function_name->value, "SINT_TO_DINT"))
- return function_sint_to_dint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_LINT"))
- return function_sint_to_lint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_USINT"))
- return function_sint_to_usint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_UINT"))
- return function_sint_to_uint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_UDINT"))
- return function_sint_to_udint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_ULINT"))
- return function_sint_to_ulint;
-
-if (!strcasecmp(function_name->value, "SINT_TO_REAL"))
- return function_sint_to_real;
-
-if (!strcasecmp(function_name->value, "SINT_TO_LREAL"))
- return function_sint_to_lreal;
-
-if (!strcasecmp(function_name->value, "SINT_TO_TIME"))
- return function_sint_to_time;
-
-if (!strcasecmp(function_name->value, "SINT_TO_DATE"))
- return function_sint_to_date;
-
-if (!strcasecmp(function_name->value, "SINT_TO_TOD"))
- return function_sint_to_tod;
-
-if (!strcasecmp(function_name->value, "SINT_TO_DT"))
- return function_sint_to_dt;
-
-if (!strcasecmp(function_name->value, "SINT_TO_STRING"))
- return function_sint_to_string;
-
-if (!strcasecmp(function_name->value, "SINT_TO_BYTE"))
- return function_sint_to_byte;
-
-if (!strcasecmp(function_name->value, "SINT_TO_WORD"))
- return function_sint_to_word;
-
-if (!strcasecmp(function_name->value, "SINT_TO_DWORD"))
- return function_sint_to_dword;
-
-if (!strcasecmp(function_name->value, "SINT_TO_LWORD"))
- return function_sint_to_lword;
+if (!strcasecmp(function_name->value, "TIME_TO_REAL"))
+ return function_time_to_real;
+
+if (!strcasecmp(function_name->value, "TIME_TO_SINT"))
+ return function_time_to_sint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_LINT"))
+ return function_time_to_lint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_DINT"))
+ return function_time_to_dint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_DWORD"))
+ return function_time_to_dword;
+
+if (!strcasecmp(function_name->value, "TIME_TO_UDINT"))
+ return function_time_to_udint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_WORD"))
+ return function_time_to_word;
+
+if (!strcasecmp(function_name->value, "TIME_TO_STRING"))
+ return function_time_to_string;
+
+if (!strcasecmp(function_name->value, "TIME_TO_LWORD"))
+ return function_time_to_lword;
+
+if (!strcasecmp(function_name->value, "TIME_TO_UINT"))
+ return function_time_to_uint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_LREAL"))
+ return function_time_to_lreal;
+
+if (!strcasecmp(function_name->value, "TIME_TO_BYTE"))
+ return function_time_to_byte;
+
+if (!strcasecmp(function_name->value, "TIME_TO_USINT"))
+ return function_time_to_usint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_ULINT"))
+ return function_time_to_ulint;
+
+if (!strcasecmp(function_name->value, "TIME_TO_INT"))
+ return function_time_to_int;
+
+if (!strcasecmp(function_name->value, "INT_TO_REAL"))
+ return function_int_to_real;
+
+if (!strcasecmp(function_name->value, "INT_TO_SINT"))
+ return function_int_to_sint;
+
+if (!strcasecmp(function_name->value, "INT_TO_LINT"))
+ return function_int_to_lint;
+
+if (!strcasecmp(function_name->value, "INT_TO_DINT"))
+ return function_int_to_dint;
+
+if (!strcasecmp(function_name->value, "INT_TO_DATE"))
+ return function_int_to_date;
+
+if (!strcasecmp(function_name->value, "INT_TO_DWORD"))
+ return function_int_to_dword;
+
+if (!strcasecmp(function_name->value, "INT_TO_DT"))
+ return function_int_to_dt;
+
+if (!strcasecmp(function_name->value, "INT_TO_TOD"))
+ return function_int_to_tod;
+
+if (!strcasecmp(function_name->value, "INT_TO_UDINT"))
+ return function_int_to_udint;
+
+if (!strcasecmp(function_name->value, "INT_TO_WORD"))
+ return function_int_to_word;
+
+if (!strcasecmp(function_name->value, "INT_TO_STRING"))
+ return function_int_to_string;
+
+if (!strcasecmp(function_name->value, "INT_TO_LWORD"))
+ return function_int_to_lword;
+
+if (!strcasecmp(function_name->value, "INT_TO_UINT"))
+ return function_int_to_uint;
+
+if (!strcasecmp(function_name->value, "INT_TO_LREAL"))
+ return function_int_to_lreal;
+
+if (!strcasecmp(function_name->value, "INT_TO_BYTE"))
+ return function_int_to_byte;
+
+if (!strcasecmp(function_name->value, "INT_TO_USINT"))
+ return function_int_to_usint;
+
+if (!strcasecmp(function_name->value, "INT_TO_ULINT"))
+ return function_int_to_ulint;
if (!strcasecmp(function_name->value, "INT_TO_BOOL"))
return function_int_to_bool;
-if (!strcasecmp(function_name->value, "INT_TO_SINT"))
- return function_int_to_sint;
-
-if (!strcasecmp(function_name->value, "INT_TO_DINT"))
- return function_int_to_dint;
-
-if (!strcasecmp(function_name->value, "INT_TO_LINT"))
- return function_int_to_lint;
-
-if (!strcasecmp(function_name->value, "INT_TO_USINT"))
- return function_int_to_usint;
-
-if (!strcasecmp(function_name->value, "INT_TO_UINT"))
- return function_int_to_uint;
-
-if (!strcasecmp(function_name->value, "INT_TO_UDINT"))
- return function_int_to_udint;
-
-if (!strcasecmp(function_name->value, "INT_TO_ULINT"))
- return function_int_to_ulint;
-
-if (!strcasecmp(function_name->value, "INT_TO_REAL"))
- return function_int_to_real;
-
-if (!strcasecmp(function_name->value, "INT_TO_LREAL"))
- return function_int_to_lreal;
-
if (!strcasecmp(function_name->value, "INT_TO_TIME"))
return function_int_to_time;
-if (!strcasecmp(function_name->value, "INT_TO_DATE"))
- return function_int_to_date;
-
-if (!strcasecmp(function_name->value, "INT_TO_TOD"))
- return function_int_to_tod;
-
-if (!strcasecmp(function_name->value, "INT_TO_DT"))
- return function_int_to_dt;
-
-if (!strcasecmp(function_name->value, "INT_TO_STRING"))
- return function_int_to_string;
-
-if (!strcasecmp(function_name->value, "INT_TO_BYTE"))
- return function_int_to_byte;
-
-if (!strcasecmp(function_name->value, "INT_TO_WORD"))
- return function_int_to_word;
-
-if (!strcasecmp(function_name->value, "INT_TO_DWORD"))
- return function_int_to_dword;
-
-if (!strcasecmp(function_name->value, "INT_TO_LWORD"))
- return function_int_to_lword;
-
-if (!strcasecmp(function_name->value, "DINT_TO_BOOL"))
- return function_dint_to_bool;
-
-if (!strcasecmp(function_name->value, "DINT_TO_SINT"))
- return function_dint_to_sint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_INT"))
- return function_dint_to_int;
-
-if (!strcasecmp(function_name->value, "DINT_TO_LINT"))
- return function_dint_to_lint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_USINT"))
- return function_dint_to_usint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_UINT"))
- return function_dint_to_uint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_UDINT"))
- return function_dint_to_udint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_ULINT"))
- return function_dint_to_ulint;
-
-if (!strcasecmp(function_name->value, "DINT_TO_REAL"))
- return function_dint_to_real;
-
-if (!strcasecmp(function_name->value, "DINT_TO_LREAL"))
- return function_dint_to_lreal;
-
-if (!strcasecmp(function_name->value, "DINT_TO_TIME"))
- return function_dint_to_time;
-
-if (!strcasecmp(function_name->value, "DINT_TO_DATE"))
- return function_dint_to_date;
-
-if (!strcasecmp(function_name->value, "DINT_TO_TOD"))
- return function_dint_to_tod;
-
-if (!strcasecmp(function_name->value, "DINT_TO_DT"))
- return function_dint_to_dt;
-
-if (!strcasecmp(function_name->value, "DINT_TO_STRING"))
- return function_dint_to_string;
-
-if (!strcasecmp(function_name->value, "DINT_TO_BYTE"))
- return function_dint_to_byte;
-
-if (!strcasecmp(function_name->value, "DINT_TO_WORD"))
- return function_dint_to_word;
-
-if (!strcasecmp(function_name->value, "DINT_TO_DWORD"))
- return function_dint_to_dword;
-
-if (!strcasecmp(function_name->value, "DINT_TO_LWORD"))
- return function_dint_to_lword;
-
-if (!strcasecmp(function_name->value, "LINT_TO_BOOL"))
- return function_lint_to_bool;
-
-if (!strcasecmp(function_name->value, "LINT_TO_SINT"))
- return function_lint_to_sint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_INT"))
- return function_lint_to_int;
-
-if (!strcasecmp(function_name->value, "LINT_TO_DINT"))
- return function_lint_to_dint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_USINT"))
- return function_lint_to_usint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_UINT"))
- return function_lint_to_uint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_UDINT"))
- return function_lint_to_udint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_ULINT"))
- return function_lint_to_ulint;
-
-if (!strcasecmp(function_name->value, "LINT_TO_REAL"))
- return function_lint_to_real;
-
-if (!strcasecmp(function_name->value, "LINT_TO_LREAL"))
- return function_lint_to_lreal;
-
-if (!strcasecmp(function_name->value, "LINT_TO_TIME"))
- return function_lint_to_time;
-
-if (!strcasecmp(function_name->value, "LINT_TO_DATE"))
- return function_lint_to_date;
-
-if (!strcasecmp(function_name->value, "LINT_TO_TOD"))
- return function_lint_to_tod;
-
-if (!strcasecmp(function_name->value, "LINT_TO_DT"))
- return function_lint_to_dt;
-
-if (!strcasecmp(function_name->value, "LINT_TO_STRING"))
- return function_lint_to_string;
-
-if (!strcasecmp(function_name->value, "LINT_TO_BYTE"))
- return function_lint_to_byte;
-
-if (!strcasecmp(function_name->value, "LINT_TO_WORD"))
- return function_lint_to_word;
-
-if (!strcasecmp(function_name->value, "LINT_TO_DWORD"))
- return function_lint_to_dword;
-
-if (!strcasecmp(function_name->value, "LINT_TO_LWORD"))
- return function_lint_to_lword;
-
-if (!strcasecmp(function_name->value, "USINT_TO_BOOL"))
- return function_usint_to_bool;
-
-if (!strcasecmp(function_name->value, "USINT_TO_SINT"))
- return function_usint_to_sint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_INT"))
- return function_usint_to_int;
-
-if (!strcasecmp(function_name->value, "USINT_TO_DINT"))
- return function_usint_to_dint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_LINT"))
- return function_usint_to_lint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_UINT"))
- return function_usint_to_uint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_UDINT"))
- return function_usint_to_udint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_ULINT"))
- return function_usint_to_ulint;
-
-if (!strcasecmp(function_name->value, "USINT_TO_REAL"))
- return function_usint_to_real;
-
-if (!strcasecmp(function_name->value, "USINT_TO_LREAL"))
- return function_usint_to_lreal;
-
-if (!strcasecmp(function_name->value, "USINT_TO_TIME"))
- return function_usint_to_time;
-
-if (!strcasecmp(function_name->value, "USINT_TO_DATE"))
- return function_usint_to_date;
-
-if (!strcasecmp(function_name->value, "USINT_TO_TOD"))
- return function_usint_to_tod;
-
-if (!strcasecmp(function_name->value, "USINT_TO_DT"))
- return function_usint_to_dt;
-
-if (!strcasecmp(function_name->value, "USINT_TO_STRING"))
- return function_usint_to_string;
-
-if (!strcasecmp(function_name->value, "USINT_TO_BYTE"))
- return function_usint_to_byte;
-
-if (!strcasecmp(function_name->value, "USINT_TO_WORD"))
- return function_usint_to_word;
-
-if (!strcasecmp(function_name->value, "USINT_TO_DWORD"))
- return function_usint_to_dword;
-
-if (!strcasecmp(function_name->value, "USINT_TO_LWORD"))
- return function_usint_to_lword;
-
-if (!strcasecmp(function_name->value, "UINT_TO_BOOL"))
- return function_uint_to_bool;
-
-if (!strcasecmp(function_name->value, "UINT_TO_SINT"))
- return function_uint_to_sint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_INT"))
- return function_uint_to_int;
-
-if (!strcasecmp(function_name->value, "UINT_TO_DINT"))
- return function_uint_to_dint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_LINT"))
- return function_uint_to_lint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_USINT"))
- return function_uint_to_usint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_UDINT"))
- return function_uint_to_udint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_ULINT"))
- return function_uint_to_ulint;
-
-if (!strcasecmp(function_name->value, "UINT_TO_REAL"))
- return function_uint_to_real;
-
-if (!strcasecmp(function_name->value, "UINT_TO_LREAL"))
- return function_uint_to_lreal;
-
-if (!strcasecmp(function_name->value, "UINT_TO_TIME"))
- return function_uint_to_time;
-
-if (!strcasecmp(function_name->value, "UINT_TO_DATE"))
- return function_uint_to_date;
-
-if (!strcasecmp(function_name->value, "UINT_TO_TOD"))
- return function_uint_to_tod;
-
-if (!strcasecmp(function_name->value, "UINT_TO_DT"))
- return function_uint_to_dt;
-
-if (!strcasecmp(function_name->value, "UINT_TO_STRING"))
- return function_uint_to_string;
-
-if (!strcasecmp(function_name->value, "UINT_TO_BYTE"))
- return function_uint_to_byte;
-
-if (!strcasecmp(function_name->value, "UINT_TO_WORD"))
- return function_uint_to_word;
-
-if (!strcasecmp(function_name->value, "UINT_TO_DWORD"))
- return function_uint_to_dword;
-
-if (!strcasecmp(function_name->value, "UINT_TO_LWORD"))
- return function_uint_to_lword;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_BOOL"))
- return function_udint_to_bool;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_SINT"))
- return function_udint_to_sint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_INT"))
- return function_udint_to_int;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_DINT"))
- return function_udint_to_dint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_LINT"))
- return function_udint_to_lint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_USINT"))
- return function_udint_to_usint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_UINT"))
- return function_udint_to_uint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_ULINT"))
- return function_udint_to_ulint;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_REAL"))
- return function_udint_to_real;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_LREAL"))
- return function_udint_to_lreal;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_TIME"))
- return function_udint_to_time;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_DATE"))
- return function_udint_to_date;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_TOD"))
- return function_udint_to_tod;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_DT"))
- return function_udint_to_dt;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_STRING"))
- return function_udint_to_string;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_BYTE"))
- return function_udint_to_byte;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_WORD"))
- return function_udint_to_word;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_DWORD"))
- return function_udint_to_dword;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_LWORD"))
- return function_udint_to_lword;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_BOOL"))
- return function_ulint_to_bool;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_SINT"))
- return function_ulint_to_sint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_INT"))
- return function_ulint_to_int;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_DINT"))
- return function_ulint_to_dint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_LINT"))
- return function_ulint_to_lint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_USINT"))
- return function_ulint_to_usint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_UINT"))
- return function_ulint_to_uint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_UDINT"))
- return function_ulint_to_udint;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_REAL"))
- return function_ulint_to_real;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_LREAL"))
- return function_ulint_to_lreal;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_TIME"))
- return function_ulint_to_time;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_DATE"))
- return function_ulint_to_date;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_TOD"))
- return function_ulint_to_tod;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_DT"))
- return function_ulint_to_dt;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_STRING"))
- return function_ulint_to_string;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_BYTE"))
- return function_ulint_to_byte;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_WORD"))
- return function_ulint_to_word;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_DWORD"))
- return function_ulint_to_dword;
-
-if (!strcasecmp(function_name->value, "ULINT_TO_LWORD"))
- return function_ulint_to_lword;
-
-if (!strcasecmp(function_name->value, "REAL_TO_BOOL"))
- return function_real_to_bool;
-
-if (!strcasecmp(function_name->value, "REAL_TO_SINT"))
- return function_real_to_sint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_INT"))
- return function_real_to_int;
-
-if (!strcasecmp(function_name->value, "REAL_TO_DINT"))
- return function_real_to_dint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_LINT"))
- return function_real_to_lint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_USINT"))
- return function_real_to_usint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_UINT"))
- return function_real_to_uint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_UDINT"))
- return function_real_to_udint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_ULINT"))
- return function_real_to_ulint;
-
-if (!strcasecmp(function_name->value, "REAL_TO_LREAL"))
- return function_real_to_lreal;
-
-if (!strcasecmp(function_name->value, "REAL_TO_TIME"))
- return function_real_to_time;
-
-if (!strcasecmp(function_name->value, "REAL_TO_DATE"))
- return function_real_to_date;
-
-if (!strcasecmp(function_name->value, "REAL_TO_TOD"))
- return function_real_to_tod;
-
-if (!strcasecmp(function_name->value, "REAL_TO_DT"))
- return function_real_to_dt;
-
-if (!strcasecmp(function_name->value, "REAL_TO_STRING"))
- return function_real_to_string;
-
-if (!strcasecmp(function_name->value, "REAL_TO_BYTE"))
- return function_real_to_byte;
-
-if (!strcasecmp(function_name->value, "REAL_TO_WORD"))
- return function_real_to_word;
-
-if (!strcasecmp(function_name->value, "REAL_TO_DWORD"))
- return function_real_to_dword;
-
-if (!strcasecmp(function_name->value, "REAL_TO_LWORD"))
- return function_real_to_lword;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_BOOL"))
- return function_lreal_to_bool;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_SINT"))
- return function_lreal_to_sint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_INT"))
- return function_lreal_to_int;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_DINT"))
- return function_lreal_to_dint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_LINT"))
- return function_lreal_to_lint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_USINT"))
- return function_lreal_to_usint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_UINT"))
- return function_lreal_to_uint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_UDINT"))
- return function_lreal_to_udint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_ULINT"))
- return function_lreal_to_ulint;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_REAL"))
- return function_lreal_to_real;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_TIME"))
- return function_lreal_to_time;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_DATE"))
- return function_lreal_to_date;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_TOD"))
- return function_lreal_to_tod;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_DT"))
- return function_lreal_to_dt;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_STRING"))
- return function_lreal_to_string;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_BYTE"))
- return function_lreal_to_byte;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_WORD"))
- return function_lreal_to_word;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_DWORD"))
- return function_lreal_to_dword;
-
-if (!strcasecmp(function_name->value, "LREAL_TO_LWORD"))
- return function_lreal_to_lword;
-
-if (!strcasecmp(function_name->value, "TIME_TO_SINT"))
- return function_time_to_sint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_INT"))
- return function_time_to_int;
-
-if (!strcasecmp(function_name->value, "TIME_TO_DINT"))
- return function_time_to_dint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_LINT"))
- return function_time_to_lint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_USINT"))
- return function_time_to_usint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_UINT"))
- return function_time_to_uint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_UDINT"))
- return function_time_to_udint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_ULINT"))
- return function_time_to_ulint;
-
-if (!strcasecmp(function_name->value, "TIME_TO_REAL"))
- return function_time_to_real;
-
-if (!strcasecmp(function_name->value, "TIME_TO_LREAL"))
- return function_time_to_lreal;
-
-if (!strcasecmp(function_name->value, "TIME_TO_STRING"))
- return function_time_to_string;
-
-if (!strcasecmp(function_name->value, "TIME_TO_BYTE"))
- return function_time_to_byte;
-
-if (!strcasecmp(function_name->value, "TIME_TO_WORD"))
- return function_time_to_word;
-
-if (!strcasecmp(function_name->value, "TIME_TO_DWORD"))
- return function_time_to_dword;
-
-if (!strcasecmp(function_name->value, "TIME_TO_LWORD"))
- return function_time_to_lword;
-
-if (!strcasecmp(function_name->value, "DATE_TO_SINT"))
- return function_date_to_sint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_INT"))
- return function_date_to_int;
-
-if (!strcasecmp(function_name->value, "DATE_TO_DINT"))
- return function_date_to_dint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_LINT"))
- return function_date_to_lint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_USINT"))
- return function_date_to_usint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_UINT"))
- return function_date_to_uint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_UDINT"))
- return function_date_to_udint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_ULINT"))
- return function_date_to_ulint;
-
-if (!strcasecmp(function_name->value, "DATE_TO_REAL"))
- return function_date_to_real;
-
-if (!strcasecmp(function_name->value, "DATE_TO_LREAL"))
- return function_date_to_lreal;
-
-if (!strcasecmp(function_name->value, "DATE_TO_STRING"))
- return function_date_to_string;
-
-if (!strcasecmp(function_name->value, "DATE_TO_BYTE"))
- return function_date_to_byte;
-
-if (!strcasecmp(function_name->value, "DATE_TO_WORD"))
- return function_date_to_word;
-
-if (!strcasecmp(function_name->value, "DATE_TO_DWORD"))
- return function_date_to_dword;
-
-if (!strcasecmp(function_name->value, "DATE_TO_LWORD"))
- return function_date_to_lword;
-
-if (!strcasecmp(function_name->value, "TOD_TO_SINT"))
- return function_tod_to_sint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_INT"))
- return function_tod_to_int;
-
-if (!strcasecmp(function_name->value, "TOD_TO_DINT"))
- return function_tod_to_dint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_LINT"))
- return function_tod_to_lint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_USINT"))
- return function_tod_to_usint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_UINT"))
- return function_tod_to_uint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_UDINT"))
- return function_tod_to_udint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_ULINT"))
- return function_tod_to_ulint;
-
-if (!strcasecmp(function_name->value, "TOD_TO_REAL"))
- return function_tod_to_real;
-
-if (!strcasecmp(function_name->value, "TOD_TO_LREAL"))
- return function_tod_to_lreal;
-
-if (!strcasecmp(function_name->value, "TOD_TO_STRING"))
- return function_tod_to_string;
-
-if (!strcasecmp(function_name->value, "TOD_TO_BYTE"))
- return function_tod_to_byte;
-
-if (!strcasecmp(function_name->value, "TOD_TO_WORD"))
- return function_tod_to_word;
-
-if (!strcasecmp(function_name->value, "TOD_TO_DWORD"))
- return function_tod_to_dword;
-
-if (!strcasecmp(function_name->value, "TOD_TO_LWORD"))
- return function_tod_to_lword;
-
-if (!strcasecmp(function_name->value, "DT_TO_SINT"))
- return function_dt_to_sint;
-
-if (!strcasecmp(function_name->value, "DT_TO_INT"))
- return function_dt_to_int;
-
-if (!strcasecmp(function_name->value, "DT_TO_DINT"))
- return function_dt_to_dint;
-
-if (!strcasecmp(function_name->value, "DT_TO_LINT"))
- return function_dt_to_lint;
-
-if (!strcasecmp(function_name->value, "DT_TO_USINT"))
- return function_dt_to_usint;
-
-if (!strcasecmp(function_name->value, "DT_TO_UINT"))
- return function_dt_to_uint;
-
-if (!strcasecmp(function_name->value, "DT_TO_UDINT"))
- return function_dt_to_udint;
-
-if (!strcasecmp(function_name->value, "DT_TO_ULINT"))
- return function_dt_to_ulint;
-
-if (!strcasecmp(function_name->value, "DT_TO_REAL"))
- return function_dt_to_real;
-
-if (!strcasecmp(function_name->value, "DT_TO_LREAL"))
- return function_dt_to_lreal;
-
-if (!strcasecmp(function_name->value, "DT_TO_STRING"))
- return function_dt_to_string;
-
-if (!strcasecmp(function_name->value, "DT_TO_BYTE"))
- return function_dt_to_byte;
-
-if (!strcasecmp(function_name->value, "DT_TO_WORD"))
- return function_dt_to_word;
-
-if (!strcasecmp(function_name->value, "DT_TO_DWORD"))
- return function_dt_to_dword;
-
-if (!strcasecmp(function_name->value, "DT_TO_LWORD"))
- return function_dt_to_lword;
-
-if (!strcasecmp(function_name->value, "STRING_TO_BOOL"))
- return function_string_to_bool;
-
-if (!strcasecmp(function_name->value, "STRING_TO_SINT"))
- return function_string_to_sint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_INT"))
- return function_string_to_int;
-
-if (!strcasecmp(function_name->value, "STRING_TO_DINT"))
- return function_string_to_dint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_LINT"))
- return function_string_to_lint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_USINT"))
- return function_string_to_usint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_UINT"))
- return function_string_to_uint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_UDINT"))
- return function_string_to_udint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_ULINT"))
- return function_string_to_ulint;
-
-if (!strcasecmp(function_name->value, "STRING_TO_REAL"))
- return function_string_to_real;
-
-if (!strcasecmp(function_name->value, "STRING_TO_LREAL"))
- return function_string_to_lreal;
-
-if (!strcasecmp(function_name->value, "STRING_TO_TIME"))
- return function_string_to_time;
-
-if (!strcasecmp(function_name->value, "STRING_TO_DATE"))
- return function_string_to_date;
-
-if (!strcasecmp(function_name->value, "STRING_TO_TOD"))
- return function_string_to_tod;
-
-if (!strcasecmp(function_name->value, "STRING_TO_DT"))
- return function_string_to_dt;
-
-if (!strcasecmp(function_name->value, "STRING_TO_BYTE"))
- return function_string_to_byte;
-
-if (!strcasecmp(function_name->value, "STRING_TO_WORD"))
- return function_string_to_word;
-
-if (!strcasecmp(function_name->value, "STRING_TO_DWORD"))
- return function_string_to_dword;
-
-if (!strcasecmp(function_name->value, "STRING_TO_LWORD"))
- return function_string_to_lword;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_BOOL"))
- return function_byte_to_bool;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_SINT"))
- return function_byte_to_sint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_INT"))
- return function_byte_to_int;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_DINT"))
- return function_byte_to_dint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_LINT"))
- return function_byte_to_lint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_USINT"))
- return function_byte_to_usint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_UINT"))
- return function_byte_to_uint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_UDINT"))
- return function_byte_to_udint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_ULINT"))
- return function_byte_to_ulint;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_REAL"))
- return function_byte_to_real;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_LREAL"))
- return function_byte_to_lreal;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_TIME"))
- return function_byte_to_time;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_DATE"))
- return function_byte_to_date;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_TOD"))
- return function_byte_to_tod;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_DT"))
- return function_byte_to_dt;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_STRING"))
- return function_byte_to_string;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_WORD"))
- return function_byte_to_word;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_DWORD"))
- return function_byte_to_dword;
-
-if (!strcasecmp(function_name->value, "BYTE_TO_LWORD"))
- return function_byte_to_lword;
-
-if (!strcasecmp(function_name->value, "WORD_TO_BOOL"))
- return function_word_to_bool;
-
-if (!strcasecmp(function_name->value, "WORD_TO_SINT"))
- return function_word_to_sint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_INT"))
- return function_word_to_int;
-
-if (!strcasecmp(function_name->value, "WORD_TO_DINT"))
- return function_word_to_dint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_LINT"))
- return function_word_to_lint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_USINT"))
- return function_word_to_usint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_UINT"))
- return function_word_to_uint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_UDINT"))
- return function_word_to_udint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_ULINT"))
- return function_word_to_ulint;
-
-if (!strcasecmp(function_name->value, "WORD_TO_REAL"))
- return function_word_to_real;
-
-if (!strcasecmp(function_name->value, "WORD_TO_LREAL"))
- return function_word_to_lreal;
-
-if (!strcasecmp(function_name->value, "WORD_TO_TIME"))
- return function_word_to_time;
-
-if (!strcasecmp(function_name->value, "WORD_TO_DATE"))
- return function_word_to_date;
-
-if (!strcasecmp(function_name->value, "WORD_TO_TOD"))
- return function_word_to_tod;
-
-if (!strcasecmp(function_name->value, "WORD_TO_DT"))
- return function_word_to_dt;
-
-if (!strcasecmp(function_name->value, "WORD_TO_STRING"))
- return function_word_to_string;
-
-if (!strcasecmp(function_name->value, "WORD_TO_BYTE"))
- return function_word_to_byte;
-
-if (!strcasecmp(function_name->value, "WORD_TO_DWORD"))
- return function_word_to_dword;
-
-if (!strcasecmp(function_name->value, "WORD_TO_LWORD"))
- return function_word_to_lword;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_BOOL"))
- return function_dword_to_bool;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_SINT"))
- return function_dword_to_sint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_INT"))
- return function_dword_to_int;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_DINT"))
- return function_dword_to_dint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_LINT"))
- return function_dword_to_lint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_USINT"))
- return function_dword_to_usint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_UINT"))
- return function_dword_to_uint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_UDINT"))
- return function_dword_to_udint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_ULINT"))
- return function_dword_to_ulint;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_REAL"))
- return function_dword_to_real;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_LREAL"))
- return function_dword_to_lreal;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_TIME"))
- return function_dword_to_time;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_DATE"))
- return function_dword_to_date;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_TOD"))
- return function_dword_to_tod;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_DT"))
- return function_dword_to_dt;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_STRING"))
- return function_dword_to_string;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_BYTE"))
- return function_dword_to_byte;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_WORD"))
- return function_dword_to_word;
-
-if (!strcasecmp(function_name->value, "DWORD_TO_LWORD"))
- return function_dword_to_lword;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_BOOL"))
- return function_lword_to_bool;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_SINT"))
- return function_lword_to_sint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_INT"))
- return function_lword_to_int;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_DINT"))
- return function_lword_to_dint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_LINT"))
- return function_lword_to_lint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_USINT"))
- return function_lword_to_usint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_UINT"))
- return function_lword_to_uint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_UDINT"))
- return function_lword_to_udint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_ULINT"))
- return function_lword_to_ulint;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_REAL"))
- return function_lword_to_real;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_LREAL"))
- return function_lword_to_lreal;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_TIME"))
- return function_lword_to_time;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_DATE"))
- return function_lword_to_date;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_TOD"))
- return function_lword_to_tod;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_DT"))
- return function_lword_to_dt;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_STRING"))
- return function_lword_to_string;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_BYTE"))
- return function_lword_to_byte;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_WORD"))
- return function_lword_to_word;
-
-if (!strcasecmp(function_name->value, "LWORD_TO_DWORD"))
- return function_lword_to_dword;
-
if (!strcasecmp(function_name->value, "TRUNC"))
return function_trunc;
+if (!strcasecmp(function_name->value, "BCD_TO_UDINT"))
+ return function_bcd_to_udint;
+
+if (!strcasecmp(function_name->value, "BCD_TO_UINT"))
+ return function_bcd_to_uint;
+
+if (!strcasecmp(function_name->value, "BCD_TO_ULINT"))
+ return function_bcd_to_ulint;
+
if (!strcasecmp(function_name->value, "BCD_TO_USINT"))
return function_bcd_to_usint;
-if (!strcasecmp(function_name->value, "BCD_TO_UINT"))
- return function_bcd_to_uint;
-
-if (!strcasecmp(function_name->value, "BCD_TO_UDINT"))
- return function_bcd_to_udint;
-
-if (!strcasecmp(function_name->value, "BCD_TO_ULINT"))
- return function_bcd_to_ulint;
+if (!strcasecmp(function_name->value, "UDINT_TO_BCD"))
+ return function_udint_to_bcd;
+
+if (!strcasecmp(function_name->value, "UINT_TO_BCD"))
+ return function_uint_to_bcd;
if (!strcasecmp(function_name->value, "USINT_TO_BCD"))
return function_usint_to_bcd;
-if (!strcasecmp(function_name->value, "UINT_TO_BCD"))
- return function_uint_to_bcd;
-
-if (!strcasecmp(function_name->value, "UDINT_TO_BCD"))
- return function_udint_to_bcd;
-
if (!strcasecmp(function_name->value, "ULINT_TO_BCD"))
return function_ulint_to_bcd;
--- a/stage4/generate_c/il_code_gen.c Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/il_code_gen.c Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,15 +21,9817 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
switch(current_function_type){
/****
+ *REAL_TO_SINT
+ */
+ case function_real_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_sint*/
+ break;
+
+/****
+ *REAL_TO_LINT
+ */
+ case function_real_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lint*/
+ break;
+
+/****
+ *REAL_TO_DINT
+ */
+ case function_real_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dint*/
+ break;
+
+/****
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_date*/
+ break;
+
+/****
+ *REAL_TO_DWORD
+ */
+ case function_real_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dword*/
+ break;
+
+/****
+ *REAL_TO_DT
+ */
+ case function_real_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ break;
+
+/****
+ *REAL_TO_TOD
+ */
+ case function_real_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_tod*/
+ break;
+
+/****
+ *REAL_TO_UDINT
+ */
+ case function_real_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_udint*/
+ break;
+
+/****
+ *REAL_TO_WORD
+ */
+ case function_real_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_word*/
+ break;
+
+/****
+ *REAL_TO_STRING
+ */
+ case function_real_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_string*/
+ break;
+
+/****
+ *REAL_TO_LWORD
+ */
+ case function_real_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lword*/
+ break;
+
+/****
+ *REAL_TO_UINT
+ */
+ case function_real_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_uint*/
+ break;
+
+/****
+ *REAL_TO_LREAL
+ */
+ case function_real_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lreal*/
+ break;
+
+/****
+ *REAL_TO_BYTE
+ */
+ case function_real_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_byte*/
+ break;
+
+/****
+ *REAL_TO_USINT
+ */
+ case function_real_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_usint*/
+ break;
+
+/****
+ *REAL_TO_ULINT
+ */
+ case function_real_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_ulint*/
+ break;
+
+/****
+ *REAL_TO_BOOL
+ */
+ case function_real_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_bool*/
+ break;
+
+/****
+ *REAL_TO_TIME
+ */
+ case function_real_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_time*/
+ break;
+
+/****
+ *REAL_TO_INT
+ */
+ case function_real_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_int*/
+ break;
+
+/****
+ *SINT_TO_REAL
+ */
+ case function_sint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_real*/
+ break;
+
+/****
+ *SINT_TO_LINT
+ */
+ case function_sint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lint*/
+ break;
+
+/****
+ *SINT_TO_DINT
+ */
+ case function_sint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dint*/
+ break;
+
+/****
+ *SINT_TO_DATE
+ */
+ case function_sint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_date*/
+ break;
+
+/****
+ *SINT_TO_DWORD
+ */
+ case function_sint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dword*/
+ break;
+
+/****
+ *SINT_TO_DT
+ */
+ case function_sint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ break;
+
+/****
+ *SINT_TO_TOD
+ */
+ case function_sint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_tod*/
+ break;
+
+/****
+ *SINT_TO_UDINT
+ */
+ case function_sint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_udint*/
+ break;
+
+/****
+ *SINT_TO_WORD
+ */
+ case function_sint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_word*/
+ break;
+
+/****
+ *SINT_TO_STRING
+ */
+ case function_sint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ break;
+
+/****
+ *SINT_TO_LWORD
+ */
+ case function_sint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ break;
+
+/****
+ *SINT_TO_UINT
+ */
+ case function_sint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_uint*/
+ break;
+
+/****
+ *SINT_TO_LREAL
+ */
+ case function_sint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ break;
+
+/****
+ *SINT_TO_BYTE
+ */
+ case function_sint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_byte*/
+ break;
+
+/****
+ *SINT_TO_USINT
+ */
+ case function_sint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_usint*/
+ break;
+
+/****
+ *SINT_TO_ULINT
+ */
+ case function_sint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ break;
+
+/****
+ *SINT_TO_BOOL
+ */
+ case function_sint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ break;
+
+/****
+ *SINT_TO_TIME
+ */
+ case function_sint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ break;
+
+/****
+ *SINT_TO_INT
+ */
+ case function_sint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_int*/
+ break;
+
+/****
+ *LINT_TO_REAL
+ */
+ case function_lint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_real*/
+ break;
+
+/****
+ *LINT_TO_SINT
+ */
+ case function_lint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_sint*/
+ break;
+
+/****
+ *LINT_TO_DINT
+ */
+ case function_lint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dint*/
+ break;
+
+/****
+ *LINT_TO_DATE
+ */
+ case function_lint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_date*/
+ break;
+
+/****
+ *LINT_TO_DWORD
+ */
+ case function_lint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dword*/
+ break;
+
+/****
+ *LINT_TO_DT
+ */
+ case function_lint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ break;
+
+/****
+ *LINT_TO_TOD
+ */
+ case function_lint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_tod*/
+ break;
+
+/****
+ *LINT_TO_UDINT
+ */
+ case function_lint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_udint*/
+ break;
+
+/****
+ *LINT_TO_WORD
+ */
+ case function_lint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_word*/
+ break;
+
+/****
+ *LINT_TO_STRING
+ */
+ case function_lint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ break;
+
+/****
+ *LINT_TO_LWORD
+ */
+ case function_lint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ break;
+
+/****
+ *LINT_TO_UINT
+ */
+ case function_lint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_uint*/
+ break;
+
+/****
+ *LINT_TO_LREAL
+ */
+ case function_lint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ break;
+
+/****
+ *LINT_TO_BYTE
+ */
+ case function_lint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_byte*/
+ break;
+
+/****
+ *LINT_TO_USINT
+ */
+ case function_lint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_usint*/
+ break;
+
+/****
+ *LINT_TO_ULINT
+ */
+ case function_lint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ break;
+
+/****
+ *LINT_TO_BOOL
+ */
+ case function_lint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ break;
+
+/****
+ *LINT_TO_TIME
+ */
+ case function_lint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ break;
+
+/****
+ *LINT_TO_INT
+ */
+ case function_lint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_int*/
+ break;
+
+/****
+ *DINT_TO_REAL
+ */
+ case function_dint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_real*/
+ break;
+
+/****
+ *DINT_TO_SINT
+ */
+ case function_dint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_sint*/
+ break;
+
+/****
+ *DINT_TO_LINT
+ */
+ case function_dint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lint*/
+ break;
+
+/****
+ *DINT_TO_DATE
+ */
+ case function_dint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_date*/
+ break;
+
+/****
+ *DINT_TO_DWORD
+ */
+ case function_dint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dword*/
+ break;
+
+/****
+ *DINT_TO_DT
+ */
+ case function_dint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ break;
+
+/****
+ *DINT_TO_TOD
+ */
+ case function_dint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_tod*/
+ break;
+
+/****
+ *DINT_TO_UDINT
+ */
+ case function_dint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_udint*/
+ break;
+
+/****
+ *DINT_TO_WORD
+ */
+ case function_dint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_word*/
+ break;
+
+/****
+ *DINT_TO_STRING
+ */
+ case function_dint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ break;
+
+/****
+ *DINT_TO_LWORD
+ */
+ case function_dint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ break;
+
+/****
+ *DINT_TO_UINT
+ */
+ case function_dint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_uint*/
+ break;
+
+/****
+ *DINT_TO_LREAL
+ */
+ case function_dint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ break;
+
+/****
+ *DINT_TO_BYTE
+ */
+ case function_dint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_byte*/
+ break;
+
+/****
+ *DINT_TO_USINT
+ */
+ case function_dint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_usint*/
+ break;
+
+/****
+ *DINT_TO_ULINT
+ */
+ case function_dint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ break;
+
+/****
+ *DINT_TO_BOOL
+ */
+ case function_dint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ break;
+
+/****
+ *DINT_TO_TIME
+ */
+ case function_dint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ break;
+
+/****
+ *DINT_TO_INT
+ */
+ case function_dint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_int*/
+ break;
+
+/****
+ *DATE_TO_REAL
+ */
+ case function_date_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_real*/
+ break;
+
+/****
+ *DATE_TO_SINT
+ */
+ case function_date_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_sint*/
+ break;
+
+/****
+ *DATE_TO_LINT
+ */
+ case function_date_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lint*/
+ break;
+
+/****
+ *DATE_TO_DINT
+ */
+ case function_date_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dint*/
+ break;
+
+/****
+ *DATE_TO_DWORD
+ */
+ case function_date_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dword*/
+ break;
+
+/****
+ *DATE_TO_UDINT
+ */
+ case function_date_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_udint*/
+ break;
+
+/****
+ *DATE_TO_WORD
+ */
+ case function_date_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_word*/
+ break;
+
+/****
+ *DATE_TO_STRING
+ */
+ case function_date_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ break;
+
+/****
+ *DATE_TO_LWORD
+ */
+ case function_date_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ break;
+
+/****
+ *DATE_TO_UINT
+ */
+ case function_date_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_uint*/
+ break;
+
+/****
+ *DATE_TO_LREAL
+ */
+ case function_date_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ break;
+
+/****
+ *DATE_TO_BYTE
+ */
+ case function_date_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_byte*/
+ break;
+
+/****
+ *DATE_TO_USINT
+ */
+ case function_date_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_usint*/
+ break;
+
+/****
+ *DATE_TO_ULINT
+ */
+ case function_date_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_INT
+ */
+ case function_date_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_int*/
+ break;
+
+/****
+ *DWORD_TO_REAL
+ */
+ case function_dword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_real*/
+ break;
+
+/****
+ *DWORD_TO_SINT
+ */
+ case function_dword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_sint*/
+ break;
+
+/****
+ *DWORD_TO_LINT
+ */
+ case function_dword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lint*/
+ break;
+
+/****
+ *DWORD_TO_DINT
+ */
+ case function_dword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dint*/
+ break;
+
+/****
+ *DWORD_TO_DATE
+ */
+ case function_dword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_date*/
+ break;
+
+/****
+ *DWORD_TO_DT
+ */
+ case function_dword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ break;
+
+/****
+ *DWORD_TO_TOD
+ */
+ case function_dword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_tod*/
+ break;
+
+/****
+ *DWORD_TO_UDINT
+ */
+ case function_dword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_udint*/
+ break;
+
+/****
+ *DWORD_TO_WORD
+ */
+ case function_dword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_word*/
+ break;
+
+/****
+ *DWORD_TO_STRING
+ */
+ case function_dword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ break;
+
+/****
+ *DWORD_TO_LWORD
+ */
+ case function_dword_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ break;
+
+/****
+ *DWORD_TO_UINT
+ */
+ case function_dword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_uint*/
+ break;
+
+/****
+ *DWORD_TO_LREAL
+ */
+ case function_dword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ break;
+
+/****
+ *DWORD_TO_BYTE
+ */
+ case function_dword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_byte*/
+ break;
+
+/****
+ *DWORD_TO_USINT
+ */
+ case function_dword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_usint*/
+ break;
+
+/****
+ *DWORD_TO_ULINT
+ */
+ case function_dword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ break;
+
+/****
+ *DWORD_TO_BOOL
+ */
+ case function_dword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ break;
+
+/****
+ *DWORD_TO_TIME
+ */
+ case function_dword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ break;
+
+/****
+ *DWORD_TO_INT
+ */
+ case function_dword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_int*/
+ break;
+
+/****
+ *DT_TO_REAL
+ */
+ case function_dt_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_real*/
+ break;
+
+/****
+ *DT_TO_SINT
+ */
+ case function_dt_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_sint*/
+ break;
+
+/****
+ *DT_TO_LINT
+ */
+ case function_dt_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lint*/
+ break;
+
+/****
+ *DT_TO_DINT
+ */
+ case function_dt_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dint*/
+ break;
+
+/****
+ *DT_TO_DWORD
+ */
+ case function_dt_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dword*/
+ break;
+
+/****
+ *DT_TO_UDINT
+ */
+ case function_dt_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_udint*/
+ break;
+
+/****
+ *DT_TO_WORD
+ */
+ case function_dt_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_word*/
+ break;
+
+/****
+ *DT_TO_STRING
+ */
+ case function_dt_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_string*/
+ break;
+
+/****
+ *DT_TO_LWORD
+ */
+ case function_dt_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ break;
+
+/****
+ *DT_TO_UINT
+ */
+ case function_dt_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_uint*/
+ break;
+
+/****
+ *DT_TO_LREAL
+ */
+ case function_dt_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ break;
+
+/****
+ *DT_TO_BYTE
+ */
+ case function_dt_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_byte*/
+ break;
+
+/****
+ *DT_TO_USINT
+ */
+ case function_dt_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_usint*/
+ break;
+
+/****
+ *DT_TO_ULINT
+ */
+ case function_dt_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_INT
+ */
+ case function_dt_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_int*/
+ break;
+
+/****
+ *TOD_TO_REAL
+ */
+ case function_tod_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_real*/
+ break;
+
+/****
+ *TOD_TO_SINT
+ */
+ case function_tod_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_sint*/
+ break;
+
+/****
+ *TOD_TO_LINT
+ */
+ case function_tod_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lint*/
+ break;
+
+/****
+ *TOD_TO_DINT
+ */
+ case function_tod_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dint*/
+ break;
+
+/****
+ *TOD_TO_DWORD
+ */
+ case function_tod_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dword*/
+ break;
+
+/****
+ *TOD_TO_UDINT
+ */
+ case function_tod_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_udint*/
+ break;
+
+/****
+ *TOD_TO_WORD
+ */
+ case function_tod_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_word*/
+ break;
+
+/****
+ *TOD_TO_STRING
+ */
+ case function_tod_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ break;
+
+/****
+ *TOD_TO_LWORD
+ */
+ case function_tod_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ break;
+
+/****
+ *TOD_TO_UINT
+ */
+ case function_tod_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_uint*/
+ break;
+
+/****
+ *TOD_TO_LREAL
+ */
+ case function_tod_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ break;
+
+/****
+ *TOD_TO_BYTE
+ */
+ case function_tod_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_byte*/
+ break;
+
+/****
+ *TOD_TO_USINT
+ */
+ case function_tod_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_usint*/
+ break;
+
+/****
+ *TOD_TO_ULINT
+ */
+ case function_tod_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_INT
+ */
+ case function_tod_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_int*/
+ break;
+
+/****
+ *UDINT_TO_REAL
+ */
+ case function_udint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_real*/
+ break;
+
+/****
+ *UDINT_TO_SINT
+ */
+ case function_udint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_sint*/
+ break;
+
+/****
+ *UDINT_TO_LINT
+ */
+ case function_udint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lint*/
+ break;
+
+/****
+ *UDINT_TO_DINT
+ */
+ case function_udint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dint*/
+ break;
+
+/****
+ *UDINT_TO_DATE
+ */
+ case function_udint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_date*/
+ break;
+
+/****
+ *UDINT_TO_DWORD
+ */
+ case function_udint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dword*/
+ break;
+
+/****
+ *UDINT_TO_DT
+ */
+ case function_udint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ break;
+
+/****
+ *UDINT_TO_TOD
+ */
+ case function_udint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_tod*/
+ break;
+
+/****
+ *UDINT_TO_WORD
+ */
+ case function_udint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_word*/
+ break;
+
+/****
+ *UDINT_TO_STRING
+ */
+ case function_udint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ break;
+
+/****
+ *UDINT_TO_LWORD
+ */
+ case function_udint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ break;
+
+/****
+ *UDINT_TO_UINT
+ */
+ case function_udint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_uint*/
+ break;
+
+/****
+ *UDINT_TO_LREAL
+ */
+ case function_udint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ break;
+
+/****
+ *UDINT_TO_BYTE
+ */
+ case function_udint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_byte*/
+ break;
+
+/****
+ *UDINT_TO_USINT
+ */
+ case function_udint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_ULINT
+ */
+ case function_udint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ break;
+
+/****
+ *UDINT_TO_BOOL
+ */
+ case function_udint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ break;
+
+/****
+ *UDINT_TO_TIME
+ */
+ case function_udint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ break;
+
+/****
+ *UDINT_TO_INT
+ */
+ case function_udint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_int*/
+ break;
+
+/****
+ *WORD_TO_REAL
+ */
+ case function_word_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_real*/
+ break;
+
+/****
+ *WORD_TO_SINT
+ */
+ case function_word_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_sint*/
+ break;
+
+/****
+ *WORD_TO_LINT
+ */
+ case function_word_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lint*/
+ break;
+
+/****
+ *WORD_TO_DINT
+ */
+ case function_word_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dint*/
+ break;
+
+/****
+ *WORD_TO_DATE
+ */
+ case function_word_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_date*/
+ break;
+
+/****
+ *WORD_TO_DWORD
+ */
+ case function_word_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dword*/
+ break;
+
+/****
+ *WORD_TO_DT
+ */
+ case function_word_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ break;
+
+/****
+ *WORD_TO_TOD
+ */
+ case function_word_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_tod*/
+ break;
+
+/****
+ *WORD_TO_UDINT
+ */
+ case function_word_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_udint*/
+ break;
+
+/****
+ *WORD_TO_STRING
+ */
+ case function_word_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ break;
+
+/****
+ *WORD_TO_LWORD
+ */
+ case function_word_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ break;
+
+/****
+ *WORD_TO_UINT
+ */
+ case function_word_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_uint*/
+ break;
+
+/****
+ *WORD_TO_LREAL
+ */
+ case function_word_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ break;
+
+/****
+ *WORD_TO_BYTE
+ */
+ case function_word_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_byte*/
+ break;
+
+/****
+ *WORD_TO_USINT
+ */
+ case function_word_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_usint*/
+ break;
+
+/****
+ *WORD_TO_ULINT
+ */
+ case function_word_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ break;
+
+/****
+ *WORD_TO_BOOL
+ */
+ case function_word_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ break;
+
+/****
+ *WORD_TO_TIME
+ */
+ case function_word_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ break;
+
+/****
+ *WORD_TO_INT
+ */
+ case function_word_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_int*/
+ break;
+
+/****
+ *STRING_TO_REAL
+ */
+ case function_string_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_real*/
+ break;
+
+/****
+ *STRING_TO_SINT
+ */
+ case function_string_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_sint*/
+ break;
+
+/****
+ *STRING_TO_LINT
+ */
+ case function_string_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lint*/
+ break;
+
+/****
+ *STRING_TO_DINT
+ */
+ case function_string_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dint*/
+ break;
+
+/****
+ *STRING_TO_DATE
+ */
+ case function_string_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_date*/
+ break;
+
+/****
+ *STRING_TO_DWORD
+ */
+ case function_string_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dword*/
+ break;
+
+/****
+ *STRING_TO_DT
+ */
+ case function_string_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ break;
+
+/****
+ *STRING_TO_TOD
+ */
+ case function_string_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_tod*/
+ break;
+
+/****
+ *STRING_TO_UDINT
+ */
+ case function_string_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_udint*/
+ break;
+
+/****
+ *STRING_TO_WORD
+ */
+ case function_string_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_word*/
+ break;
+
+/****
+ *STRING_TO_LWORD
+ */
+ case function_string_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ break;
+
+/****
+ *STRING_TO_UINT
+ */
+ case function_string_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_uint*/
+ break;
+
+/****
+ *STRING_TO_LREAL
+ */
+ case function_string_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ break;
+
+/****
+ *STRING_TO_BYTE
+ */
+ case function_string_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_byte*/
+ break;
+
+/****
+ *STRING_TO_USINT
+ */
+ case function_string_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_usint*/
+ break;
+
+/****
+ *STRING_TO_ULINT
+ */
+ case function_string_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ break;
+
+/****
+ *STRING_TO_BOOL
+ */
+ case function_string_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ break;
+
+/****
+ *STRING_TO_TIME
+ */
+ case function_string_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ break;
+
+/****
+ *STRING_TO_INT
+ */
+ case function_string_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_int*/
+ break;
+
+/****
+ *LWORD_TO_REAL
+ */
+ case function_lword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_real*/
+ break;
+
+/****
+ *LWORD_TO_SINT
+ */
+ case function_lword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_sint*/
+ break;
+
+/****
+ *LWORD_TO_LINT
+ */
+ case function_lword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lint*/
+ break;
+
+/****
+ *LWORD_TO_DINT
+ */
+ case function_lword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dint*/
+ break;
+
+/****
+ *LWORD_TO_DATE
+ */
+ case function_lword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_date*/
+ break;
+
+/****
+ *LWORD_TO_DWORD
+ */
+ case function_lword_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dword*/
+ break;
+
+/****
+ *LWORD_TO_DT
+ */
+ case function_lword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ break;
+
+/****
+ *LWORD_TO_TOD
+ */
+ case function_lword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_tod*/
+ break;
+
+/****
+ *LWORD_TO_UDINT
+ */
+ case function_lword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_udint*/
+ break;
+
+/****
+ *LWORD_TO_WORD
+ */
+ case function_lword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_word*/
+ break;
+
+/****
+ *LWORD_TO_STRING
+ */
+ case function_lword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ break;
+
+/****
+ *LWORD_TO_UINT
+ */
+ case function_lword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_uint*/
+ break;
+
+/****
+ *LWORD_TO_LREAL
+ */
+ case function_lword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ break;
+
+/****
+ *LWORD_TO_BYTE
+ */
+ case function_lword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_byte*/
+ break;
+
+/****
+ *LWORD_TO_USINT
+ */
+ case function_lword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_usint*/
+ break;
+
+/****
+ *LWORD_TO_ULINT
+ */
+ case function_lword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ break;
+
+/****
+ *LWORD_TO_BOOL
+ */
+ case function_lword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ break;
+
+/****
+ *LWORD_TO_TIME
+ */
+ case function_lword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ break;
+
+/****
+ *LWORD_TO_INT
+ */
+ case function_lword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_int*/
+ break;
+
+/****
+ *UINT_TO_REAL
+ */
+ case function_uint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_real*/
+ break;
+
+/****
+ *UINT_TO_SINT
+ */
+ case function_uint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_sint*/
+ break;
+
+/****
+ *UINT_TO_LINT
+ */
+ case function_uint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lint*/
+ break;
+
+/****
+ *UINT_TO_DINT
+ */
+ case function_uint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dint*/
+ break;
+
+/****
+ *UINT_TO_DATE
+ */
+ case function_uint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_date*/
+ break;
+
+/****
+ *UINT_TO_DWORD
+ */
+ case function_uint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dword*/
+ break;
+
+/****
+ *UINT_TO_DT
+ */
+ case function_uint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ break;
+
+/****
+ *UINT_TO_TOD
+ */
+ case function_uint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_tod*/
+ break;
+
+/****
+ *UINT_TO_UDINT
+ */
+ case function_uint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_udint*/
+ break;
+
+/****
+ *UINT_TO_WORD
+ */
+ case function_uint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_word*/
+ break;
+
+/****
+ *UINT_TO_STRING
+ */
+ case function_uint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ break;
+
+/****
+ *UINT_TO_LWORD
+ */
+ case function_uint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ break;
+
+/****
+ *UINT_TO_LREAL
+ */
+ case function_uint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ break;
+
+/****
+ *UINT_TO_BYTE
+ */
+ case function_uint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_byte*/
+ break;
+
+/****
+ *UINT_TO_USINT
+ */
+ case function_uint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_usint*/
+ break;
+
+/****
+ *UINT_TO_ULINT
+ */
+ case function_uint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ break;
+
+/****
+ *UINT_TO_BOOL
+ */
+ case function_uint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ break;
+
+/****
+ *UINT_TO_TIME
+ */
+ case function_uint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ break;
+
+/****
+ *UINT_TO_INT
+ */
+ case function_uint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_int*/
+ break;
+
+/****
+ *LREAL_TO_REAL
+ */
+ case function_lreal_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_real*/
+ break;
+
+/****
+ *LREAL_TO_SINT
+ */
+ case function_lreal_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_sint*/
+ break;
+
+/****
+ *LREAL_TO_LINT
+ */
+ case function_lreal_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lint*/
+ break;
+
+/****
+ *LREAL_TO_DINT
+ */
+ case function_lreal_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dint*/
+ break;
+
+/****
+ *LREAL_TO_DATE
+ */
+ case function_lreal_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_date*/
+ break;
+
+/****
+ *LREAL_TO_DWORD
+ */
+ case function_lreal_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dword*/
+ break;
+
+/****
+ *LREAL_TO_DT
+ */
+ case function_lreal_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ break;
+
+/****
+ *LREAL_TO_TOD
+ */
+ case function_lreal_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_tod*/
+ break;
+
+/****
+ *LREAL_TO_UDINT
+ */
+ case function_lreal_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_udint*/
+ break;
+
+/****
+ *LREAL_TO_WORD
+ */
+ case function_lreal_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_word*/
+ break;
+
+/****
+ *LREAL_TO_STRING
+ */
+ case function_lreal_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ break;
+
+/****
+ *LREAL_TO_LWORD
+ */
+ case function_lreal_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ break;
+
+/****
+ *LREAL_TO_UINT
+ */
+ case function_lreal_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_uint*/
+ break;
+
+/****
+ *LREAL_TO_BYTE
+ */
+ case function_lreal_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_byte*/
+ break;
+
+/****
+ *LREAL_TO_USINT
+ */
+ case function_lreal_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_usint*/
+ break;
+
+/****
+ *LREAL_TO_ULINT
+ */
+ case function_lreal_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ break;
+
+/****
+ *LREAL_TO_BOOL
+ */
+ case function_lreal_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ break;
+
+/****
+ *LREAL_TO_TIME
+ */
+ case function_lreal_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ break;
+
+/****
+ *LREAL_TO_INT
+ */
+ case function_lreal_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_int*/
+ break;
+
+/****
+ *BYTE_TO_REAL
+ */
+ case function_byte_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_real*/
+ break;
+
+/****
+ *BYTE_TO_SINT
+ */
+ case function_byte_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_sint*/
+ break;
+
+/****
+ *BYTE_TO_LINT
+ */
+ case function_byte_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lint*/
+ break;
+
+/****
+ *BYTE_TO_DINT
+ */
+ case function_byte_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dint*/
+ break;
+
+/****
+ *BYTE_TO_DATE
+ */
+ case function_byte_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_date*/
+ break;
+
+/****
+ *BYTE_TO_DWORD
+ */
+ case function_byte_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dword*/
+ break;
+
+/****
+ *BYTE_TO_DT
+ */
+ case function_byte_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ break;
+
+/****
+ *BYTE_TO_TOD
+ */
+ case function_byte_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_tod*/
+ break;
+
+/****
+ *BYTE_TO_UDINT
+ */
+ case function_byte_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_udint*/
+ break;
+
+/****
+ *BYTE_TO_WORD
+ */
+ case function_byte_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_word*/
+ break;
+
+/****
+ *BYTE_TO_STRING
+ */
+ case function_byte_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ break;
+
+/****
+ *BYTE_TO_LWORD
+ */
+ case function_byte_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ break;
+
+/****
+ *BYTE_TO_UINT
+ */
+ case function_byte_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_uint*/
+ break;
+
+/****
+ *BYTE_TO_LREAL
+ */
+ case function_byte_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ break;
+
+/****
+ *BYTE_TO_USINT
+ */
+ case function_byte_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_usint*/
+ break;
+
+/****
+ *BYTE_TO_ULINT
+ */
+ case function_byte_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ break;
+
+/****
+ *BYTE_TO_BOOL
+ */
+ case function_byte_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_bool*/
+ break;
+
+/****
+ *BYTE_TO_TIME
+ */
+ case function_byte_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ break;
+
+/****
+ *BYTE_TO_INT
+ */
+ case function_byte_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_int*/
+ break;
+
+/****
+ *USINT_TO_REAL
+ */
+ case function_usint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_real*/
+ break;
+
+/****
+ *USINT_TO_SINT
+ */
+ case function_usint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_sint*/
+ break;
+
+/****
+ *USINT_TO_LINT
+ */
+ case function_usint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lint*/
+ break;
+
+/****
+ *USINT_TO_DINT
+ */
+ case function_usint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dint*/
+ break;
+
+/****
+ *USINT_TO_DATE
+ */
+ case function_usint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_date*/
+ break;
+
+/****
+ *USINT_TO_DWORD
+ */
+ case function_usint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dword*/
+ break;
+
+/****
+ *USINT_TO_DT
+ */
+ case function_usint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ break;
+
+/****
+ *USINT_TO_TOD
+ */
+ case function_usint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_tod*/
+ break;
+
+/****
+ *USINT_TO_UDINT
+ */
+ case function_usint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_udint*/
+ break;
+
+/****
+ *USINT_TO_WORD
+ */
+ case function_usint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_word*/
+ break;
+
+/****
+ *USINT_TO_STRING
+ */
+ case function_usint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ break;
+
+/****
+ *USINT_TO_LWORD
+ */
+ case function_usint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ break;
+
+/****
+ *USINT_TO_UINT
+ */
+ case function_usint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_uint*/
+ break;
+
+/****
+ *USINT_TO_LREAL
+ */
+ case function_usint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ break;
+
+/****
+ *USINT_TO_BYTE
+ */
+ case function_usint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_byte*/
+ break;
+
+/****
+ *USINT_TO_ULINT
+ */
+ case function_usint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ break;
+
+/****
+ *USINT_TO_BOOL
+ */
+ case function_usint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ break;
+
+/****
+ *USINT_TO_TIME
+ */
+ case function_usint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ break;
+
+/****
+ *USINT_TO_INT
+ */
+ case function_usint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_int*/
+ break;
+
+/****
+ *ULINT_TO_REAL
+ */
+ case function_ulint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_real*/
+ break;
+
+/****
+ *ULINT_TO_SINT
+ */
+ case function_ulint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_sint*/
+ break;
+
+/****
+ *ULINT_TO_LINT
+ */
+ case function_ulint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lint*/
+ break;
+
+/****
+ *ULINT_TO_DINT
+ */
+ case function_ulint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dint*/
+ break;
+
+/****
+ *ULINT_TO_DATE
+ */
+ case function_ulint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_date*/
+ break;
+
+/****
+ *ULINT_TO_DWORD
+ */
+ case function_ulint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dword*/
+ break;
+
+/****
+ *ULINT_TO_DT
+ */
+ case function_ulint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ break;
+
+/****
+ *ULINT_TO_TOD
+ */
+ case function_ulint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_tod*/
+ break;
+
+/****
+ *ULINT_TO_UDINT
+ */
+ case function_ulint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_udint*/
+ break;
+
+/****
+ *ULINT_TO_WORD
+ */
+ case function_ulint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_word*/
+ break;
+
+/****
+ *ULINT_TO_STRING
+ */
+ case function_ulint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ break;
+
+/****
+ *ULINT_TO_LWORD
+ */
+ case function_ulint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ break;
+
+/****
+ *ULINT_TO_UINT
+ */
+ case function_ulint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_uint*/
+ break;
+
+/****
+ *ULINT_TO_LREAL
+ */
+ case function_ulint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ break;
+
+/****
+ *ULINT_TO_BYTE
+ */
+ case function_ulint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_byte*/
+ break;
+
+/****
+ *ULINT_TO_USINT
+ */
+ case function_ulint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_usint*/
+ break;
+
+/****
+ *ULINT_TO_BOOL
+ */
+ case function_ulint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ break;
+
+/****
+ *ULINT_TO_TIME
+ */
+ case function_ulint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ break;
+
+/****
+ *ULINT_TO_INT
+ */
+ case function_ulint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_int*/
+ break;
+
+/****
+ *BOOL_TO_REAL
+ */
+ case function_bool_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_real*/
+ break;
+
+/****
*BOOL_TO_SINT
*/
case function_bool_to_sint :
@@ -46,14 +9848,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
{
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -62,6 +9863,507 @@
break;
/****
+ *BOOL_TO_LINT
+ */
+ case function_bool_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lint*/
+ break;
+
+/****
+ *BOOL_TO_DINT
+ */
+ case function_bool_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dint*/
+ break;
+
+/****
+ *BOOL_TO_DATE
+ */
+ case function_bool_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_date*/
+ break;
+
+/****
+ *BOOL_TO_DWORD
+ */
+ case function_bool_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dword*/
+ break;
+
+/****
+ *BOOL_TO_DT
+ */
+ case function_bool_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ break;
+
+/****
+ *BOOL_TO_TOD
+ */
+ case function_bool_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_tod*/
+ break;
+
+/****
+ *BOOL_TO_UDINT
+ */
+ case function_bool_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_udint*/
+ break;
+
+/****
+ *BOOL_TO_WORD
+ */
+ case function_bool_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_word*/
+ break;
+
+/****
+ *BOOL_TO_STRING
+ */
+ case function_bool_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ break;
+
+/****
+ *BOOL_TO_LWORD
+ */
+ case function_bool_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ break;
+
+/****
+ *BOOL_TO_UINT
+ */
+ case function_bool_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_uint*/
+ break;
+
+/****
+ *BOOL_TO_LREAL
+ */
+ case function_bool_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_BYTE
+ */
+ case function_bool_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_byte*/
+ break;
+
+/****
+ *BOOL_TO_USINT
+ */
+ case function_bool_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_usint*/
+ break;
+
+/****
+ *BOOL_TO_ULINT
+ */
+ case function_bool_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_ulint*/
+ break;
+
+/****
+ *BOOL_TO_TIME
+ */
+ case function_bool_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ break;
+
+/****
*BOOL_TO_INT
*/
case function_bool_to_int :
@@ -78,14 +10380,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
{
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -94,11747 +10395,1464 @@
break;
/****
- *BOOL_TO_DINT
- */
- case function_bool_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ *TIME_TO_REAL
+ */
+ case function_time_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_real*/
+ break;
+
+/****
+ *TIME_TO_SINT
+ */
+ case function_time_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_sint*/
+ break;
+
+/****
+ *TIME_TO_LINT
+ */
+ case function_time_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lint*/
+ break;
+
+/****
+ *TIME_TO_DINT
+ */
+ case function_time_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dint*/
- break;
-
-/****
- *BOOL_TO_LINT
- */
- case function_bool_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dint*/
+ break;
+
+/****
+ *TIME_TO_DWORD
+ */
+ case function_time_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dword*/
+ break;
+
+/****
+ *TIME_TO_UDINT
+ */
+ case function_time_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_udint*/
+ break;
+
+/****
+ *TIME_TO_WORD
+ */
+ case function_time_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_word*/
+ break;
+
+/****
+ *TIME_TO_STRING
+ */
+ case function_time_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ break;
+
+/****
+ *TIME_TO_LWORD
+ */
+ case function_time_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ break;
+
+/****
+ *TIME_TO_UINT
+ */
+ case function_time_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_uint*/
+ break;
+
+/****
+ *TIME_TO_LREAL
+ */
+ case function_time_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ break;
+
+/****
+ *TIME_TO_BYTE
+ */
+ case function_time_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_byte*/
+ break;
+
+/****
+ *TIME_TO_USINT
+ */
+ case function_time_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_usint*/
+ break;
+
+/****
+ *TIME_TO_ULINT
+ */
+ case function_time_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_INT
+ */
+ case function_time_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_int*/
+ break;
+
+/****
+ *INT_TO_REAL
+ */
+ case function_int_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_real*/
+ break;
+
+/****
+ *INT_TO_SINT
+ */
+ case function_int_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_sint*/
+ break;
+
+/****
+ *INT_TO_LINT
+ */
+ case function_int_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lint*/
- break;
-
-/****
- *BOOL_TO_USINT
- */
- case function_bool_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lint*/
+ break;
+
+/****
+ *INT_TO_DINT
+ */
+ case function_int_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dint*/
+ break;
+
+/****
+ *INT_TO_DATE
+ */
+ case function_int_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_date*/
+ break;
+
+/****
+ *INT_TO_DWORD
+ */
+ case function_int_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dword*/
+ break;
+
+/****
+ *INT_TO_DT
+ */
+ case function_int_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ break;
+
+/****
+ *INT_TO_TOD
+ */
+ case function_int_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_tod*/
+ break;
+
+/****
+ *INT_TO_UDINT
+ */
+ case function_int_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_udint*/
+ break;
+
+/****
+ *INT_TO_WORD
+ */
+ case function_int_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_word*/
+ break;
+
+/****
+ *INT_TO_STRING
+ */
+ case function_int_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ break;
+
+/****
+ *INT_TO_LWORD
+ */
+ case function_int_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ break;
+
+/****
+ *INT_TO_UINT
+ */
+ case function_int_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_uint*/
+ break;
+
+/****
+ *INT_TO_LREAL
+ */
+ case function_int_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ break;
+
+/****
+ *INT_TO_BYTE
+ */
+ case function_int_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_byte*/
+ break;
+
+/****
+ *INT_TO_USINT
+ */
+ case function_int_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_usint*/
- break;
-
-/****
- *BOOL_TO_UINT
- */
- case function_bool_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_usint*/
+ break;
+
+/****
+ *INT_TO_ULINT
+ */
+ case function_int_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ break;
+
+/****
+ *INT_TO_BOOL
+ */
+ case function_int_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ break;
+
+/****
+ *INT_TO_TIME
+ */
+ case function_int_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ break;
+
+/****
+ *TRUNC
+ */
+ case function_trunc :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(search_expression_type->is_real_type(IN_type_symbol))
+ {
+
+ 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"));
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_trunc*/
+ break;
+
+/****
+ *BCD_TO_UDINT
+ */
+ case function_bcd_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_udint*/
+ break;
+
+/****
+ *BCD_TO_UINT
+ */
+ case function_bcd_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_uint*/
- break;
-
-/****
- *BOOL_TO_UDINT
- */
- case function_bool_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_udint*/
- break;
-
-/****
- *BOOL_TO_ULINT
- */
- case function_bool_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_uint*/
+ break;
+
+/****
+ *BCD_TO_ULINT
+ */
+ case function_bcd_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_ulint*/
- break;
-
-/****
- *BOOL_TO_REAL
- */
- case function_bool_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_real*/
- break;
-
-/****
- *BOOL_TO_LREAL
- */
- case function_bool_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_TIME
- */
- case function_bool_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- break;
-
-/****
- *BOOL_TO_DATE
- */
- case function_bool_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_ulint*/
+ break;
+
+/****
+ *BCD_TO_USINT
+ */
+ case function_bcd_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_BCD
+ */
+ case function_udint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bcd*/
+ break;
+
+/****
+ *UINT_TO_BCD
+ */
+ case function_uint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bcd*/
+ break;
+
+/****
+ *USINT_TO_BCD
+ */
+ case function_usint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bcd*/
+ break;
+
+/****
+ *ULINT_TO_BCD
+ */
+ case function_ulint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bcd*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_TIME_OF_DAY
+ */
+ case function_date_and_time_to_time_of_day :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day"));
+ 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;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_time_of_day*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_DATE
+ */
+ case function_date_and_time_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_date*/
- break;
-
-/****
- *BOOL_TO_TOD
- */
- case function_bool_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_tod*/
- break;
-
-/****
- *BOOL_TO_DT
- */
- case function_bool_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- break;
-
-/****
- *BOOL_TO_STRING
- */
- case function_bool_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bool_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_BYTE
- */
- case function_bool_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_byte*/
- break;
-
-/****
- *BOOL_TO_WORD
- */
- case function_bool_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_word*/
- break;
-
-/****
- *BOOL_TO_DWORD
- */
- case function_bool_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dword*/
- break;
-
-/****
- *BOOL_TO_LWORD
- */
- case function_bool_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- break;
-
-/****
- *SINT_TO_BOOL
- */
- case function_sint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bool*/
- break;
-
-/****
- *SINT_TO_INT
- */
- case function_sint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_int*/
- break;
-
-/****
- *SINT_TO_DINT
- */
- case function_sint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dint*/
- break;
-
-/****
- *SINT_TO_LINT
- */
- case function_sint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lint*/
- break;
-
-/****
- *SINT_TO_USINT
- */
- case function_sint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_usint*/
- break;
-
-/****
- *SINT_TO_UINT
- */
- case function_sint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_uint*/
- break;
-
-/****
- *SINT_TO_UDINT
- */
- case function_sint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_udint*/
- break;
-
-/****
- *SINT_TO_ULINT
- */
- case function_sint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_ulint*/
- break;
-
-/****
- *SINT_TO_REAL
- */
- case function_sint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_real*/
- break;
-
-/****
- *SINT_TO_LREAL
- */
- case function_sint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lreal*/
- break;
-
-/****
- *SINT_TO_TIME
- */
- case function_sint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- break;
-
-/****
- *SINT_TO_DATE
- */
- case function_sint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_date*/
- break;
-
-/****
- *SINT_TO_TOD
- */
- case function_sint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_tod*/
- break;
-
-/****
- *SINT_TO_DT
- */
- case function_sint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- break;
-
-/****
- *SINT_TO_STRING
- */
- case function_sint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_BYTE
- */
- case function_sint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_byte*/
- break;
-
-/****
- *SINT_TO_WORD
- */
- case function_sint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_word*/
- break;
-
-/****
- *SINT_TO_DWORD
- */
- case function_sint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dword*/
- break;
-
-/****
- *SINT_TO_LWORD
- */
- case function_sint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lword*/
- break;
-
-/****
- *INT_TO_BOOL
- */
- case function_int_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bool*/
- break;
-
-/****
- *INT_TO_SINT
- */
- case function_int_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_sint*/
- break;
-
-/****
- *INT_TO_DINT
- */
- case function_int_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dint*/
- break;
-
-/****
- *INT_TO_LINT
- */
- case function_int_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lint*/
- break;
-
-/****
- *INT_TO_USINT
- */
- case function_int_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_usint*/
- break;
-
-/****
- *INT_TO_UINT
- */
- case function_int_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_uint*/
- break;
-
-/****
- *INT_TO_UDINT
- */
- case function_int_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_udint*/
- break;
-
-/****
- *INT_TO_ULINT
- */
- case function_int_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_ulint*/
- break;
-
-/****
- *INT_TO_REAL
- */
- case function_int_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_real*/
- break;
-
-/****
- *INT_TO_LREAL
- */
- case function_int_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lreal*/
- break;
-
-/****
- *INT_TO_TIME
- */
- case function_int_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- break;
-
-/****
- *INT_TO_DATE
- */
- case function_int_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_date*/
- break;
-
-/****
- *INT_TO_TOD
- */
- case function_int_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_tod*/
- break;
-
-/****
- *INT_TO_DT
- */
- case function_int_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- break;
-
-/****
- *INT_TO_STRING
- */
- case function_int_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_BYTE
- */
- case function_int_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_byte*/
- break;
-
-/****
- *INT_TO_WORD
- */
- case function_int_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_word*/
- break;
-
-/****
- *INT_TO_DWORD
- */
- case function_int_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dword*/
- break;
-
-/****
- *INT_TO_LWORD
- */
- case function_int_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lword*/
- break;
-
-/****
- *DINT_TO_BOOL
- */
- case function_dint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- break;
-
-/****
- *DINT_TO_SINT
- */
- case function_dint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_sint*/
- break;
-
-/****
- *DINT_TO_INT
- */
- case function_dint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_int*/
- break;
-
-/****
- *DINT_TO_LINT
- */
- case function_dint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lint*/
- break;
-
-/****
- *DINT_TO_USINT
- */
- case function_dint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_usint*/
- break;
-
-/****
- *DINT_TO_UINT
- */
- case function_dint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_uint*/
- break;
-
-/****
- *DINT_TO_UDINT
- */
- case function_dint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_udint*/
- break;
-
-/****
- *DINT_TO_ULINT
- */
- case function_dint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_ulint*/
- break;
-
-/****
- *DINT_TO_REAL
- */
- case function_dint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_real*/
- break;
-
-/****
- *DINT_TO_LREAL
- */
- case function_dint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- break;
-
-/****
- *DINT_TO_TIME
- */
- case function_dint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- break;
-
-/****
- *DINT_TO_DATE
- */
- case function_dint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_date*/
- break;
-
-/****
- *DINT_TO_TOD
- */
- case function_dint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_tod*/
- break;
-
-/****
- *DINT_TO_DT
- */
- case function_dint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- break;
-
-/****
- *DINT_TO_STRING
- */
- case function_dint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_BYTE
- */
- case function_dint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_byte*/
- break;
-
-/****
- *DINT_TO_WORD
- */
- case function_dint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_word*/
- break;
-
-/****
- *DINT_TO_DWORD
- */
- case function_dint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dword*/
- break;
-
-/****
- *DINT_TO_LWORD
- */
- case function_dint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- break;
-
-/****
- *LINT_TO_BOOL
- */
- case function_lint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- break;
-
-/****
- *LINT_TO_SINT
- */
- case function_lint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_sint*/
- break;
-
-/****
- *LINT_TO_INT
- */
- case function_lint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_int*/
- break;
-
-/****
- *LINT_TO_DINT
- */
- case function_lint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dint*/
- break;
-
-/****
- *LINT_TO_USINT
- */
- case function_lint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_usint*/
- break;
-
-/****
- *LINT_TO_UINT
- */
- case function_lint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_uint*/
- break;
-
-/****
- *LINT_TO_UDINT
- */
- case function_lint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_udint*/
- break;
-
-/****
- *LINT_TO_ULINT
- */
- case function_lint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- break;
-
-/****
- *LINT_TO_REAL
- */
- case function_lint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_real*/
- break;
-
-/****
- *LINT_TO_LREAL
- */
- case function_lint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- break;
-
-/****
- *LINT_TO_TIME
- */
- case function_lint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- break;
-
-/****
- *LINT_TO_DATE
- */
- case function_lint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_date*/
- break;
-
-/****
- *LINT_TO_TOD
- */
- case function_lint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_tod*/
- break;
-
-/****
- *LINT_TO_DT
- */
- case function_lint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- break;
-
-/****
- *LINT_TO_STRING
- */
- case function_lint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_BYTE
- */
- case function_lint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_byte*/
- break;
-
-/****
- *LINT_TO_WORD
- */
- case function_lint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_word*/
- break;
-
-/****
- *LINT_TO_DWORD
- */
- case function_lint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dword*/
- break;
-
-/****
- *LINT_TO_LWORD
- */
- case function_lint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- break;
-
-/****
- *USINT_TO_BOOL
- */
- case function_usint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- break;
-
-/****
- *USINT_TO_SINT
- */
- case function_usint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_sint*/
- break;
-
-/****
- *USINT_TO_INT
- */
- case function_usint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_int*/
- break;
-
-/****
- *USINT_TO_DINT
- */
- case function_usint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dint*/
- break;
-
-/****
- *USINT_TO_LINT
- */
- case function_usint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lint*/
- break;
-
-/****
- *USINT_TO_UINT
- */
- case function_usint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_uint*/
- break;
-
-/****
- *USINT_TO_UDINT
- */
- case function_usint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_udint*/
- break;
-
-/****
- *USINT_TO_ULINT
- */
- case function_usint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- break;
-
-/****
- *USINT_TO_REAL
- */
- case function_usint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_real*/
- break;
-
-/****
- *USINT_TO_LREAL
- */
- case function_usint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- break;
-
-/****
- *USINT_TO_TIME
- */
- case function_usint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- break;
-
-/****
- *USINT_TO_DATE
- */
- case function_usint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_date*/
- break;
-
-/****
- *USINT_TO_TOD
- */
- case function_usint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_tod*/
- break;
-
-/****
- *USINT_TO_DT
- */
- case function_usint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- break;
-
-/****
- *USINT_TO_STRING
- */
- case function_usint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_BYTE
- */
- case function_usint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_byte*/
- break;
-
-/****
- *USINT_TO_WORD
- */
- case function_usint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_word*/
- break;
-
-/****
- *USINT_TO_DWORD
- */
- case function_usint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dword*/
- break;
-
-/****
- *USINT_TO_LWORD
- */
- case function_usint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- break;
-
-/****
- *UINT_TO_BOOL
- */
- case function_uint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- break;
-
-/****
- *UINT_TO_SINT
- */
- case function_uint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_sint*/
- break;
-
-/****
- *UINT_TO_INT
- */
- case function_uint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_int*/
- break;
-
-/****
- *UINT_TO_DINT
- */
- case function_uint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dint*/
- break;
-
-/****
- *UINT_TO_LINT
- */
- case function_uint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lint*/
- break;
-
-/****
- *UINT_TO_USINT
- */
- case function_uint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_usint*/
- break;
-
-/****
- *UINT_TO_UDINT
- */
- case function_uint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_udint*/
- break;
-
-/****
- *UINT_TO_ULINT
- */
- case function_uint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- break;
-
-/****
- *UINT_TO_REAL
- */
- case function_uint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_real*/
- break;
-
-/****
- *UINT_TO_LREAL
- */
- case function_uint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- break;
-
-/****
- *UINT_TO_TIME
- */
- case function_uint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- break;
-
-/****
- *UINT_TO_DATE
- */
- case function_uint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_date*/
- break;
-
-/****
- *UINT_TO_TOD
- */
- case function_uint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_tod*/
- break;
-
-/****
- *UINT_TO_DT
- */
- case function_uint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- break;
-
-/****
- *UINT_TO_STRING
- */
- case function_uint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_BYTE
- */
- case function_uint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_byte*/
- break;
-
-/****
- *UINT_TO_WORD
- */
- case function_uint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_word*/
- break;
-
-/****
- *UINT_TO_DWORD
- */
- case function_uint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dword*/
- break;
-
-/****
- *UINT_TO_LWORD
- */
- case function_uint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- break;
-
-/****
- *UDINT_TO_BOOL
- */
- case function_udint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- break;
-
-/****
- *UDINT_TO_SINT
- */
- case function_udint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_sint*/
- break;
-
-/****
- *UDINT_TO_INT
- */
- case function_udint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_int*/
- break;
-
-/****
- *UDINT_TO_DINT
- */
- case function_udint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dint*/
- break;
-
-/****
- *UDINT_TO_LINT
- */
- case function_udint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lint*/
- break;
-
-/****
- *UDINT_TO_USINT
- */
- case function_udint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_usint*/
- break;
-
-/****
- *UDINT_TO_UINT
- */
- case function_udint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_uint*/
- break;
-
-/****
- *UDINT_TO_ULINT
- */
- case function_udint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- break;
-
-/****
- *UDINT_TO_REAL
- */
- case function_udint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_real*/
- break;
-
-/****
- *UDINT_TO_LREAL
- */
- case function_udint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- break;
-
-/****
- *UDINT_TO_TIME
- */
- case function_udint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- break;
-
-/****
- *UDINT_TO_DATE
- */
- case function_udint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_date*/
- break;
-
-/****
- *UDINT_TO_TOD
- */
- case function_udint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_tod*/
- break;
-
-/****
- *UDINT_TO_DT
- */
- case function_udint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- break;
-
-/****
- *UDINT_TO_STRING
- */
- case function_udint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_BYTE
- */
- case function_udint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_byte*/
- break;
-
-/****
- *UDINT_TO_WORD
- */
- case function_udint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_word*/
- break;
-
-/****
- *UDINT_TO_DWORD
- */
- case function_udint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dword*/
- break;
-
-/****
- *UDINT_TO_LWORD
- */
- case function_udint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- break;
-
-/****
- *ULINT_TO_BOOL
- */
- case function_ulint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- break;
-
-/****
- *ULINT_TO_SINT
- */
- case function_ulint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_sint*/
- break;
-
-/****
- *ULINT_TO_INT
- */
- case function_ulint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_int*/
- break;
-
-/****
- *ULINT_TO_DINT
- */
- case function_ulint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dint*/
- break;
-
-/****
- *ULINT_TO_LINT
- */
- case function_ulint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lint*/
- break;
-
-/****
- *ULINT_TO_USINT
- */
- case function_ulint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_usint*/
- break;
-
-/****
- *ULINT_TO_UINT
- */
- case function_ulint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_uint*/
- break;
-
-/****
- *ULINT_TO_UDINT
- */
- case function_ulint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- break;
-
-/****
- *ULINT_TO_REAL
- */
- case function_ulint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_real*/
- break;
-
-/****
- *ULINT_TO_LREAL
- */
- case function_ulint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- break;
-
-/****
- *ULINT_TO_TIME
- */
- case function_ulint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- break;
-
-/****
- *ULINT_TO_DATE
- */
- case function_ulint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_date*/
- break;
-
-/****
- *ULINT_TO_TOD
- */
- case function_ulint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_tod*/
- break;
-
-/****
- *ULINT_TO_DT
- */
- case function_ulint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- break;
-
-/****
- *ULINT_TO_STRING
- */
- case function_ulint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_BYTE
- */
- case function_ulint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_byte*/
- break;
-
-/****
- *ULINT_TO_WORD
- */
- case function_ulint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_word*/
- break;
-
-/****
- *ULINT_TO_DWORD
- */
- case function_ulint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dword*/
- break;
-
-/****
- *ULINT_TO_LWORD
- */
- case function_ulint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- break;
-
-/****
- *REAL_TO_BOOL
- */
- case function_real_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_bool*/
- break;
-
-/****
- *REAL_TO_SINT
- */
- case function_real_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_sint*/
- break;
-
-/****
- *REAL_TO_INT
- */
- case function_real_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_int*/
- break;
-
-/****
- *REAL_TO_DINT
- */
- case function_real_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dint*/
- break;
-
-/****
- *REAL_TO_LINT
- */
- case function_real_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lint*/
- break;
-
-/****
- *REAL_TO_USINT
- */
- case function_real_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_usint*/
- break;
-
-/****
- *REAL_TO_UINT
- */
- case function_real_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_uint*/
- break;
-
-/****
- *REAL_TO_UDINT
- */
- case function_real_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_udint*/
- break;
-
-/****
- *REAL_TO_ULINT
- */
- case function_real_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_ulint*/
- break;
-
-/****
- *REAL_TO_LREAL
- */
- case function_real_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lreal*/
- break;
-
-/****
- *REAL_TO_TIME
- */
- case function_real_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_time*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_date*/
- break;
-
-/****
- *REAL_TO_TOD
- */
- case function_real_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_tod*/
- break;
-
-/****
- *REAL_TO_DT
- */
- case function_real_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dt*/
- break;
-
-/****
- *REAL_TO_STRING
- */
- case function_real_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_string*/
- break;
-
-/****
- *REAL_TO_BYTE
- */
- case function_real_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_byte*/
- break;
-
-/****
- *REAL_TO_WORD
- */
- case function_real_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_word*/
- break;
-
-/****
- *REAL_TO_DWORD
- */
- case function_real_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dword*/
- break;
-
-/****
- *REAL_TO_LWORD
- */
- case function_real_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lword*/
- break;
-
-/****
- *LREAL_TO_BOOL
- */
- case function_lreal_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_bool*/
- break;
-
-/****
- *LREAL_TO_SINT
- */
- case function_lreal_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_sint*/
- break;
-
-/****
- *LREAL_TO_INT
- */
- case function_lreal_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_int*/
- break;
-
-/****
- *LREAL_TO_DINT
- */
- case function_lreal_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dint*/
- break;
-
-/****
- *LREAL_TO_LINT
- */
- case function_lreal_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lint*/
- break;
-
-/****
- *LREAL_TO_USINT
- */
- case function_lreal_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_usint*/
- break;
-
-/****
- *LREAL_TO_UINT
- */
- case function_lreal_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_uint*/
- break;
-
-/****
- *LREAL_TO_UDINT
- */
- case function_lreal_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_udint*/
- break;
-
-/****
- *LREAL_TO_ULINT
- */
- case function_lreal_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_ulint*/
- break;
-
-/****
- *LREAL_TO_REAL
- */
- case function_lreal_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_real*/
- break;
-
-/****
- *LREAL_TO_TIME
- */
- case function_lreal_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_time*/
- break;
-
-/****
- *LREAL_TO_DATE
- */
- case function_lreal_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_date*/
- break;
-
-/****
- *LREAL_TO_TOD
- */
- case function_lreal_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_tod*/
- break;
-
-/****
- *LREAL_TO_DT
- */
- case function_lreal_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- break;
-
-/****
- *LREAL_TO_STRING
- */
- case function_lreal_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_BYTE
- */
- case function_lreal_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_byte*/
- break;
-
-/****
- *LREAL_TO_WORD
- */
- case function_lreal_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_word*/
- break;
-
-/****
- *LREAL_TO_DWORD
- */
- case function_lreal_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dword*/
- break;
-
-/****
- *LREAL_TO_LWORD
- */
- case function_lreal_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lword*/
- break;
-
-/****
- *TIME_TO_SINT
- */
- case function_time_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_sint*/
- break;
-
-/****
- *TIME_TO_INT
- */
- case function_time_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_int*/
- break;
-
-/****
- *TIME_TO_DINT
- */
- case function_time_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dint*/
- break;
-
-/****
- *TIME_TO_LINT
- */
- case function_time_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lint*/
- break;
-
-/****
- *TIME_TO_USINT
- */
- case function_time_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_usint*/
- break;
-
-/****
- *TIME_TO_UINT
- */
- case function_time_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_uint*/
- break;
-
-/****
- *TIME_TO_UDINT
- */
- case function_time_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_udint*/
- break;
-
-/****
- *TIME_TO_ULINT
- */
- case function_time_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_REAL
- */
- case function_time_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_real*/
- break;
-
-/****
- *TIME_TO_LREAL
- */
- case function_time_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- break;
-
-/****
- *TIME_TO_STRING
- */
- case function_time_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_BYTE
- */
- case function_time_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_byte*/
- break;
-
-/****
- *TIME_TO_WORD
- */
- case function_time_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_word*/
- break;
-
-/****
- *TIME_TO_DWORD
- */
- case function_time_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dword*/
- break;
-
-/****
- *TIME_TO_LWORD
- */
- case function_time_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- break;
-
-/****
- *DATE_TO_SINT
- */
- case function_date_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_sint*/
- break;
-
-/****
- *DATE_TO_INT
- */
- case function_date_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_int*/
- break;
-
-/****
- *DATE_TO_DINT
- */
- case function_date_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dint*/
- break;
-
-/****
- *DATE_TO_LINT
- */
- case function_date_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lint*/
- break;
-
-/****
- *DATE_TO_USINT
- */
- case function_date_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_usint*/
- break;
-
-/****
- *DATE_TO_UINT
- */
- case function_date_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_uint*/
- break;
-
-/****
- *DATE_TO_UDINT
- */
- case function_date_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_udint*/
- break;
-
-/****
- *DATE_TO_ULINT
- */
- case function_date_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_REAL
- */
- case function_date_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_real*/
- break;
-
-/****
- *DATE_TO_LREAL
- */
- case function_date_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- break;
-
-/****
- *DATE_TO_STRING
- */
- case function_date_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__date_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_BYTE
- */
- case function_date_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_byte*/
- break;
-
-/****
- *DATE_TO_WORD
- */
- case function_date_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_word*/
- break;
-
-/****
- *DATE_TO_DWORD
- */
- case function_date_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dword*/
- break;
-
-/****
- *DATE_TO_LWORD
- */
- case function_date_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- break;
-
-/****
- *TOD_TO_SINT
- */
- case function_tod_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_sint*/
- break;
-
-/****
- *TOD_TO_INT
- */
- case function_tod_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_int*/
- break;
-
-/****
- *TOD_TO_DINT
- */
- case function_tod_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dint*/
- break;
-
-/****
- *TOD_TO_LINT
- */
- case function_tod_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lint*/
- break;
-
-/****
- *TOD_TO_USINT
- */
- case function_tod_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_usint*/
- break;
-
-/****
- *TOD_TO_UINT
- */
- case function_tod_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_uint*/
- break;
-
-/****
- *TOD_TO_UDINT
- */
- case function_tod_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_udint*/
- break;
-
-/****
- *TOD_TO_ULINT
- */
- case function_tod_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_REAL
- */
- case function_tod_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_real*/
- break;
-
-/****
- *TOD_TO_LREAL
- */
- case function_tod_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- break;
-
-/****
- *TOD_TO_STRING
- */
- case function_tod_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__tod_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_BYTE
- */
- case function_tod_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_byte*/
- break;
-
-/****
- *TOD_TO_WORD
- */
- case function_tod_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_word*/
- break;
-
-/****
- *TOD_TO_DWORD
- */
- case function_tod_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dword*/
- break;
-
-/****
- *TOD_TO_LWORD
- */
- case function_tod_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- break;
-
-/****
- *DT_TO_SINT
- */
- case function_dt_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_sint*/
- break;
-
-/****
- *DT_TO_INT
- */
- case function_dt_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_int*/
- break;
-
-/****
- *DT_TO_DINT
- */
- case function_dt_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dint*/
- break;
-
-/****
- *DT_TO_LINT
- */
- case function_dt_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lint*/
- break;
-
-/****
- *DT_TO_USINT
- */
- case function_dt_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_usint*/
- break;
-
-/****
- *DT_TO_UINT
- */
- case function_dt_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_uint*/
- break;
-
-/****
- *DT_TO_UDINT
- */
- case function_dt_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_udint*/
- break;
-
-/****
- *DT_TO_ULINT
- */
- case function_dt_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_REAL
- */
- case function_dt_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_real*/
- break;
-
-/****
- *DT_TO_LREAL
- */
- case function_dt_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- break;
-
-/****
- *DT_TO_STRING
- */
- case function_dt_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__dt_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_BYTE
- */
- case function_dt_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_byte*/
- break;
-
-/****
- *DT_TO_WORD
- */
- case function_dt_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_word*/
- break;
-
-/****
- *DT_TO_DWORD
- */
- case function_dt_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dword*/
- break;
-
-/****
- *DT_TO_LWORD
- */
- case function_dt_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- break;
-
-/****
- *STRING_TO_BOOL
- */
- case function_string_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bool(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- break;
-
-/****
- *STRING_TO_SINT
- */
- case function_string_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_sint*/
- break;
-
-/****
- *STRING_TO_INT
- */
- case function_string_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_int*/
- break;
-
-/****
- *STRING_TO_DINT
- */
- case function_string_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dint*/
- break;
-
-/****
- *STRING_TO_LINT
- */
- case function_string_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lint*/
- break;
-
-/****
- *STRING_TO_USINT
- */
- case function_string_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_usint*/
- break;
-
-/****
- *STRING_TO_UINT
- */
- case function_string_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_uint*/
- break;
-
-/****
- *STRING_TO_UDINT
- */
- case function_string_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_udint*/
- break;
-
-/****
- *STRING_TO_ULINT
- */
- case function_string_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- break;
-
-/****
- *STRING_TO_REAL
- */
- case function_string_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_real*/
- break;
-
-/****
- *STRING_TO_LREAL
- */
- case function_string_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- break;
-
-/****
- *STRING_TO_TIME
- */
- case function_string_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- break;
-
-/****
- *STRING_TO_DATE
- */
- case function_string_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_date*/
- break;
-
-/****
- *STRING_TO_TOD
- */
- case function_string_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_tod*/
- break;
-
-/****
- *STRING_TO_DT
- */
- case function_string_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *STRING_TO_BYTE
- */
- case function_string_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_byte*/
- break;
-
-/****
- *STRING_TO_WORD
- */
- case function_string_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_word*/
- break;
-
-/****
- *STRING_TO_DWORD
- */
- case function_string_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dword*/
- break;
-
-/****
- *STRING_TO_LWORD
- */
- case function_string_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- break;
-
-/****
- *BYTE_TO_BOOL
- */
- case function_byte_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- break;
-
-/****
- *BYTE_TO_SINT
- */
- case function_byte_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_sint*/
- break;
-
-/****
- *BYTE_TO_INT
- */
- case function_byte_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_int*/
- break;
-
-/****
- *BYTE_TO_DINT
- */
- case function_byte_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dint*/
- break;
-
-/****
- *BYTE_TO_LINT
- */
- case function_byte_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lint*/
- break;
-
-/****
- *BYTE_TO_USINT
- */
- case function_byte_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_usint*/
- break;
-
-/****
- *BYTE_TO_UINT
- */
- case function_byte_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_uint*/
- break;
-
-/****
- *BYTE_TO_UDINT
- */
- case function_byte_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_udint*/
- break;
-
-/****
- *BYTE_TO_ULINT
- */
- case function_byte_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- break;
-
-/****
- *BYTE_TO_REAL
- */
- case function_byte_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_real*/
- break;
-
-/****
- *BYTE_TO_LREAL
- */
- case function_byte_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- break;
-
-/****
- *BYTE_TO_TIME
- */
- case function_byte_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- break;
-
-/****
- *BYTE_TO_DATE
- */
- case function_byte_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_date*/
- break;
-
-/****
- *BYTE_TO_TOD
- */
- case function_byte_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_tod*/
- break;
-
-/****
- *BYTE_TO_DT
- */
- case function_byte_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- break;
-
-/****
- *BYTE_TO_STRING
- */
- case function_byte_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WORD
- */
- case function_byte_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_word*/
- break;
-
-/****
- *BYTE_TO_DWORD
- */
- case function_byte_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dword*/
- break;
-
-/****
- *BYTE_TO_LWORD
- */
- case function_byte_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- break;
-
-/****
- *WORD_TO_BOOL
- */
- case function_word_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- break;
-
-/****
- *WORD_TO_SINT
- */
- case function_word_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_sint*/
- break;
-
-/****
- *WORD_TO_INT
- */
- case function_word_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_int*/
- break;
-
-/****
- *WORD_TO_DINT
- */
- case function_word_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dint*/
- break;
-
-/****
- *WORD_TO_LINT
- */
- case function_word_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lint*/
- break;
-
-/****
- *WORD_TO_USINT
- */
- case function_word_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_usint*/
- break;
-
-/****
- *WORD_TO_UINT
- */
- case function_word_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_uint*/
- break;
-
-/****
- *WORD_TO_UDINT
- */
- case function_word_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_udint*/
- break;
-
-/****
- *WORD_TO_ULINT
- */
- case function_word_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- break;
-
-/****
- *WORD_TO_REAL
- */
- case function_word_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_real*/
- break;
-
-/****
- *WORD_TO_LREAL
- */
- case function_word_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- break;
-
-/****
- *WORD_TO_TIME
- */
- case function_word_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- break;
-
-/****
- *WORD_TO_DATE
- */
- case function_word_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_date*/
- break;
-
-/****
- *WORD_TO_TOD
- */
- case function_word_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_tod*/
- break;
-
-/****
- *WORD_TO_DT
- */
- case function_word_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- break;
-
-/****
- *WORD_TO_STRING
- */
- case function_word_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_BYTE
- */
- case function_word_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_byte*/
- break;
-
-/****
- *WORD_TO_DWORD
- */
- case function_word_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dword*/
- break;
-
-/****
- *WORD_TO_LWORD
- */
- case function_word_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- break;
-
-/****
- *DWORD_TO_BOOL
- */
- case function_dword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- break;
-
-/****
- *DWORD_TO_SINT
- */
- case function_dword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_sint*/
- break;
-
-/****
- *DWORD_TO_INT
- */
- case function_dword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_int*/
- break;
-
-/****
- *DWORD_TO_DINT
- */
- case function_dword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dint*/
- break;
-
-/****
- *DWORD_TO_LINT
- */
- case function_dword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lint*/
- break;
-
-/****
- *DWORD_TO_USINT
- */
- case function_dword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_usint*/
- break;
-
-/****
- *DWORD_TO_UINT
- */
- case function_dword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_uint*/
- break;
-
-/****
- *DWORD_TO_UDINT
- */
- case function_dword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_udint*/
- break;
-
-/****
- *DWORD_TO_ULINT
- */
- case function_dword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- break;
-
-/****
- *DWORD_TO_REAL
- */
- case function_dword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_real*/
- break;
-
-/****
- *DWORD_TO_LREAL
- */
- case function_dword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- break;
-
-/****
- *DWORD_TO_TIME
- */
- case function_dword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- break;
-
-/****
- *DWORD_TO_DATE
- */
- case function_dword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_date*/
- break;
-
-/****
- *DWORD_TO_TOD
- */
- case function_dword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_tod*/
- break;
-
-/****
- *DWORD_TO_DT
- */
- case function_dword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- break;
-
-/****
- *DWORD_TO_STRING
- */
- case function_dword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_BYTE
- */
- case function_dword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_byte*/
- break;
-
-/****
- *DWORD_TO_WORD
- */
- case function_dword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_word*/
- break;
-
-/****
- *DWORD_TO_LWORD
- */
- case function_dword_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- break;
-
-/****
- *LWORD_TO_BOOL
- */
- case function_lword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- break;
-
-/****
- *LWORD_TO_SINT
- */
- case function_lword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_sint*/
- break;
-
-/****
- *LWORD_TO_INT
- */
- case function_lword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_int*/
- break;
-
-/****
- *LWORD_TO_DINT
- */
- case function_lword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dint*/
- break;
-
-/****
- *LWORD_TO_LINT
- */
- case function_lword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lint*/
- break;
-
-/****
- *LWORD_TO_USINT
- */
- case function_lword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_usint*/
- break;
-
-/****
- *LWORD_TO_UINT
- */
- case function_lword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_uint*/
- break;
-
-/****
- *LWORD_TO_UDINT
- */
- case function_lword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_udint*/
- break;
-
-/****
- *LWORD_TO_ULINT
- */
- case function_lword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- break;
-
-/****
- *LWORD_TO_REAL
- */
- case function_lword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_real*/
- break;
-
-/****
- *LWORD_TO_LREAL
- */
- case function_lword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- break;
-
-/****
- *LWORD_TO_TIME
- */
- case function_lword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- break;
-
-/****
- *LWORD_TO_DATE
- */
- case function_lword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_date*/
- break;
-
-/****
- *LWORD_TO_TOD
- */
- case function_lword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_tod*/
- break;
-
-/****
- *LWORD_TO_DT
- */
- case function_lword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- break;
-
-/****
- *LWORD_TO_STRING
- */
- case function_lword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_BYTE
- */
- case function_lword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_byte*/
- break;
-
-/****
- *LWORD_TO_WORD
- */
- case function_lword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_word*/
- break;
-
-/****
- *LWORD_TO_DWORD
- */
- case function_lword_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- break;
-
-/****
- *TRUNC
- */
- case function_trunc :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_date*/
+ break;
+
+/****
+ *ABS
+ */
+ case function_abs :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = &this->default_variable_name;
+
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(search_expression_type->is_num_type(IN_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__abs_"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_abs*/
+ break;
+
+/****
+ *SQRT
+ */
+ case function_sqrt :
{
symbol_c *last_type_symbol = NULL;
@@ -11848,382 +11866,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(int)");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_trunc*/
- break;
-
-/****
- *BCD_TO_USINT
- */
- case function_bcd_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_usint*/
- break;
-
-/****
- *BCD_TO_UINT
- */
- case function_bcd_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_uint*/
- break;
-
-/****
- *BCD_TO_UDINT
- */
- case function_bcd_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_udint*/
- break;
-
-/****
- *BCD_TO_ULINT
- */
- case function_bcd_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_ulint*/
- break;
-
-/****
- *USINT_TO_BCD
- */
- case function_usint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bcd*/
- break;
-
-/****
- *UINT_TO_BCD
- */
- case function_uint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bcd*/
- break;
-
-/****
- *UDINT_TO_BCD
- */
- case function_udint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bcd*/
- break;
-
-/****
- *ULINT_TO_BCD
- */
- case function_ulint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bcd*/
- break;
-
-/****
- *DATE_AND_TIME_TO_TIME_OF_DAY
- */
- case function_date_and_time_to_time_of_day :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__date_and_time_to_time_of_day(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_time_of_day*/
- break;
-
-/****
- *DATE_AND_TIME_TO_DATE
- */
- case function_date_and_time_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("__date_and_time_to_date(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_date*/
- break;
-
-/****
- *ABS
- */
- case function_abs :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(search_expression_type->is_num_type(IN_type_symbol))
- {
-
+ function_name = (symbol_c*)(new pragma_c("sqrt"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__abs_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_abs*/
- break;
-
-/****
- *SQRT
- */
- case function_sqrt :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sqrt*/
+ break;
+
+/****
+ *LN
+ */
+ case function_ln :
{
symbol_c *last_type_symbol = NULL;
@@ -12237,24 +11897,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("ln"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("sqrt(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sqrt*/
- break;
-
-/****
- *LN
- */
- case function_ln :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ln*/
+ break;
+
+/****
+ *LOG
+ */
+ case function_log :
{
symbol_c *last_type_symbol = NULL;
@@ -12268,24 +11928,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("log"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("ln(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ln*/
- break;
-
-/****
- *LOG
- */
- case function_log :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_log*/
+ break;
+
+/****
+ *EXP
+ */
+ case function_exp :
{
symbol_c *last_type_symbol = NULL;
@@ -12299,24 +11959,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("exp"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("log(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_log*/
- break;
-
-/****
- *EXP
- */
- case function_exp :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_exp*/
+ break;
+
+/****
+ *SIN
+ */
+ case function_sin :
{
symbol_c *last_type_symbol = NULL;
@@ -12330,24 +11990,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("sin"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("exp(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_exp*/
- break;
-
-/****
- *SIN
- */
- case function_sin :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sin*/
+ break;
+
+/****
+ *COS
+ */
+ case function_cos :
{
symbol_c *last_type_symbol = NULL;
@@ -12361,24 +12021,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("cos"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("sin(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sin*/
- break;
-
-/****
- *COS
- */
- case function_cos :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_cos*/
+ break;
+
+/****
+ *TAN
+ */
+ case function_tan :
{
symbol_c *last_type_symbol = NULL;
@@ -12392,24 +12052,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("tan"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("cos(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_cos*/
- break;
-
-/****
- *TAN
- */
- case function_tan :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tan*/
+ break;
+
+/****
+ *ASIN
+ */
+ case function_asin :
{
symbol_c *last_type_symbol = NULL;
@@ -12423,24 +12083,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("asin"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("tan(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tan*/
- break;
-
-/****
- *ASIN
- */
- case function_asin :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_asin*/
+ break;
+
+/****
+ *ACOS
+ */
+ case function_acos :
{
symbol_c *last_type_symbol = NULL;
@@ -12454,24 +12114,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("acos"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("asin(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_asin*/
- break;
-
-/****
- *ACOS
- */
- case function_acos :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_acos*/
+ break;
+
+/****
+ *ATAN
+ */
+ case function_atan :
{
symbol_c *last_type_symbol = NULL;
@@ -12485,44 +12145,13 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("atan"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("acos(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_acos*/
- break;
-
-/****
- *ATAN
- */
- case function_atan :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(search_expression_type->is_real_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("atan(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
+ break;
+
+ }
+
ERROR;
}
@@ -12561,12 +12190,13 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("+\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__add_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -12586,19 +12216,17 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("+\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -12621,16 +12249,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -12653,16 +12280,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -12685,21 +12311,21 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12737,12 +12363,13 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("*\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__mul_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -12762,19 +12389,17 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("*\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -12797,21 +12422,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__time_mul"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_mul(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12849,18 +12474,16 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__sub_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("-\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -12883,16 +12506,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -12915,29 +12537,26 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -12960,29 +12579,26 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -13005,21 +12621,21 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13057,18 +12673,16 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__div_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("/\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -13091,21 +12705,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__time_div"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_div(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13143,23 +12757,22 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__mod_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("%\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13197,21 +12810,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("pow"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.print("pow(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13235,11 +12848,14 @@
if(search_expression_type->is_num_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__move_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_suffix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -13278,19 +12894,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__shl_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- IN_param_value->accept(*this);
- s4o.print("<<");
- N_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13328,19 +12947,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__shr_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- IN_param_value->accept(*this);
- s4o.print(">>");
- N_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13378,23 +13000,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__ror_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__ror_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- N_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13432,23 +13053,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__rol_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__rol_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- N_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13486,14 +13106,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("&\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__and_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -13513,29 +13132,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("&\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13573,14 +13186,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("|\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__or_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -13600,29 +13212,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("|\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13660,14 +13266,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("^\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__xor_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -13687,29 +13292,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("^\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13733,12 +13332,14 @@
if(search_expression_type->is_binary_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__not_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("~");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_suffix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -13791,26 +13392,29 @@
{
+ function_name = (symbol_c*)(new pragma_c("__sel_"));
+ ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- G_param_value->accept(*this);
- s4o.print(" ? ");
- IN1_param_value->accept(*this);
- s4o.print(" : ");
- IN0_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN0_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13848,16 +13452,13 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__max_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__max_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -13877,24 +13478,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13932,16 +13532,13 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__min_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__min_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -13961,24 +13558,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14030,30 +13626,29 @@
{
+ function_name = (symbol_c*)(new pragma_c("__limit_"));
+ ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__limit_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- MN_param_value->accept(*this);
- s4o.print(", ");
- IN_param_value->accept(*this);
- s4o.print(", ");
- MX_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14105,18 +13700,14 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__mux_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- K_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN0_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__mux_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
int base_num = 2;
symbol_c *param_value = NULL;
@@ -14136,29 +13727,29 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14196,16 +13787,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__gt_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__gt_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14225,24 +13813,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14280,16 +13867,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__ge_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__ge_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14309,24 +13893,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14364,16 +13947,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__eq_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__eq_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14393,24 +13973,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14448,16 +14027,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__lt_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__lt_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14477,24 +14053,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14532,16 +14107,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__le_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__le_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14561,24 +14133,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14616,16 +14187,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__ne_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__ne_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14645,24 +14213,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14686,13 +14253,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__len"));
+ 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;
- s4o.print("__len(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
+ break;
+
+ }
+
ERROR;
}
@@ -14731,21 +14298,21 @@
if(search_expression_type->is_integer_type(L_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__left"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__left(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14783,21 +14350,21 @@
if(search_expression_type->is_integer_type(L_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__right"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__right(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14849,28 +14416,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__mid"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__mid(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14908,16 +14475,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14940,14 +14506,13 @@
if(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;
- s4o.indent_right();
- s4o.print("__concat(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__concat"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14967,24 +14532,22 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15036,28 +14599,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__insert"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__insert(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15109,28 +14672,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__delete"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__delete(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15196,35 +14759,35 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__replace"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__replace(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15262,21 +14825,21 @@
if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__find"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__find(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15286,4 +14849,3 @@
case function_none :
ERROR;
}
-return NULL;
--- a/stage4/generate_c/search_expression_type.cc Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/search_expression_type.cc Fri Oct 24 16:37:46 2008 +0200
@@ -172,150 +172,6 @@
#include "search_type_code.c"
-#if 0
- void *compute_standard_function_st(function_invocation_c *symbol) {
- symbol_c *current_type = NULL;
- symbol_c *return_type = NULL;
-
- function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
- function_call_param_iterator_c function_call_param_iterator(symbol);
- search_expression_type_c* search_expression_type = this;
-
- for(int current_param = 0; current_param < ((list_c *)symbol->parameter_assignment_list)->n; current_param++) {
- symbol_c *param_name = NULL;
- switch (current_function_type) {
- case function_add:
- case function_and:
- case function_or:
- param_name = generate_param_name("IN%d", current_param + 1);
- break;
- case function_sub:
- if (current_param < 2)
- param_name = generate_param_name("IN%d", current_param + 1);
- else ERROR;
- break;
- default: ERROR;
- }
-
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *param_value = function_call_param_iterator.search(param_name);
- delete param_name;
-
- /* Get the value from a foo(<param_value>) style call */
- if (param_value == NULL)
- param_value = function_call_param_iterator.next();
-
- if (param_value == NULL) ERROR;
-
- symbol_c *param_type = (symbol_c *)param_value->accept(*this);
-
- switch (current_function_type) {
- case function_add:
- if (current_param == 0)
- current_type = param_type;
- else if (current_param == 1) {
- if ((is_integer_type(current_type) && is_same_type(current_type, param_type)) ||
- (is_real_type(current_type) && is_same_type(current_type, param_type))) {
- current_type = common_type(current_type, param_type);
- return_type = current_type;
- }
- else if (is_time_type(current_type)) {
- if ((typeid(*current_type) == typeid(time_type_name_c)) && (typeid(*param_type) == typeid(time_type_name_c))) {return_type = (symbol_c *)&time_type_name;}
- else if (typeid(*current_type) == typeid(tod_type_name_c) && typeid(*param_type) == typeid(time_type_name_c)) {return_type = (symbol_c *)&tod_type_name;}
- else if (typeid(*current_type) == typeid(dt_type_name_c) && typeid(*param_type) == typeid(time_type_name_c)) {return_type = (symbol_c *)&dt_type_name;}
- else ERROR;
- }
- else ERROR;
- }
- else if (!is_time_type(current_type) && is_same_type(current_type, param_type)) {
- current_type = common_type(current_type, param_type);
- return_type = current_type;
- }
- else ERROR;
- break;
- case function_sub:
- if (current_param == 0)
- current_type = param_type;
- else if (current_param == 1) {
- if ((is_integer_type(current_type) && is_same_type(current_type, param_type)) ||
- (is_real_type(current_type) && is_same_type(current_type, param_type)))
- return_type = common_type(current_type, param_type);
- else if (is_time_type(current_type)) {
- if (typeid(*current_type) == typeid(time_type_name_c) && typeid(*param_type) == typeid(time_type_name_c)) {return_type = (symbol_c *)&time_type_name;}
- else if (typeid(*current_type) == typeid(date_type_name_c) && typeid(*param_type) == typeid(date_type_name_c)) {return_type = (symbol_c *)&time_type_name;}
- else if (typeid(*current_type) == typeid(tod_type_name_c) && typeid(*param_type) == typeid(time_type_name_c)) {return_type = (symbol_c *)&tod_type_name;}
- else if (typeid(*current_type) == typeid(tod_type_name_c) && typeid(*param_type) == typeid(tod_type_name_c)) {return_type = (symbol_c *)&time_type_name;}
- else if (typeid(*current_type) == typeid(dt_type_name_c) && typeid(*param_type) == typeid(time_type_name_c)) {return_type = (symbol_c *)&dt_type_name;}
- else if (typeid(*current_type) == typeid(dt_type_name_c) && typeid(*param_type) == typeid(dt_type_name_c)) {return_type = (symbol_c *)&time_type_name;}
- else ERROR;
- }
- else ERROR;
- }
- else ERROR;
- break;
- case function_and:
- case function_or:
- if (current_param == 0)
- if (is_binary_type(param_type))
- current_type = param_type;
- else ERROR;
- else if (is_same_type(current_type, param_type))
- return_type = common_type(current_type, param_type);
- else ERROR;
- break;
- default: ERROR;
- }
- }
- return (void *)return_type;
- }
-
- void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_type) {
- /*symbol_c *current_type = NULL;*/
- symbol_c *return_type = NULL;
- function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
- if (current_function_type == function_none) ERROR;
-
- function_call_param_iterator_c function_call_param_iterator(symbol);
-
- int nb_param = 1;
- if (symbol->il_operand_list != NULL)
- nb_param += ((list_c *)symbol->il_operand_list)->n;
-
- for(int current_param = 0; current_param < nb_param; current_param++) {
-
- if (current_param != 0) {
- symbol_c *param_name = NULL;
- switch (current_function_type) {
- default: ERROR;
- }
-
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *param_value = function_call_param_iterator.search(param_name);
- delete param_name;
-
- /* Get the value from a foo(<param_value>) style call */
- if (param_value == NULL)
- param_value = function_call_param_iterator.next();
-
- if (param_value == NULL) ERROR;
-
- param_type = (symbol_c *)param_value->accept(*this);
- }
-
- switch (current_function_type) {
- case function_sqrt:
- if (current_param == 0 && is_real_type(param_type))
- return_type = param_type;
- else ERROR;
- break;
- default: ERROR;
- }
- }
-
- return (void *)return_type;
- }
-#endif
-
/*static bool_type_name_c bool_type_name;*/
/* A helper function... */
@@ -486,7 +342,7 @@
function_declaration_c *f_decl = function_symtable.find_value(symbol->function_name);
if (f_decl == function_symtable.end_value()) {
- void *res = compute_standard_function_st(symbol);
+ void *res = compute_standard_function_default(symbol);
if (res == NULL)
ERROR;
return res;
--- a/stage4/generate_c/search_type_code.c Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/search_type_code.c Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,22 +21,10329 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
-
-void *compute_standard_function_st(function_invocation_c *symbol) {
-
- function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
- function_call_param_iterator_c function_call_param_iterator(symbol);
+
+void *compute_standard_function_default(function_invocation_c *st_symbol = NULL, il_formal_funct_call_c *il_symbol = NULL) {
+ function_type_t current_function_type;
+ function_call_param_iterator_c *tmp_function_call_param_iterator;
+ if (st_symbol != NULL && il_symbol == NULL) {
+ current_function_type = get_function_type((identifier_c *)st_symbol->function_name);
+ tmp_function_call_param_iterator = new function_call_param_iterator_c(st_symbol);
+ }
+ else if (st_symbol == NULL && il_symbol != NULL) {
+ current_function_type = get_function_type((identifier_c *)il_symbol->function_name);
+ tmp_function_call_param_iterator = new function_call_param_iterator_c(il_symbol);
+ }
+ else
+ ERROR;
+ function_call_param_iterator_c function_call_param_iterator(*tmp_function_call_param_iterator);
search_expression_type_c* search_expression_type = this;
switch(current_function_type){
/****
+ *REAL_TO_SINT
+ */
+ case function_real_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_sint*/
+ break;
+
+/****
+ *REAL_TO_LINT
+ */
+ case function_real_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lint*/
+ break;
+
+/****
+ *REAL_TO_DINT
+ */
+ case function_real_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dint*/
+ break;
+
+/****
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_date*/
+ break;
+
+/****
+ *REAL_TO_DWORD
+ */
+ case function_real_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dword*/
+ break;
+
+/****
+ *REAL_TO_DT
+ */
+ case function_real_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ break;
+
+/****
+ *REAL_TO_TOD
+ */
+ case function_real_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_tod*/
+ break;
+
+/****
+ *REAL_TO_UDINT
+ */
+ case function_real_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_udint*/
+ break;
+
+/****
+ *REAL_TO_WORD
+ */
+ case function_real_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_word*/
+ break;
+
+/****
+ *REAL_TO_STRING
+ */
+ case function_real_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_string*/
+ break;
+
+/****
+ *REAL_TO_LWORD
+ */
+ case function_real_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lword*/
+ break;
+
+/****
+ *REAL_TO_UINT
+ */
+ case function_real_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_uint*/
+ break;
+
+/****
+ *REAL_TO_LREAL
+ */
+ case function_real_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lreal*/
+ break;
+
+/****
+ *REAL_TO_BYTE
+ */
+ case function_real_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_byte*/
+ break;
+
+/****
+ *REAL_TO_USINT
+ */
+ case function_real_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_usint*/
+ break;
+
+/****
+ *REAL_TO_ULINT
+ */
+ case function_real_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_ulint*/
+ break;
+
+/****
+ *REAL_TO_BOOL
+ */
+ case function_real_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_bool*/
+ break;
+
+/****
+ *REAL_TO_TIME
+ */
+ case function_real_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_time*/
+ break;
+
+/****
+ *REAL_TO_INT
+ */
+ case function_real_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_int*/
+ break;
+
+/****
+ *SINT_TO_REAL
+ */
+ case function_sint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_real*/
+ break;
+
+/****
+ *SINT_TO_LINT
+ */
+ case function_sint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lint*/
+ break;
+
+/****
+ *SINT_TO_DINT
+ */
+ case function_sint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dint*/
+ break;
+
+/****
+ *SINT_TO_DATE
+ */
+ case function_sint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_date*/
+ break;
+
+/****
+ *SINT_TO_DWORD
+ */
+ case function_sint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dword*/
+ break;
+
+/****
+ *SINT_TO_DT
+ */
+ case function_sint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ break;
+
+/****
+ *SINT_TO_TOD
+ */
+ case function_sint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_tod*/
+ break;
+
+/****
+ *SINT_TO_UDINT
+ */
+ case function_sint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_udint*/
+ break;
+
+/****
+ *SINT_TO_WORD
+ */
+ case function_sint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_word*/
+ break;
+
+/****
+ *SINT_TO_STRING
+ */
+ case function_sint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ break;
+
+/****
+ *SINT_TO_LWORD
+ */
+ case function_sint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ break;
+
+/****
+ *SINT_TO_UINT
+ */
+ case function_sint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_uint*/
+ break;
+
+/****
+ *SINT_TO_LREAL
+ */
+ case function_sint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ break;
+
+/****
+ *SINT_TO_BYTE
+ */
+ case function_sint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_byte*/
+ break;
+
+/****
+ *SINT_TO_USINT
+ */
+ case function_sint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_usint*/
+ break;
+
+/****
+ *SINT_TO_ULINT
+ */
+ case function_sint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ break;
+
+/****
+ *SINT_TO_BOOL
+ */
+ case function_sint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ break;
+
+/****
+ *SINT_TO_TIME
+ */
+ case function_sint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ break;
+
+/****
+ *SINT_TO_INT
+ */
+ case function_sint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_int*/
+ break;
+
+/****
+ *LINT_TO_REAL
+ */
+ case function_lint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_real*/
+ break;
+
+/****
+ *LINT_TO_SINT
+ */
+ case function_lint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_sint*/
+ break;
+
+/****
+ *LINT_TO_DINT
+ */
+ case function_lint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dint*/
+ break;
+
+/****
+ *LINT_TO_DATE
+ */
+ case function_lint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_date*/
+ break;
+
+/****
+ *LINT_TO_DWORD
+ */
+ case function_lint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dword*/
+ break;
+
+/****
+ *LINT_TO_DT
+ */
+ case function_lint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ break;
+
+/****
+ *LINT_TO_TOD
+ */
+ case function_lint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_tod*/
+ break;
+
+/****
+ *LINT_TO_UDINT
+ */
+ case function_lint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_udint*/
+ break;
+
+/****
+ *LINT_TO_WORD
+ */
+ case function_lint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_word*/
+ break;
+
+/****
+ *LINT_TO_STRING
+ */
+ case function_lint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ break;
+
+/****
+ *LINT_TO_LWORD
+ */
+ case function_lint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ break;
+
+/****
+ *LINT_TO_UINT
+ */
+ case function_lint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_uint*/
+ break;
+
+/****
+ *LINT_TO_LREAL
+ */
+ case function_lint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ break;
+
+/****
+ *LINT_TO_BYTE
+ */
+ case function_lint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_byte*/
+ break;
+
+/****
+ *LINT_TO_USINT
+ */
+ case function_lint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_usint*/
+ break;
+
+/****
+ *LINT_TO_ULINT
+ */
+ case function_lint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ break;
+
+/****
+ *LINT_TO_BOOL
+ */
+ case function_lint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ break;
+
+/****
+ *LINT_TO_TIME
+ */
+ case function_lint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ break;
+
+/****
+ *LINT_TO_INT
+ */
+ case function_lint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_int*/
+ break;
+
+/****
+ *DINT_TO_REAL
+ */
+ case function_dint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_real*/
+ break;
+
+/****
+ *DINT_TO_SINT
+ */
+ case function_dint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_sint*/
+ break;
+
+/****
+ *DINT_TO_LINT
+ */
+ case function_dint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lint*/
+ break;
+
+/****
+ *DINT_TO_DATE
+ */
+ case function_dint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_date*/
+ break;
+
+/****
+ *DINT_TO_DWORD
+ */
+ case function_dint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dword*/
+ break;
+
+/****
+ *DINT_TO_DT
+ */
+ case function_dint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ break;
+
+/****
+ *DINT_TO_TOD
+ */
+ case function_dint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_tod*/
+ break;
+
+/****
+ *DINT_TO_UDINT
+ */
+ case function_dint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_udint*/
+ break;
+
+/****
+ *DINT_TO_WORD
+ */
+ case function_dint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_word*/
+ break;
+
+/****
+ *DINT_TO_STRING
+ */
+ case function_dint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ break;
+
+/****
+ *DINT_TO_LWORD
+ */
+ case function_dint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ break;
+
+/****
+ *DINT_TO_UINT
+ */
+ case function_dint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_uint*/
+ break;
+
+/****
+ *DINT_TO_LREAL
+ */
+ case function_dint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ break;
+
+/****
+ *DINT_TO_BYTE
+ */
+ case function_dint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_byte*/
+ break;
+
+/****
+ *DINT_TO_USINT
+ */
+ case function_dint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_usint*/
+ break;
+
+/****
+ *DINT_TO_ULINT
+ */
+ case function_dint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ break;
+
+/****
+ *DINT_TO_BOOL
+ */
+ case function_dint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ break;
+
+/****
+ *DINT_TO_TIME
+ */
+ case function_dint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ break;
+
+/****
+ *DINT_TO_INT
+ */
+ case function_dint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_int*/
+ break;
+
+/****
+ *DATE_TO_REAL
+ */
+ case function_date_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_real*/
+ break;
+
+/****
+ *DATE_TO_SINT
+ */
+ case function_date_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_sint*/
+ break;
+
+/****
+ *DATE_TO_LINT
+ */
+ case function_date_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lint*/
+ break;
+
+/****
+ *DATE_TO_DINT
+ */
+ case function_date_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dint*/
+ break;
+
+/****
+ *DATE_TO_DWORD
+ */
+ case function_date_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dword*/
+ break;
+
+/****
+ *DATE_TO_UDINT
+ */
+ case function_date_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_udint*/
+ break;
+
+/****
+ *DATE_TO_WORD
+ */
+ case function_date_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_word*/
+ break;
+
+/****
+ *DATE_TO_STRING
+ */
+ case function_date_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ break;
+
+/****
+ *DATE_TO_LWORD
+ */
+ case function_date_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ break;
+
+/****
+ *DATE_TO_UINT
+ */
+ case function_date_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_uint*/
+ break;
+
+/****
+ *DATE_TO_LREAL
+ */
+ case function_date_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ break;
+
+/****
+ *DATE_TO_BYTE
+ */
+ case function_date_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_byte*/
+ break;
+
+/****
+ *DATE_TO_USINT
+ */
+ case function_date_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_usint*/
+ break;
+
+/****
+ *DATE_TO_ULINT
+ */
+ case function_date_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_INT
+ */
+ case function_date_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_int*/
+ break;
+
+/****
+ *DWORD_TO_REAL
+ */
+ case function_dword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_real*/
+ break;
+
+/****
+ *DWORD_TO_SINT
+ */
+ case function_dword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_sint*/
+ break;
+
+/****
+ *DWORD_TO_LINT
+ */
+ case function_dword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lint*/
+ break;
+
+/****
+ *DWORD_TO_DINT
+ */
+ case function_dword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dint*/
+ break;
+
+/****
+ *DWORD_TO_DATE
+ */
+ case function_dword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_date*/
+ break;
+
+/****
+ *DWORD_TO_DT
+ */
+ case function_dword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ break;
+
+/****
+ *DWORD_TO_TOD
+ */
+ case function_dword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_tod*/
+ break;
+
+/****
+ *DWORD_TO_UDINT
+ */
+ case function_dword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_udint*/
+ break;
+
+/****
+ *DWORD_TO_WORD
+ */
+ case function_dword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_word*/
+ break;
+
+/****
+ *DWORD_TO_STRING
+ */
+ case function_dword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ break;
+
+/****
+ *DWORD_TO_LWORD
+ */
+ case function_dword_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ break;
+
+/****
+ *DWORD_TO_UINT
+ */
+ case function_dword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_uint*/
+ break;
+
+/****
+ *DWORD_TO_LREAL
+ */
+ case function_dword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ break;
+
+/****
+ *DWORD_TO_BYTE
+ */
+ case function_dword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_byte*/
+ break;
+
+/****
+ *DWORD_TO_USINT
+ */
+ case function_dword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_usint*/
+ break;
+
+/****
+ *DWORD_TO_ULINT
+ */
+ case function_dword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ break;
+
+/****
+ *DWORD_TO_BOOL
+ */
+ case function_dword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ break;
+
+/****
+ *DWORD_TO_TIME
+ */
+ case function_dword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ break;
+
+/****
+ *DWORD_TO_INT
+ */
+ case function_dword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_int*/
+ break;
+
+/****
+ *DT_TO_REAL
+ */
+ case function_dt_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_real*/
+ break;
+
+/****
+ *DT_TO_SINT
+ */
+ case function_dt_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_sint*/
+ break;
+
+/****
+ *DT_TO_LINT
+ */
+ case function_dt_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lint*/
+ break;
+
+/****
+ *DT_TO_DINT
+ */
+ case function_dt_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dint*/
+ break;
+
+/****
+ *DT_TO_DWORD
+ */
+ case function_dt_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dword*/
+ break;
+
+/****
+ *DT_TO_UDINT
+ */
+ case function_dt_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_udint*/
+ break;
+
+/****
+ *DT_TO_WORD
+ */
+ case function_dt_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_word*/
+ break;
+
+/****
+ *DT_TO_STRING
+ */
+ case function_dt_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_string*/
+ break;
+
+/****
+ *DT_TO_LWORD
+ */
+ case function_dt_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ break;
+
+/****
+ *DT_TO_UINT
+ */
+ case function_dt_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_uint*/
+ break;
+
+/****
+ *DT_TO_LREAL
+ */
+ case function_dt_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ break;
+
+/****
+ *DT_TO_BYTE
+ */
+ case function_dt_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_byte*/
+ break;
+
+/****
+ *DT_TO_USINT
+ */
+ case function_dt_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_usint*/
+ break;
+
+/****
+ *DT_TO_ULINT
+ */
+ case function_dt_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_INT
+ */
+ case function_dt_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_int*/
+ break;
+
+/****
+ *TOD_TO_REAL
+ */
+ case function_tod_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_real*/
+ break;
+
+/****
+ *TOD_TO_SINT
+ */
+ case function_tod_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_sint*/
+ break;
+
+/****
+ *TOD_TO_LINT
+ */
+ case function_tod_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lint*/
+ break;
+
+/****
+ *TOD_TO_DINT
+ */
+ case function_tod_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dint*/
+ break;
+
+/****
+ *TOD_TO_DWORD
+ */
+ case function_tod_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dword*/
+ break;
+
+/****
+ *TOD_TO_UDINT
+ */
+ case function_tod_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_udint*/
+ break;
+
+/****
+ *TOD_TO_WORD
+ */
+ case function_tod_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_word*/
+ break;
+
+/****
+ *TOD_TO_STRING
+ */
+ case function_tod_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ break;
+
+/****
+ *TOD_TO_LWORD
+ */
+ case function_tod_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ break;
+
+/****
+ *TOD_TO_UINT
+ */
+ case function_tod_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_uint*/
+ break;
+
+/****
+ *TOD_TO_LREAL
+ */
+ case function_tod_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ break;
+
+/****
+ *TOD_TO_BYTE
+ */
+ case function_tod_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_byte*/
+ break;
+
+/****
+ *TOD_TO_USINT
+ */
+ case function_tod_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_usint*/
+ break;
+
+/****
+ *TOD_TO_ULINT
+ */
+ case function_tod_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_INT
+ */
+ case function_tod_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_int*/
+ break;
+
+/****
+ *UDINT_TO_REAL
+ */
+ case function_udint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_real*/
+ break;
+
+/****
+ *UDINT_TO_SINT
+ */
+ case function_udint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_sint*/
+ break;
+
+/****
+ *UDINT_TO_LINT
+ */
+ case function_udint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lint*/
+ break;
+
+/****
+ *UDINT_TO_DINT
+ */
+ case function_udint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dint*/
+ break;
+
+/****
+ *UDINT_TO_DATE
+ */
+ case function_udint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_date*/
+ break;
+
+/****
+ *UDINT_TO_DWORD
+ */
+ case function_udint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dword*/
+ break;
+
+/****
+ *UDINT_TO_DT
+ */
+ case function_udint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ break;
+
+/****
+ *UDINT_TO_TOD
+ */
+ case function_udint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_tod*/
+ break;
+
+/****
+ *UDINT_TO_WORD
+ */
+ case function_udint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_word*/
+ break;
+
+/****
+ *UDINT_TO_STRING
+ */
+ case function_udint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ break;
+
+/****
+ *UDINT_TO_LWORD
+ */
+ case function_udint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ break;
+
+/****
+ *UDINT_TO_UINT
+ */
+ case function_udint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_uint*/
+ break;
+
+/****
+ *UDINT_TO_LREAL
+ */
+ case function_udint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ break;
+
+/****
+ *UDINT_TO_BYTE
+ */
+ case function_udint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_byte*/
+ break;
+
+/****
+ *UDINT_TO_USINT
+ */
+ case function_udint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_ULINT
+ */
+ case function_udint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ break;
+
+/****
+ *UDINT_TO_BOOL
+ */
+ case function_udint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ break;
+
+/****
+ *UDINT_TO_TIME
+ */
+ case function_udint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ break;
+
+/****
+ *UDINT_TO_INT
+ */
+ case function_udint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_int*/
+ break;
+
+/****
+ *WORD_TO_REAL
+ */
+ case function_word_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_real*/
+ break;
+
+/****
+ *WORD_TO_SINT
+ */
+ case function_word_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_sint*/
+ break;
+
+/****
+ *WORD_TO_LINT
+ */
+ case function_word_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lint*/
+ break;
+
+/****
+ *WORD_TO_DINT
+ */
+ case function_word_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dint*/
+ break;
+
+/****
+ *WORD_TO_DATE
+ */
+ case function_word_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_date*/
+ break;
+
+/****
+ *WORD_TO_DWORD
+ */
+ case function_word_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dword*/
+ break;
+
+/****
+ *WORD_TO_DT
+ */
+ case function_word_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ break;
+
+/****
+ *WORD_TO_TOD
+ */
+ case function_word_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_tod*/
+ break;
+
+/****
+ *WORD_TO_UDINT
+ */
+ case function_word_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_udint*/
+ break;
+
+/****
+ *WORD_TO_STRING
+ */
+ case function_word_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ break;
+
+/****
+ *WORD_TO_LWORD
+ */
+ case function_word_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ break;
+
+/****
+ *WORD_TO_UINT
+ */
+ case function_word_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_uint*/
+ break;
+
+/****
+ *WORD_TO_LREAL
+ */
+ case function_word_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ break;
+
+/****
+ *WORD_TO_BYTE
+ */
+ case function_word_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_byte*/
+ break;
+
+/****
+ *WORD_TO_USINT
+ */
+ case function_word_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_usint*/
+ break;
+
+/****
+ *WORD_TO_ULINT
+ */
+ case function_word_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ break;
+
+/****
+ *WORD_TO_BOOL
+ */
+ case function_word_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ break;
+
+/****
+ *WORD_TO_TIME
+ */
+ case function_word_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ break;
+
+/****
+ *WORD_TO_INT
+ */
+ case function_word_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_int*/
+ break;
+
+/****
+ *STRING_TO_REAL
+ */
+ case function_string_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_real*/
+ break;
+
+/****
+ *STRING_TO_SINT
+ */
+ case function_string_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_sint*/
+ break;
+
+/****
+ *STRING_TO_LINT
+ */
+ case function_string_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lint*/
+ break;
+
+/****
+ *STRING_TO_DINT
+ */
+ case function_string_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dint*/
+ break;
+
+/****
+ *STRING_TO_DATE
+ */
+ case function_string_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_date*/
+ break;
+
+/****
+ *STRING_TO_DWORD
+ */
+ case function_string_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dword*/
+ break;
+
+/****
+ *STRING_TO_DT
+ */
+ case function_string_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ break;
+
+/****
+ *STRING_TO_TOD
+ */
+ case function_string_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_tod*/
+ break;
+
+/****
+ *STRING_TO_UDINT
+ */
+ case function_string_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_udint*/
+ break;
+
+/****
+ *STRING_TO_WORD
+ */
+ case function_string_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_word*/
+ break;
+
+/****
+ *STRING_TO_LWORD
+ */
+ case function_string_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ break;
+
+/****
+ *STRING_TO_UINT
+ */
+ case function_string_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_uint*/
+ break;
+
+/****
+ *STRING_TO_LREAL
+ */
+ case function_string_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ break;
+
+/****
+ *STRING_TO_BYTE
+ */
+ case function_string_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_byte*/
+ break;
+
+/****
+ *STRING_TO_USINT
+ */
+ case function_string_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_usint*/
+ break;
+
+/****
+ *STRING_TO_ULINT
+ */
+ case function_string_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ break;
+
+/****
+ *STRING_TO_BOOL
+ */
+ case function_string_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ break;
+
+/****
+ *STRING_TO_TIME
+ */
+ case function_string_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ break;
+
+/****
+ *STRING_TO_INT
+ */
+ case function_string_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_int*/
+ break;
+
+/****
+ *LWORD_TO_REAL
+ */
+ case function_lword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_real*/
+ break;
+
+/****
+ *LWORD_TO_SINT
+ */
+ case function_lword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_sint*/
+ break;
+
+/****
+ *LWORD_TO_LINT
+ */
+ case function_lword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lint*/
+ break;
+
+/****
+ *LWORD_TO_DINT
+ */
+ case function_lword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dint*/
+ break;
+
+/****
+ *LWORD_TO_DATE
+ */
+ case function_lword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_date*/
+ break;
+
+/****
+ *LWORD_TO_DWORD
+ */
+ case function_lword_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dword*/
+ break;
+
+/****
+ *LWORD_TO_DT
+ */
+ case function_lword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ break;
+
+/****
+ *LWORD_TO_TOD
+ */
+ case function_lword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_tod*/
+ break;
+
+/****
+ *LWORD_TO_UDINT
+ */
+ case function_lword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_udint*/
+ break;
+
+/****
+ *LWORD_TO_WORD
+ */
+ case function_lword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_word*/
+ break;
+
+/****
+ *LWORD_TO_STRING
+ */
+ case function_lword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ break;
+
+/****
+ *LWORD_TO_UINT
+ */
+ case function_lword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_uint*/
+ break;
+
+/****
+ *LWORD_TO_LREAL
+ */
+ case function_lword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ break;
+
+/****
+ *LWORD_TO_BYTE
+ */
+ case function_lword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_byte*/
+ break;
+
+/****
+ *LWORD_TO_USINT
+ */
+ case function_lword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_usint*/
+ break;
+
+/****
+ *LWORD_TO_ULINT
+ */
+ case function_lword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ break;
+
+/****
+ *LWORD_TO_BOOL
+ */
+ case function_lword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ break;
+
+/****
+ *LWORD_TO_TIME
+ */
+ case function_lword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ break;
+
+/****
+ *LWORD_TO_INT
+ */
+ case function_lword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_int*/
+ break;
+
+/****
+ *UINT_TO_REAL
+ */
+ case function_uint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_real*/
+ break;
+
+/****
+ *UINT_TO_SINT
+ */
+ case function_uint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_sint*/
+ break;
+
+/****
+ *UINT_TO_LINT
+ */
+ case function_uint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lint*/
+ break;
+
+/****
+ *UINT_TO_DINT
+ */
+ case function_uint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dint*/
+ break;
+
+/****
+ *UINT_TO_DATE
+ */
+ case function_uint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_date*/
+ break;
+
+/****
+ *UINT_TO_DWORD
+ */
+ case function_uint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dword*/
+ break;
+
+/****
+ *UINT_TO_DT
+ */
+ case function_uint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ break;
+
+/****
+ *UINT_TO_TOD
+ */
+ case function_uint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_tod*/
+ break;
+
+/****
+ *UINT_TO_UDINT
+ */
+ case function_uint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_udint*/
+ break;
+
+/****
+ *UINT_TO_WORD
+ */
+ case function_uint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_word*/
+ break;
+
+/****
+ *UINT_TO_STRING
+ */
+ case function_uint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ break;
+
+/****
+ *UINT_TO_LWORD
+ */
+ case function_uint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ break;
+
+/****
+ *UINT_TO_LREAL
+ */
+ case function_uint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ break;
+
+/****
+ *UINT_TO_BYTE
+ */
+ case function_uint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_byte*/
+ break;
+
+/****
+ *UINT_TO_USINT
+ */
+ case function_uint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_usint*/
+ break;
+
+/****
+ *UINT_TO_ULINT
+ */
+ case function_uint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ break;
+
+/****
+ *UINT_TO_BOOL
+ */
+ case function_uint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ break;
+
+/****
+ *UINT_TO_TIME
+ */
+ case function_uint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ break;
+
+/****
+ *UINT_TO_INT
+ */
+ case function_uint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_int*/
+ break;
+
+/****
+ *LREAL_TO_REAL
+ */
+ case function_lreal_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_real*/
+ break;
+
+/****
+ *LREAL_TO_SINT
+ */
+ case function_lreal_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_sint*/
+ break;
+
+/****
+ *LREAL_TO_LINT
+ */
+ case function_lreal_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lint*/
+ break;
+
+/****
+ *LREAL_TO_DINT
+ */
+ case function_lreal_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dint*/
+ break;
+
+/****
+ *LREAL_TO_DATE
+ */
+ case function_lreal_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_date*/
+ break;
+
+/****
+ *LREAL_TO_DWORD
+ */
+ case function_lreal_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dword*/
+ break;
+
+/****
+ *LREAL_TO_DT
+ */
+ case function_lreal_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ break;
+
+/****
+ *LREAL_TO_TOD
+ */
+ case function_lreal_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_tod*/
+ break;
+
+/****
+ *LREAL_TO_UDINT
+ */
+ case function_lreal_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_udint*/
+ break;
+
+/****
+ *LREAL_TO_WORD
+ */
+ case function_lreal_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_word*/
+ break;
+
+/****
+ *LREAL_TO_STRING
+ */
+ case function_lreal_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ break;
+
+/****
+ *LREAL_TO_LWORD
+ */
+ case function_lreal_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ break;
+
+/****
+ *LREAL_TO_UINT
+ */
+ case function_lreal_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_uint*/
+ break;
+
+/****
+ *LREAL_TO_BYTE
+ */
+ case function_lreal_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_byte*/
+ break;
+
+/****
+ *LREAL_TO_USINT
+ */
+ case function_lreal_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_usint*/
+ break;
+
+/****
+ *LREAL_TO_ULINT
+ */
+ case function_lreal_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ break;
+
+/****
+ *LREAL_TO_BOOL
+ */
+ case function_lreal_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ break;
+
+/****
+ *LREAL_TO_TIME
+ */
+ case function_lreal_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ break;
+
+/****
+ *LREAL_TO_INT
+ */
+ case function_lreal_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_int*/
+ break;
+
+/****
+ *BYTE_TO_REAL
+ */
+ case function_byte_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_real*/
+ break;
+
+/****
+ *BYTE_TO_SINT
+ */
+ case function_byte_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_sint*/
+ break;
+
+/****
+ *BYTE_TO_LINT
+ */
+ case function_byte_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lint*/
+ break;
+
+/****
+ *BYTE_TO_DINT
+ */
+ case function_byte_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dint*/
+ break;
+
+/****
+ *BYTE_TO_DATE
+ */
+ case function_byte_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_date*/
+ break;
+
+/****
+ *BYTE_TO_DWORD
+ */
+ case function_byte_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dword*/
+ break;
+
+/****
+ *BYTE_TO_DT
+ */
+ case function_byte_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ break;
+
+/****
+ *BYTE_TO_TOD
+ */
+ case function_byte_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_tod*/
+ break;
+
+/****
+ *BYTE_TO_UDINT
+ */
+ case function_byte_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_udint*/
+ break;
+
+/****
+ *BYTE_TO_WORD
+ */
+ case function_byte_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_word*/
+ break;
+
+/****
+ *BYTE_TO_STRING
+ */
+ case function_byte_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ break;
+
+/****
+ *BYTE_TO_LWORD
+ */
+ case function_byte_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ break;
+
+/****
+ *BYTE_TO_UINT
+ */
+ case function_byte_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_uint*/
+ break;
+
+/****
+ *BYTE_TO_LREAL
+ */
+ case function_byte_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ break;
+
+/****
+ *BYTE_TO_USINT
+ */
+ case function_byte_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_usint*/
+ break;
+
+/****
+ *BYTE_TO_ULINT
+ */
+ case function_byte_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ break;
+
+/****
+ *BYTE_TO_BOOL
+ */
+ case function_byte_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_bool*/
+ break;
+
+/****
+ *BYTE_TO_TIME
+ */
+ case function_byte_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ break;
+
+/****
+ *BYTE_TO_INT
+ */
+ case function_byte_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_int*/
+ break;
+
+/****
+ *USINT_TO_REAL
+ */
+ case function_usint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_real*/
+ break;
+
+/****
+ *USINT_TO_SINT
+ */
+ case function_usint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_sint*/
+ break;
+
+/****
+ *USINT_TO_LINT
+ */
+ case function_usint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lint*/
+ break;
+
+/****
+ *USINT_TO_DINT
+ */
+ case function_usint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dint*/
+ break;
+
+/****
+ *USINT_TO_DATE
+ */
+ case function_usint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_date*/
+ break;
+
+/****
+ *USINT_TO_DWORD
+ */
+ case function_usint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dword*/
+ break;
+
+/****
+ *USINT_TO_DT
+ */
+ case function_usint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ break;
+
+/****
+ *USINT_TO_TOD
+ */
+ case function_usint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_tod*/
+ break;
+
+/****
+ *USINT_TO_UDINT
+ */
+ case function_usint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_udint*/
+ break;
+
+/****
+ *USINT_TO_WORD
+ */
+ case function_usint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_word*/
+ break;
+
+/****
+ *USINT_TO_STRING
+ */
+ case function_usint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ break;
+
+/****
+ *USINT_TO_LWORD
+ */
+ case function_usint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ break;
+
+/****
+ *USINT_TO_UINT
+ */
+ case function_usint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_uint*/
+ break;
+
+/****
+ *USINT_TO_LREAL
+ */
+ case function_usint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ break;
+
+/****
+ *USINT_TO_BYTE
+ */
+ case function_usint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_byte*/
+ break;
+
+/****
+ *USINT_TO_ULINT
+ */
+ case function_usint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ break;
+
+/****
+ *USINT_TO_BOOL
+ */
+ case function_usint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ break;
+
+/****
+ *USINT_TO_TIME
+ */
+ case function_usint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ break;
+
+/****
+ *USINT_TO_INT
+ */
+ case function_usint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_int*/
+ break;
+
+/****
+ *ULINT_TO_REAL
+ */
+ case function_ulint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_real*/
+ break;
+
+/****
+ *ULINT_TO_SINT
+ */
+ case function_ulint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_sint*/
+ break;
+
+/****
+ *ULINT_TO_LINT
+ */
+ case function_ulint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lint*/
+ break;
+
+/****
+ *ULINT_TO_DINT
+ */
+ case function_ulint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dint*/
+ break;
+
+/****
+ *ULINT_TO_DATE
+ */
+ case function_ulint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_date*/
+ break;
+
+/****
+ *ULINT_TO_DWORD
+ */
+ case function_ulint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dword*/
+ break;
+
+/****
+ *ULINT_TO_DT
+ */
+ case function_ulint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ break;
+
+/****
+ *ULINT_TO_TOD
+ */
+ case function_ulint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_tod*/
+ break;
+
+/****
+ *ULINT_TO_UDINT
+ */
+ case function_ulint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_udint*/
+ break;
+
+/****
+ *ULINT_TO_WORD
+ */
+ case function_ulint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_word*/
+ break;
+
+/****
+ *ULINT_TO_STRING
+ */
+ case function_ulint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ break;
+
+/****
+ *ULINT_TO_LWORD
+ */
+ case function_ulint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ break;
+
+/****
+ *ULINT_TO_UINT
+ */
+ case function_ulint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_uint*/
+ break;
+
+/****
+ *ULINT_TO_LREAL
+ */
+ case function_ulint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ break;
+
+/****
+ *ULINT_TO_BYTE
+ */
+ case function_ulint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_byte*/
+ break;
+
+/****
+ *ULINT_TO_USINT
+ */
+ case function_ulint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_usint*/
+ break;
+
+/****
+ *ULINT_TO_BOOL
+ */
+ case function_ulint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ break;
+
+/****
+ *ULINT_TO_TIME
+ */
+ case function_ulint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ break;
+
+/****
+ *ULINT_TO_INT
+ */
+ case function_ulint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_int*/
+ break;
+
+/****
+ *BOOL_TO_REAL
+ */
+ case function_bool_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_real*/
+ break;
+
+/****
*BOOL_TO_SINT
*/
case function_bool_to_sint :
@@ -62,6 +10369,7 @@
}
+
ERROR;
}
@@ -69,6 +10377,534 @@
break;
/****
+ *BOOL_TO_LINT
+ */
+ case function_bool_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lint*/
+ break;
+
+/****
+ *BOOL_TO_DINT
+ */
+ case function_bool_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dint*/
+ break;
+
+/****
+ *BOOL_TO_DATE
+ */
+ case function_bool_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_date*/
+ break;
+
+/****
+ *BOOL_TO_DWORD
+ */
+ case function_bool_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dword*/
+ break;
+
+/****
+ *BOOL_TO_DT
+ */
+ case function_bool_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ break;
+
+/****
+ *BOOL_TO_TOD
+ */
+ case function_bool_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_tod*/
+ break;
+
+/****
+ *BOOL_TO_UDINT
+ */
+ case function_bool_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_udint*/
+ break;
+
+/****
+ *BOOL_TO_WORD
+ */
+ case function_bool_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_word*/
+ break;
+
+/****
+ *BOOL_TO_STRING
+ */
+ case function_bool_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ break;
+
+/****
+ *BOOL_TO_LWORD
+ */
+ case function_bool_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ break;
+
+/****
+ *BOOL_TO_UINT
+ */
+ case function_bool_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_uint*/
+ break;
+
+/****
+ *BOOL_TO_LREAL
+ */
+ case function_bool_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_BYTE
+ */
+ case function_bool_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_byte*/
+ break;
+
+/****
+ *BOOL_TO_USINT
+ */
+ case function_bool_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_usint*/
+ break;
+
+/****
+ *BOOL_TO_ULINT
+ */
+ case function_bool_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_ulint*/
+ break;
+
+/****
+ *BOOL_TO_TIME
+ */
+ case function_bool_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ break;
+
+/****
*BOOL_TO_INT
*/
case function_bool_to_int :
@@ -94,6 +10930,7 @@
}
+
ERROR;
}
@@ -101,24 +10938,123 @@
break;
/****
- *BOOL_TO_DINT
- */
- case function_bool_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ *TIME_TO_REAL
+ */
+ case function_time_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_real*/
+ break;
+
+/****
+ *TIME_TO_SINT
+ */
+ case function_time_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_sint*/
+ break;
+
+/****
+ *TIME_TO_LINT
+ */
+ case function_time_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lint*/
+ break;
+
+/****
+ *TIME_TO_DINT
+ */
+ case function_time_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -126,31 +11062,461 @@
}
- ERROR;
- }
-
- }/*function_bool_to_dint*/
- break;
-
-/****
- *BOOL_TO_LINT
- */
- case function_bool_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+
+ ERROR;
+ }
+
+ }/*function_time_to_dint*/
+ break;
+
+/****
+ *TIME_TO_DWORD
+ */
+ case function_time_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dword*/
+ break;
+
+/****
+ *TIME_TO_UDINT
+ */
+ case function_time_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_udint*/
+ break;
+
+/****
+ *TIME_TO_WORD
+ */
+ case function_time_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_word*/
+ break;
+
+/****
+ *TIME_TO_STRING
+ */
+ case function_time_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ break;
+
+/****
+ *TIME_TO_LWORD
+ */
+ case function_time_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ break;
+
+/****
+ *TIME_TO_UINT
+ */
+ case function_time_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_uint*/
+ break;
+
+/****
+ *TIME_TO_LREAL
+ */
+ case function_time_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ break;
+
+/****
+ *TIME_TO_BYTE
+ */
+ case function_time_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_byte*/
+ break;
+
+/****
+ *TIME_TO_USINT
+ */
+ case function_time_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_usint*/
+ break;
+
+/****
+ *TIME_TO_ULINT
+ */
+ case function_time_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_INT
+ */
+ case function_time_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_int*/
+ break;
+
+/****
+ *INT_TO_REAL
+ */
+ case function_int_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_real*/
+ break;
+
+/****
+ *INT_TO_SINT
+ */
+ case function_int_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_sint*/
+ break;
+
+/****
+ *INT_TO_LINT
+ */
+ case function_int_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -158,31 +11524,428 @@
}
- ERROR;
- }
-
- }/*function_bool_to_lint*/
- break;
-
-/****
- *BOOL_TO_USINT
- */
- case function_bool_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+
+ ERROR;
+ }
+
+ }/*function_int_to_lint*/
+ break;
+
+/****
+ *INT_TO_DINT
+ */
+ case function_int_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dint*/
+ break;
+
+/****
+ *INT_TO_DATE
+ */
+ case function_int_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_date*/
+ break;
+
+/****
+ *INT_TO_DWORD
+ */
+ case function_int_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dword*/
+ break;
+
+/****
+ *INT_TO_DT
+ */
+ case function_int_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ break;
+
+/****
+ *INT_TO_TOD
+ */
+ case function_int_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_tod*/
+ break;
+
+/****
+ *INT_TO_UDINT
+ */
+ case function_int_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_udint*/
+ break;
+
+/****
+ *INT_TO_WORD
+ */
+ case function_int_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_word*/
+ break;
+
+/****
+ *INT_TO_STRING
+ */
+ case function_int_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ break;
+
+/****
+ *INT_TO_LWORD
+ */
+ case function_int_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ break;
+
+/****
+ *INT_TO_UINT
+ */
+ case function_int_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_uint*/
+ break;
+
+/****
+ *INT_TO_LREAL
+ */
+ case function_int_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ break;
+
+/****
+ *INT_TO_BYTE
+ */
+ case function_int_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_byte*/
+ break;
+
+/****
+ *INT_TO_USINT
+ */
+ case function_int_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -190,31 +11953,197 @@
}
- ERROR;
- }
-
- }/*function_bool_to_usint*/
- break;
-
-/****
- *BOOL_TO_UINT
- */
- case function_bool_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+
+ ERROR;
+ }
+
+ }/*function_int_to_usint*/
+ break;
+
+/****
+ *INT_TO_ULINT
+ */
+ case function_int_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ break;
+
+/****
+ *INT_TO_BOOL
+ */
+ case function_int_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ break;
+
+/****
+ *INT_TO_TIME
+ */
+ case function_int_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ break;
+
+/****
+ *TRUNC
+ */
+ case function_trunc :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_trunc*/
+ break;
+
+/****
+ *BCD_TO_UDINT
+ */
+ case function_bcd_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_udint*/
+ break;
+
+/****
+ *BCD_TO_UINT
+ */
+ case function_bcd_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -222,63 +12151,32 @@
}
- ERROR;
- }
-
- }/*function_bool_to_uint*/
- break;
-
-/****
- *BOOL_TO_UDINT
- */
- case function_bool_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_udint*/
- break;
-
-/****
- *BOOL_TO_ULINT
- */
- case function_bool_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_uint*/
+ break;
+
+/****
+ *BCD_TO_ULINT
+ */
+ case function_bcd_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -286,127 +12184,230 @@
}
- ERROR;
- }
-
- }/*function_bool_to_ulint*/
- break;
-
-/****
- *BOOL_TO_REAL
- */
- case function_bool_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_real*/
- break;
-
-/****
- *BOOL_TO_LREAL
- */
- case function_bool_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_TIME
- */
- case function_bool_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- break;
-
-/****
- *BOOL_TO_DATE
- */
- case function_bool_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_ulint*/
+ break;
+
+/****
+ *BCD_TO_USINT
+ */
+ case function_bcd_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_BCD
+ */
+ case function_udint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bcd*/
+ break;
+
+/****
+ *UINT_TO_BCD
+ */
+ case function_uint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bcd*/
+ break;
+
+/****
+ *USINT_TO_BCD
+ */
+ case function_usint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bcd*/
+ break;
+
+/****
+ *ULINT_TO_BCD
+ */
+ case function_ulint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bcd*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_TIME_OF_DAY
+ */
+ case function_date_and_time_to_time_of_day :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_time_of_day*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_DATE
+ */
+ case function_date_and_time_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -414,11280 +12415,50 @@
}
- ERROR;
- }
-
- }/*function_bool_to_date*/
- break;
-
-/****
- *BOOL_TO_TOD
- */
- case function_bool_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_tod*/
- break;
-
-/****
- *BOOL_TO_DT
- */
- case function_bool_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- break;
-
-/****
- *BOOL_TO_STRING
- */
- case function_bool_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_BYTE
- */
- case function_bool_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_byte*/
- break;
-
-/****
- *BOOL_TO_WORD
- */
- case function_bool_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_word*/
- break;
-
-/****
- *BOOL_TO_DWORD
- */
- case function_bool_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dword*/
- break;
-
-/****
- *BOOL_TO_LWORD
- */
- case function_bool_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- break;
-
-/****
- *SINT_TO_BOOL
- */
- case function_sint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bool*/
- break;
-
-/****
- *SINT_TO_INT
- */
- case function_sint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_int*/
- break;
-
-/****
- *SINT_TO_DINT
- */
- case function_sint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dint*/
- break;
-
-/****
- *SINT_TO_LINT
- */
- case function_sint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lint*/
- break;
-
-/****
- *SINT_TO_USINT
- */
- case function_sint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_usint*/
- break;
-
-/****
- *SINT_TO_UINT
- */
- case function_sint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_uint*/
- break;
-
-/****
- *SINT_TO_UDINT
- */
- case function_sint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_udint*/
- break;
-
-/****
- *SINT_TO_ULINT
- */
- case function_sint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_ulint*/
- break;
-
-/****
- *SINT_TO_REAL
- */
- case function_sint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_real*/
- break;
-
-/****
- *SINT_TO_LREAL
- */
- case function_sint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lreal*/
- break;
-
-/****
- *SINT_TO_TIME
- */
- case function_sint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- break;
-
-/****
- *SINT_TO_DATE
- */
- case function_sint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_date*/
- break;
-
-/****
- *SINT_TO_TOD
- */
- case function_sint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_tod*/
- break;
-
-/****
- *SINT_TO_DT
- */
- case function_sint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- break;
-
-/****
- *SINT_TO_STRING
- */
- case function_sint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_BYTE
- */
- case function_sint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_byte*/
- break;
-
-/****
- *SINT_TO_WORD
- */
- case function_sint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_word*/
- break;
-
-/****
- *SINT_TO_DWORD
- */
- case function_sint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dword*/
- break;
-
-/****
- *SINT_TO_LWORD
- */
- case function_sint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lword*/
- break;
-
-/****
- *INT_TO_BOOL
- */
- case function_int_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bool*/
- break;
-
-/****
- *INT_TO_SINT
- */
- case function_int_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_sint*/
- break;
-
-/****
- *INT_TO_DINT
- */
- case function_int_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dint*/
- break;
-
-/****
- *INT_TO_LINT
- */
- case function_int_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lint*/
- break;
-
-/****
- *INT_TO_USINT
- */
- case function_int_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_usint*/
- break;
-
-/****
- *INT_TO_UINT
- */
- case function_int_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_uint*/
- break;
-
-/****
- *INT_TO_UDINT
- */
- case function_int_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_udint*/
- break;
-
-/****
- *INT_TO_ULINT
- */
- case function_int_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_ulint*/
- break;
-
-/****
- *INT_TO_REAL
- */
- case function_int_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_real*/
- break;
-
-/****
- *INT_TO_LREAL
- */
- case function_int_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lreal*/
- break;
-
-/****
- *INT_TO_TIME
- */
- case function_int_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- break;
-
-/****
- *INT_TO_DATE
- */
- case function_int_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_date*/
- break;
-
-/****
- *INT_TO_TOD
- */
- case function_int_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_tod*/
- break;
-
-/****
- *INT_TO_DT
- */
- case function_int_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- break;
-
-/****
- *INT_TO_STRING
- */
- case function_int_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_BYTE
- */
- case function_int_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_byte*/
- break;
-
-/****
- *INT_TO_WORD
- */
- case function_int_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_word*/
- break;
-
-/****
- *INT_TO_DWORD
- */
- case function_int_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dword*/
- break;
-
-/****
- *INT_TO_LWORD
- */
- case function_int_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lword*/
- break;
-
-/****
- *DINT_TO_BOOL
- */
- case function_dint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- break;
-
-/****
- *DINT_TO_SINT
- */
- case function_dint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_sint*/
- break;
-
-/****
- *DINT_TO_INT
- */
- case function_dint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_int*/
- break;
-
-/****
- *DINT_TO_LINT
- */
- case function_dint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lint*/
- break;
-
-/****
- *DINT_TO_USINT
- */
- case function_dint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_usint*/
- break;
-
-/****
- *DINT_TO_UINT
- */
- case function_dint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_uint*/
- break;
-
-/****
- *DINT_TO_UDINT
- */
- case function_dint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_udint*/
- break;
-
-/****
- *DINT_TO_ULINT
- */
- case function_dint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_ulint*/
- break;
-
-/****
- *DINT_TO_REAL
- */
- case function_dint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_real*/
- break;
-
-/****
- *DINT_TO_LREAL
- */
- case function_dint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- break;
-
-/****
- *DINT_TO_TIME
- */
- case function_dint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- break;
-
-/****
- *DINT_TO_DATE
- */
- case function_dint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_date*/
- break;
-
-/****
- *DINT_TO_TOD
- */
- case function_dint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_tod*/
- break;
-
-/****
- *DINT_TO_DT
- */
- case function_dint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- break;
-
-/****
- *DINT_TO_STRING
- */
- case function_dint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_BYTE
- */
- case function_dint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_byte*/
- break;
-
-/****
- *DINT_TO_WORD
- */
- case function_dint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_word*/
- break;
-
-/****
- *DINT_TO_DWORD
- */
- case function_dint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dword*/
- break;
-
-/****
- *DINT_TO_LWORD
- */
- case function_dint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- break;
-
-/****
- *LINT_TO_BOOL
- */
- case function_lint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- break;
-
-/****
- *LINT_TO_SINT
- */
- case function_lint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_sint*/
- break;
-
-/****
- *LINT_TO_INT
- */
- case function_lint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_int*/
- break;
-
-/****
- *LINT_TO_DINT
- */
- case function_lint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dint*/
- break;
-
-/****
- *LINT_TO_USINT
- */
- case function_lint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_usint*/
- break;
-
-/****
- *LINT_TO_UINT
- */
- case function_lint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_uint*/
- break;
-
-/****
- *LINT_TO_UDINT
- */
- case function_lint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_udint*/
- break;
-
-/****
- *LINT_TO_ULINT
- */
- case function_lint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- break;
-
-/****
- *LINT_TO_REAL
- */
- case function_lint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_real*/
- break;
-
-/****
- *LINT_TO_LREAL
- */
- case function_lint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- break;
-
-/****
- *LINT_TO_TIME
- */
- case function_lint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- break;
-
-/****
- *LINT_TO_DATE
- */
- case function_lint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_date*/
- break;
-
-/****
- *LINT_TO_TOD
- */
- case function_lint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_tod*/
- break;
-
-/****
- *LINT_TO_DT
- */
- case function_lint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- break;
-
-/****
- *LINT_TO_STRING
- */
- case function_lint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_BYTE
- */
- case function_lint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_byte*/
- break;
-
-/****
- *LINT_TO_WORD
- */
- case function_lint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_word*/
- break;
-
-/****
- *LINT_TO_DWORD
- */
- case function_lint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dword*/
- break;
-
-/****
- *LINT_TO_LWORD
- */
- case function_lint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- break;
-
-/****
- *USINT_TO_BOOL
- */
- case function_usint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- break;
-
-/****
- *USINT_TO_SINT
- */
- case function_usint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_sint*/
- break;
-
-/****
- *USINT_TO_INT
- */
- case function_usint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_int*/
- break;
-
-/****
- *USINT_TO_DINT
- */
- case function_usint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dint*/
- break;
-
-/****
- *USINT_TO_LINT
- */
- case function_usint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lint*/
- break;
-
-/****
- *USINT_TO_UINT
- */
- case function_usint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_uint*/
- break;
-
-/****
- *USINT_TO_UDINT
- */
- case function_usint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_udint*/
- break;
-
-/****
- *USINT_TO_ULINT
- */
- case function_usint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- break;
-
-/****
- *USINT_TO_REAL
- */
- case function_usint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_real*/
- break;
-
-/****
- *USINT_TO_LREAL
- */
- case function_usint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- break;
-
-/****
- *USINT_TO_TIME
- */
- case function_usint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- break;
-
-/****
- *USINT_TO_DATE
- */
- case function_usint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_date*/
- break;
-
-/****
- *USINT_TO_TOD
- */
- case function_usint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_tod*/
- break;
-
-/****
- *USINT_TO_DT
- */
- case function_usint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- break;
-
-/****
- *USINT_TO_STRING
- */
- case function_usint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_BYTE
- */
- case function_usint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_byte*/
- break;
-
-/****
- *USINT_TO_WORD
- */
- case function_usint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_word*/
- break;
-
-/****
- *USINT_TO_DWORD
- */
- case function_usint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dword*/
- break;
-
-/****
- *USINT_TO_LWORD
- */
- case function_usint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- break;
-
-/****
- *UINT_TO_BOOL
- */
- case function_uint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- break;
-
-/****
- *UINT_TO_SINT
- */
- case function_uint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_sint*/
- break;
-
-/****
- *UINT_TO_INT
- */
- case function_uint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_int*/
- break;
-
-/****
- *UINT_TO_DINT
- */
- case function_uint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dint*/
- break;
-
-/****
- *UINT_TO_LINT
- */
- case function_uint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lint*/
- break;
-
-/****
- *UINT_TO_USINT
- */
- case function_uint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_usint*/
- break;
-
-/****
- *UINT_TO_UDINT
- */
- case function_uint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_udint*/
- break;
-
-/****
- *UINT_TO_ULINT
- */
- case function_uint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- break;
-
-/****
- *UINT_TO_REAL
- */
- case function_uint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_real*/
- break;
-
-/****
- *UINT_TO_LREAL
- */
- case function_uint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- break;
-
-/****
- *UINT_TO_TIME
- */
- case function_uint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- break;
-
-/****
- *UINT_TO_DATE
- */
- case function_uint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_date*/
- break;
-
-/****
- *UINT_TO_TOD
- */
- case function_uint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_tod*/
- break;
-
-/****
- *UINT_TO_DT
- */
- case function_uint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- break;
-
-/****
- *UINT_TO_STRING
- */
- case function_uint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_BYTE
- */
- case function_uint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_byte*/
- break;
-
-/****
- *UINT_TO_WORD
- */
- case function_uint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_word*/
- break;
-
-/****
- *UINT_TO_DWORD
- */
- case function_uint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dword*/
- break;
-
-/****
- *UINT_TO_LWORD
- */
- case function_uint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- break;
-
-/****
- *UDINT_TO_BOOL
- */
- case function_udint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- break;
-
-/****
- *UDINT_TO_SINT
- */
- case function_udint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_sint*/
- break;
-
-/****
- *UDINT_TO_INT
- */
- case function_udint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_int*/
- break;
-
-/****
- *UDINT_TO_DINT
- */
- case function_udint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dint*/
- break;
-
-/****
- *UDINT_TO_LINT
- */
- case function_udint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lint*/
- break;
-
-/****
- *UDINT_TO_USINT
- */
- case function_udint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_usint*/
- break;
-
-/****
- *UDINT_TO_UINT
- */
- case function_udint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_uint*/
- break;
-
-/****
- *UDINT_TO_ULINT
- */
- case function_udint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- break;
-
-/****
- *UDINT_TO_REAL
- */
- case function_udint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_real*/
- break;
-
-/****
- *UDINT_TO_LREAL
- */
- case function_udint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- break;
-
-/****
- *UDINT_TO_TIME
- */
- case function_udint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- break;
-
-/****
- *UDINT_TO_DATE
- */
- case function_udint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_date*/
- break;
-
-/****
- *UDINT_TO_TOD
- */
- case function_udint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_tod*/
- break;
-
-/****
- *UDINT_TO_DT
- */
- case function_udint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- break;
-
-/****
- *UDINT_TO_STRING
- */
- case function_udint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_BYTE
- */
- case function_udint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_byte*/
- break;
-
-/****
- *UDINT_TO_WORD
- */
- case function_udint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_word*/
- break;
-
-/****
- *UDINT_TO_DWORD
- */
- case function_udint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dword*/
- break;
-
-/****
- *UDINT_TO_LWORD
- */
- case function_udint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- break;
-
-/****
- *ULINT_TO_BOOL
- */
- case function_ulint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- break;
-
-/****
- *ULINT_TO_SINT
- */
- case function_ulint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_sint*/
- break;
-
-/****
- *ULINT_TO_INT
- */
- case function_ulint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_int*/
- break;
-
-/****
- *ULINT_TO_DINT
- */
- case function_ulint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dint*/
- break;
-
-/****
- *ULINT_TO_LINT
- */
- case function_ulint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lint*/
- break;
-
-/****
- *ULINT_TO_USINT
- */
- case function_ulint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_usint*/
- break;
-
-/****
- *ULINT_TO_UINT
- */
- case function_ulint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_uint*/
- break;
-
-/****
- *ULINT_TO_UDINT
- */
- case function_ulint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- break;
-
-/****
- *ULINT_TO_REAL
- */
- case function_ulint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_real*/
- break;
-
-/****
- *ULINT_TO_LREAL
- */
- case function_ulint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- break;
-
-/****
- *ULINT_TO_TIME
- */
- case function_ulint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- break;
-
-/****
- *ULINT_TO_DATE
- */
- case function_ulint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_date*/
- break;
-
-/****
- *ULINT_TO_TOD
- */
- case function_ulint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_tod*/
- break;
-
-/****
- *ULINT_TO_DT
- */
- case function_ulint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- break;
-
-/****
- *ULINT_TO_STRING
- */
- case function_ulint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_BYTE
- */
- case function_ulint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_byte*/
- break;
-
-/****
- *ULINT_TO_WORD
- */
- case function_ulint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_word*/
- break;
-
-/****
- *ULINT_TO_DWORD
- */
- case function_ulint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dword*/
- break;
-
-/****
- *ULINT_TO_LWORD
- */
- case function_ulint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- break;
-
-/****
- *REAL_TO_BOOL
- */
- case function_real_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_bool*/
- break;
-
-/****
- *REAL_TO_SINT
- */
- case function_real_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_sint*/
- break;
-
-/****
- *REAL_TO_INT
- */
- case function_real_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_int*/
- break;
-
-/****
- *REAL_TO_DINT
- */
- case function_real_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dint*/
- break;
-
-/****
- *REAL_TO_LINT
- */
- case function_real_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lint*/
- break;
-
-/****
- *REAL_TO_USINT
- */
- case function_real_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_usint*/
- break;
-
-/****
- *REAL_TO_UINT
- */
- case function_real_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_uint*/
- break;
-
-/****
- *REAL_TO_UDINT
- */
- case function_real_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_udint*/
- break;
-
-/****
- *REAL_TO_ULINT
- */
- case function_real_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_ulint*/
- break;
-
-/****
- *REAL_TO_LREAL
- */
- case function_real_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lreal*/
- break;
-
-/****
- *REAL_TO_TIME
- */
- case function_real_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_time*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_date*/
- break;
-
-/****
- *REAL_TO_TOD
- */
- case function_real_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_tod*/
- break;
-
-/****
- *REAL_TO_DT
- */
- case function_real_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dt*/
- break;
-
-/****
- *REAL_TO_STRING
- */
- case function_real_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_string*/
- break;
-
-/****
- *REAL_TO_BYTE
- */
- case function_real_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_byte*/
- break;
-
-/****
- *REAL_TO_WORD
- */
- case function_real_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_word*/
- break;
-
-/****
- *REAL_TO_DWORD
- */
- case function_real_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dword*/
- break;
-
-/****
- *REAL_TO_LWORD
- */
- case function_real_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lword*/
- break;
-
-/****
- *LREAL_TO_BOOL
- */
- case function_lreal_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_bool*/
- break;
-
-/****
- *LREAL_TO_SINT
- */
- case function_lreal_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_sint*/
- break;
-
-/****
- *LREAL_TO_INT
- */
- case function_lreal_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_int*/
- break;
-
-/****
- *LREAL_TO_DINT
- */
- case function_lreal_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dint*/
- break;
-
-/****
- *LREAL_TO_LINT
- */
- case function_lreal_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lint*/
- break;
-
-/****
- *LREAL_TO_USINT
- */
- case function_lreal_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_usint*/
- break;
-
-/****
- *LREAL_TO_UINT
- */
- case function_lreal_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_uint*/
- break;
-
-/****
- *LREAL_TO_UDINT
- */
- case function_lreal_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_udint*/
- break;
-
-/****
- *LREAL_TO_ULINT
- */
- case function_lreal_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_ulint*/
- break;
-
-/****
- *LREAL_TO_REAL
- */
- case function_lreal_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_real*/
- break;
-
-/****
- *LREAL_TO_TIME
- */
- case function_lreal_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_time*/
- break;
-
-/****
- *LREAL_TO_DATE
- */
- case function_lreal_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_date*/
- break;
-
-/****
- *LREAL_TO_TOD
- */
- case function_lreal_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_tod*/
- break;
-
-/****
- *LREAL_TO_DT
- */
- case function_lreal_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- break;
-
-/****
- *LREAL_TO_STRING
- */
- case function_lreal_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_BYTE
- */
- case function_lreal_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_byte*/
- break;
-
-/****
- *LREAL_TO_WORD
- */
- case function_lreal_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_word*/
- break;
-
-/****
- *LREAL_TO_DWORD
- */
- case function_lreal_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dword*/
- break;
-
-/****
- *LREAL_TO_LWORD
- */
- case function_lreal_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lword*/
- break;
-
-/****
- *TIME_TO_SINT
- */
- case function_time_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_sint*/
- break;
-
-/****
- *TIME_TO_INT
- */
- case function_time_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_int*/
- break;
-
-/****
- *TIME_TO_DINT
- */
- case function_time_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dint*/
- break;
-
-/****
- *TIME_TO_LINT
- */
- case function_time_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lint*/
- break;
-
-/****
- *TIME_TO_USINT
- */
- case function_time_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_usint*/
- break;
-
-/****
- *TIME_TO_UINT
- */
- case function_time_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_uint*/
- break;
-
-/****
- *TIME_TO_UDINT
- */
- case function_time_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_udint*/
- break;
-
-/****
- *TIME_TO_ULINT
- */
- case function_time_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_REAL
- */
- case function_time_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_real*/
- break;
-
-/****
- *TIME_TO_LREAL
- */
- case function_time_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- break;
-
-/****
- *TIME_TO_STRING
- */
- case function_time_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_BYTE
- */
- case function_time_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_byte*/
- break;
-
-/****
- *TIME_TO_WORD
- */
- case function_time_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_word*/
- break;
-
-/****
- *TIME_TO_DWORD
- */
- case function_time_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dword*/
- break;
-
-/****
- *TIME_TO_LWORD
- */
- case function_time_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- break;
-
-/****
- *DATE_TO_SINT
- */
- case function_date_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_sint*/
- break;
-
-/****
- *DATE_TO_INT
- */
- case function_date_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_int*/
- break;
-
-/****
- *DATE_TO_DINT
- */
- case function_date_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dint*/
- break;
-
-/****
- *DATE_TO_LINT
- */
- case function_date_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lint*/
- break;
-
-/****
- *DATE_TO_USINT
- */
- case function_date_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_usint*/
- break;
-
-/****
- *DATE_TO_UINT
- */
- case function_date_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_uint*/
- break;
-
-/****
- *DATE_TO_UDINT
- */
- case function_date_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_udint*/
- break;
-
-/****
- *DATE_TO_ULINT
- */
- case function_date_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_REAL
- */
- case function_date_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_real*/
- break;
-
-/****
- *DATE_TO_LREAL
- */
- case function_date_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- break;
-
-/****
- *DATE_TO_STRING
- */
- case function_date_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_BYTE
- */
- case function_date_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_byte*/
- break;
-
-/****
- *DATE_TO_WORD
- */
- case function_date_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_word*/
- break;
-
-/****
- *DATE_TO_DWORD
- */
- case function_date_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dword*/
- break;
-
-/****
- *DATE_TO_LWORD
- */
- case function_date_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- break;
-
-/****
- *TOD_TO_SINT
- */
- case function_tod_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_sint*/
- break;
-
-/****
- *TOD_TO_INT
- */
- case function_tod_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_int*/
- break;
-
-/****
- *TOD_TO_DINT
- */
- case function_tod_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dint*/
- break;
-
-/****
- *TOD_TO_LINT
- */
- case function_tod_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lint*/
- break;
-
-/****
- *TOD_TO_USINT
- */
- case function_tod_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_usint*/
- break;
-
-/****
- *TOD_TO_UINT
- */
- case function_tod_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_uint*/
- break;
-
-/****
- *TOD_TO_UDINT
- */
- case function_tod_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_udint*/
- break;
-
-/****
- *TOD_TO_ULINT
- */
- case function_tod_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_REAL
- */
- case function_tod_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_real*/
- break;
-
-/****
- *TOD_TO_LREAL
- */
- case function_tod_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- break;
-
-/****
- *TOD_TO_STRING
- */
- case function_tod_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_BYTE
- */
- case function_tod_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_byte*/
- break;
-
-/****
- *TOD_TO_WORD
- */
- case function_tod_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_word*/
- break;
-
-/****
- *TOD_TO_DWORD
- */
- case function_tod_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dword*/
- break;
-
-/****
- *TOD_TO_LWORD
- */
- case function_tod_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- break;
-
-/****
- *DT_TO_SINT
- */
- case function_dt_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_sint*/
- break;
-
-/****
- *DT_TO_INT
- */
- case function_dt_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_int*/
- break;
-
-/****
- *DT_TO_DINT
- */
- case function_dt_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dint*/
- break;
-
-/****
- *DT_TO_LINT
- */
- case function_dt_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lint*/
- break;
-
-/****
- *DT_TO_USINT
- */
- case function_dt_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_usint*/
- break;
-
-/****
- *DT_TO_UINT
- */
- case function_dt_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_uint*/
- break;
-
-/****
- *DT_TO_UDINT
- */
- case function_dt_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_udint*/
- break;
-
-/****
- *DT_TO_ULINT
- */
- case function_dt_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_REAL
- */
- case function_dt_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_real*/
- break;
-
-/****
- *DT_TO_LREAL
- */
- case function_dt_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- break;
-
-/****
- *DT_TO_STRING
- */
- case function_dt_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_BYTE
- */
- case function_dt_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_byte*/
- break;
-
-/****
- *DT_TO_WORD
- */
- case function_dt_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_word*/
- break;
-
-/****
- *DT_TO_DWORD
- */
- case function_dt_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dword*/
- break;
-
-/****
- *DT_TO_LWORD
- */
- case function_dt_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- break;
-
-/****
- *STRING_TO_BOOL
- */
- case function_string_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- break;
-
-/****
- *STRING_TO_SINT
- */
- case function_string_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_sint*/
- break;
-
-/****
- *STRING_TO_INT
- */
- case function_string_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_int*/
- break;
-
-/****
- *STRING_TO_DINT
- */
- case function_string_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dint*/
- break;
-
-/****
- *STRING_TO_LINT
- */
- case function_string_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lint*/
- break;
-
-/****
- *STRING_TO_USINT
- */
- case function_string_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_usint*/
- break;
-
-/****
- *STRING_TO_UINT
- */
- case function_string_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_uint*/
- break;
-
-/****
- *STRING_TO_UDINT
- */
- case function_string_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_udint*/
- break;
-
-/****
- *STRING_TO_ULINT
- */
- case function_string_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- break;
-
-/****
- *STRING_TO_REAL
- */
- case function_string_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_real*/
- break;
-
-/****
- *STRING_TO_LREAL
- */
- case function_string_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- break;
-
-/****
- *STRING_TO_TIME
- */
- case function_string_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- break;
-
-/****
- *STRING_TO_DATE
- */
- case function_string_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_date*/
- break;
-
-/****
- *STRING_TO_TOD
- */
- case function_string_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_tod*/
- break;
-
-/****
- *STRING_TO_DT
- */
- case function_string_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *STRING_TO_BYTE
- */
- case function_string_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_byte*/
- break;
-
-/****
- *STRING_TO_WORD
- */
- case function_string_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_word*/
- break;
-
-/****
- *STRING_TO_DWORD
- */
- case function_string_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dword*/
- break;
-
-/****
- *STRING_TO_LWORD
- */
- case function_string_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- break;
-
-/****
- *BYTE_TO_BOOL
- */
- case function_byte_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- break;
-
-/****
- *BYTE_TO_SINT
- */
- case function_byte_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_sint*/
- break;
-
-/****
- *BYTE_TO_INT
- */
- case function_byte_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_int*/
- break;
-
-/****
- *BYTE_TO_DINT
- */
- case function_byte_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dint*/
- break;
-
-/****
- *BYTE_TO_LINT
- */
- case function_byte_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lint*/
- break;
-
-/****
- *BYTE_TO_USINT
- */
- case function_byte_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_usint*/
- break;
-
-/****
- *BYTE_TO_UINT
- */
- case function_byte_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_uint*/
- break;
-
-/****
- *BYTE_TO_UDINT
- */
- case function_byte_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_udint*/
- break;
-
-/****
- *BYTE_TO_ULINT
- */
- case function_byte_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- break;
-
-/****
- *BYTE_TO_REAL
- */
- case function_byte_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_real*/
- break;
-
-/****
- *BYTE_TO_LREAL
- */
- case function_byte_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- break;
-
-/****
- *BYTE_TO_TIME
- */
- case function_byte_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- break;
-
-/****
- *BYTE_TO_DATE
- */
- case function_byte_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_date*/
- break;
-
-/****
- *BYTE_TO_TOD
- */
- case function_byte_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_tod*/
- break;
-
-/****
- *BYTE_TO_DT
- */
- case function_byte_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- break;
-
-/****
- *BYTE_TO_STRING
- */
- case function_byte_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WORD
- */
- case function_byte_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_word*/
- break;
-
-/****
- *BYTE_TO_DWORD
- */
- case function_byte_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dword*/
- break;
-
-/****
- *BYTE_TO_LWORD
- */
- case function_byte_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- break;
-
-/****
- *WORD_TO_BOOL
- */
- case function_word_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- break;
-
-/****
- *WORD_TO_SINT
- */
- case function_word_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_sint*/
- break;
-
-/****
- *WORD_TO_INT
- */
- case function_word_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_int*/
- break;
-
-/****
- *WORD_TO_DINT
- */
- case function_word_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dint*/
- break;
-
-/****
- *WORD_TO_LINT
- */
- case function_word_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lint*/
- break;
-
-/****
- *WORD_TO_USINT
- */
- case function_word_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_usint*/
- break;
-
-/****
- *WORD_TO_UINT
- */
- case function_word_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_uint*/
- break;
-
-/****
- *WORD_TO_UDINT
- */
- case function_word_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_udint*/
- break;
-
-/****
- *WORD_TO_ULINT
- */
- case function_word_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- break;
-
-/****
- *WORD_TO_REAL
- */
- case function_word_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_real*/
- break;
-
-/****
- *WORD_TO_LREAL
- */
- case function_word_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- break;
-
-/****
- *WORD_TO_TIME
- */
- case function_word_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- break;
-
-/****
- *WORD_TO_DATE
- */
- case function_word_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_date*/
- break;
-
-/****
- *WORD_TO_TOD
- */
- case function_word_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_tod*/
- break;
-
-/****
- *WORD_TO_DT
- */
- case function_word_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- break;
-
-/****
- *WORD_TO_STRING
- */
- case function_word_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_BYTE
- */
- case function_word_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_byte*/
- break;
-
-/****
- *WORD_TO_DWORD
- */
- case function_word_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dword*/
- break;
-
-/****
- *WORD_TO_LWORD
- */
- case function_word_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- break;
-
-/****
- *DWORD_TO_BOOL
- */
- case function_dword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- break;
-
-/****
- *DWORD_TO_SINT
- */
- case function_dword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_sint*/
- break;
-
-/****
- *DWORD_TO_INT
- */
- case function_dword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_int*/
- break;
-
-/****
- *DWORD_TO_DINT
- */
- case function_dword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dint*/
- break;
-
-/****
- *DWORD_TO_LINT
- */
- case function_dword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lint*/
- break;
-
-/****
- *DWORD_TO_USINT
- */
- case function_dword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_usint*/
- break;
-
-/****
- *DWORD_TO_UINT
- */
- case function_dword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_uint*/
- break;
-
-/****
- *DWORD_TO_UDINT
- */
- case function_dword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_udint*/
- break;
-
-/****
- *DWORD_TO_ULINT
- */
- case function_dword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- break;
-
-/****
- *DWORD_TO_REAL
- */
- case function_dword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_real*/
- break;
-
-/****
- *DWORD_TO_LREAL
- */
- case function_dword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- break;
-
-/****
- *DWORD_TO_TIME
- */
- case function_dword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- break;
-
-/****
- *DWORD_TO_DATE
- */
- case function_dword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_date*/
- break;
-
-/****
- *DWORD_TO_TOD
- */
- case function_dword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_tod*/
- break;
-
-/****
- *DWORD_TO_DT
- */
- case function_dword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- break;
-
-/****
- *DWORD_TO_STRING
- */
- case function_dword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_BYTE
- */
- case function_dword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_byte*/
- break;
-
-/****
- *DWORD_TO_WORD
- */
- case function_dword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_word*/
- break;
-
-/****
- *DWORD_TO_LWORD
- */
- case function_dword_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- break;
-
-/****
- *LWORD_TO_BOOL
- */
- case function_lword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- break;
-
-/****
- *LWORD_TO_SINT
- */
- case function_lword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_sint*/
- break;
-
-/****
- *LWORD_TO_INT
- */
- case function_lword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_int*/
- break;
-
-/****
- *LWORD_TO_DINT
- */
- case function_lword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dint*/
- break;
-
-/****
- *LWORD_TO_LINT
- */
- case function_lword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lint*/
- break;
-
-/****
- *LWORD_TO_USINT
- */
- case function_lword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_usint*/
- break;
-
-/****
- *LWORD_TO_UINT
- */
- case function_lword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_uint*/
- break;
-
-/****
- *LWORD_TO_UDINT
- */
- case function_lword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_udint*/
- break;
-
-/****
- *LWORD_TO_ULINT
- */
- case function_lword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- break;
-
-/****
- *LWORD_TO_REAL
- */
- case function_lword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_real*/
- break;
-
-/****
- *LWORD_TO_LREAL
- */
- case function_lword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- break;
-
-/****
- *LWORD_TO_TIME
- */
- case function_lword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- break;
-
-/****
- *LWORD_TO_DATE
- */
- case function_lword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_date*/
- break;
-
-/****
- *LWORD_TO_TOD
- */
- case function_lword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_tod*/
- break;
-
-/****
- *LWORD_TO_DT
- */
- case function_lword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- break;
-
-/****
- *LWORD_TO_STRING
- */
- case function_lword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_BYTE
- */
- case function_lword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_byte*/
- break;
-
-/****
- *LWORD_TO_WORD
- */
- case function_lword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_word*/
- break;
-
-/****
- *LWORD_TO_DWORD
- */
- case function_lword_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- break;
-
-/****
- *TRUNC
- */
- case function_trunc :
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_date*/
+ break;
+
+/****
+ *ABS
+ */
+ case function_abs :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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 * return_type_symbol = IN_type_symbol;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_abs*/
+ break;
+
+/****
+ *SQRT
+ */
+ case function_sqrt :
{
symbol_c *last_type_symbol = NULL;
@@ -11705,373 +12476,22 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_trunc*/
- break;
-
-/****
- *BCD_TO_USINT
- */
- case function_bcd_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_usint*/
- break;
-
-/****
- *BCD_TO_UINT
- */
- case function_bcd_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_uint*/
- break;
-
-/****
- *BCD_TO_UDINT
- */
- case function_bcd_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_udint*/
- break;
-
-/****
- *BCD_TO_ULINT
- */
- case function_bcd_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_ulint*/
- break;
-
-/****
- *USINT_TO_BCD
- */
- case function_usint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bcd*/
- break;
-
-/****
- *UINT_TO_BCD
- */
- case function_uint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bcd*/
- break;
-
-/****
- *UDINT_TO_BCD
- */
- case function_udint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bcd*/
- break;
-
-/****
- *ULINT_TO_BCD
- */
- case function_ulint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bcd*/
- break;
-
-/****
- *DATE_AND_TIME_TO_TIME_OF_DAY
- */
- case function_date_and_time_to_time_of_day :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_time_of_day*/
- break;
-
-/****
- *DATE_AND_TIME_TO_DATE
- */
- case function_date_and_time_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_date*/
- break;
-
-/****
- *ABS
- */
- case function_abs :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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 * return_type_symbol = IN_type_symbol;
return return_type_symbol;
}
- ERROR;
- }
-
- }/*function_abs*/
- break;
-
-/****
- *SQRT
- */
- case function_sqrt :
+
+ ERROR;
+ }
+
+ }/*function_sqrt*/
+ break;
+
+/****
+ *LN
+ */
+ case function_ln :
{
symbol_c *last_type_symbol = NULL;
@@ -12094,16 +12514,17 @@
}
- ERROR;
- }
-
- }/*function_sqrt*/
- break;
-
-/****
- *LN
- */
- case function_ln :
+
+ ERROR;
+ }
+
+ }/*function_ln*/
+ break;
+
+/****
+ *LOG
+ */
+ case function_log :
{
symbol_c *last_type_symbol = NULL;
@@ -12126,16 +12547,17 @@
}
- ERROR;
- }
-
- }/*function_ln*/
- break;
-
-/****
- *LOG
- */
- case function_log :
+
+ ERROR;
+ }
+
+ }/*function_log*/
+ break;
+
+/****
+ *EXP
+ */
+ case function_exp :
{
symbol_c *last_type_symbol = NULL;
@@ -12158,16 +12580,17 @@
}
- ERROR;
- }
-
- }/*function_log*/
- break;
-
-/****
- *EXP
- */
- case function_exp :
+
+ ERROR;
+ }
+
+ }/*function_exp*/
+ break;
+
+/****
+ *SIN
+ */
+ case function_sin :
{
symbol_c *last_type_symbol = NULL;
@@ -12190,16 +12613,17 @@
}
- ERROR;
- }
-
- }/*function_exp*/
- break;
-
-/****
- *SIN
- */
- case function_sin :
+
+ ERROR;
+ }
+
+ }/*function_sin*/
+ break;
+
+/****
+ *COS
+ */
+ case function_cos :
{
symbol_c *last_type_symbol = NULL;
@@ -12222,16 +12646,17 @@
}
- ERROR;
- }
-
- }/*function_sin*/
- break;
-
-/****
- *COS
- */
- case function_cos :
+
+ ERROR;
+ }
+
+ }/*function_cos*/
+ break;
+
+/****
+ *TAN
+ */
+ case function_tan :
{
symbol_c *last_type_symbol = NULL;
@@ -12254,16 +12679,17 @@
}
- ERROR;
- }
-
- }/*function_cos*/
- break;
-
-/****
- *TAN
- */
- case function_tan :
+
+ ERROR;
+ }
+
+ }/*function_tan*/
+ break;
+
+/****
+ *ASIN
+ */
+ case function_asin :
{
symbol_c *last_type_symbol = NULL;
@@ -12286,16 +12712,17 @@
}
- ERROR;
- }
-
- }/*function_tan*/
- break;
-
-/****
- *ASIN
- */
- case function_asin :
+
+ ERROR;
+ }
+
+ }/*function_asin*/
+ break;
+
+/****
+ *ACOS
+ */
+ case function_acos :
{
symbol_c *last_type_symbol = NULL;
@@ -12318,16 +12745,17 @@
}
- ERROR;
- }
-
- }/*function_asin*/
- break;
-
-/****
- *ACOS
- */
- case function_acos :
+
+ ERROR;
+ }
+
+ }/*function_acos*/
+ break;
+
+/****
+ *ATAN
+ */
+ case function_atan :
{
symbol_c *last_type_symbol = NULL;
@@ -12350,37 +12778,6 @@
}
- ERROR;
- }
-
- }/*function_acos*/
- break;
-
-/****
- *ATAN
- */
- case function_atan :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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 * return_type_symbol = IN_type_symbol;
- return return_type_symbol;
-
- }
ERROR;
}
@@ -12428,6 +12825,7 @@
}
+
ERROR;
}
@@ -12455,6 +12853,7 @@
}
+
ERROR;
}
@@ -12482,6 +12881,7 @@
}
+
ERROR;
}
@@ -12509,11 +12909,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12560,6 +12962,7 @@
}
+
ERROR;
}
@@ -12587,11 +12990,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12638,6 +13043,7 @@
}
+
ERROR;
}
@@ -12665,6 +13071,7 @@
}
+
ERROR;
}
@@ -12700,6 +13107,7 @@
}
+
ERROR;
}
@@ -12735,6 +13143,7 @@
}
+
ERROR;
}
@@ -12762,11 +13171,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12813,6 +13224,7 @@
}
+
ERROR;
}
@@ -12840,11 +13252,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12891,11 +13305,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12942,11 +13358,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -12979,6 +13397,7 @@
}
+
ERROR;
}
@@ -13025,11 +13444,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13076,11 +13497,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13127,11 +13550,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13178,11 +13603,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13229,11 +13656,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13280,11 +13709,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13331,11 +13762,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13368,6 +13801,7 @@
}
+
ERROR;
}
@@ -13428,16 +13862,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13484,11 +13921,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13535,11 +13974,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13600,16 +14041,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13670,16 +14114,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13726,11 +14173,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13777,11 +14226,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13828,11 +14279,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13879,11 +14332,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13930,11 +14385,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -13981,11 +14438,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14018,6 +14477,7 @@
}
+
ERROR;
}
@@ -14064,11 +14524,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14115,11 +14577,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14180,16 +14644,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14236,6 +14703,7 @@
}
+
ERROR;
}
@@ -14263,11 +14731,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14328,16 +14798,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14398,16 +14871,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14482,21 +14958,25 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14543,11 +15023,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14569,6 +15051,8118 @@
switch(current_function_type){
/****
+ *REAL_TO_SINT
+ */
+ case function_real_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_sint*/
+ break;
+
+/****
+ *REAL_TO_LINT
+ */
+ case function_real_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lint*/
+ break;
+
+/****
+ *REAL_TO_DINT
+ */
+ case function_real_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dint*/
+ break;
+
+/****
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_date*/
+ break;
+
+/****
+ *REAL_TO_DWORD
+ */
+ case function_real_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dword*/
+ break;
+
+/****
+ *REAL_TO_DT
+ */
+ case function_real_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ break;
+
+/****
+ *REAL_TO_TOD
+ */
+ case function_real_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_tod*/
+ break;
+
+/****
+ *REAL_TO_UDINT
+ */
+ case function_real_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_udint*/
+ break;
+
+/****
+ *REAL_TO_WORD
+ */
+ case function_real_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_word*/
+ break;
+
+/****
+ *REAL_TO_STRING
+ */
+ case function_real_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_string*/
+ break;
+
+/****
+ *REAL_TO_LWORD
+ */
+ case function_real_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lword*/
+ break;
+
+/****
+ *REAL_TO_UINT
+ */
+ case function_real_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_uint*/
+ break;
+
+/****
+ *REAL_TO_LREAL
+ */
+ case function_real_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lreal*/
+ break;
+
+/****
+ *REAL_TO_BYTE
+ */
+ case function_real_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_byte*/
+ break;
+
+/****
+ *REAL_TO_USINT
+ */
+ case function_real_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_usint*/
+ break;
+
+/****
+ *REAL_TO_ULINT
+ */
+ case function_real_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_ulint*/
+ break;
+
+/****
+ *REAL_TO_BOOL
+ */
+ case function_real_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_bool*/
+ break;
+
+/****
+ *REAL_TO_TIME
+ */
+ case function_real_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_time*/
+ break;
+
+/****
+ *REAL_TO_INT
+ */
+ case function_real_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_int*/
+ break;
+
+/****
+ *SINT_TO_REAL
+ */
+ case function_sint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_real*/
+ break;
+
+/****
+ *SINT_TO_LINT
+ */
+ case function_sint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lint*/
+ break;
+
+/****
+ *SINT_TO_DINT
+ */
+ case function_sint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dint*/
+ break;
+
+/****
+ *SINT_TO_DATE
+ */
+ case function_sint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_date*/
+ break;
+
+/****
+ *SINT_TO_DWORD
+ */
+ case function_sint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dword*/
+ break;
+
+/****
+ *SINT_TO_DT
+ */
+ case function_sint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ break;
+
+/****
+ *SINT_TO_TOD
+ */
+ case function_sint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_tod*/
+ break;
+
+/****
+ *SINT_TO_UDINT
+ */
+ case function_sint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_udint*/
+ break;
+
+/****
+ *SINT_TO_WORD
+ */
+ case function_sint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_word*/
+ break;
+
+/****
+ *SINT_TO_STRING
+ */
+ case function_sint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ break;
+
+/****
+ *SINT_TO_LWORD
+ */
+ case function_sint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ break;
+
+/****
+ *SINT_TO_UINT
+ */
+ case function_sint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_uint*/
+ break;
+
+/****
+ *SINT_TO_LREAL
+ */
+ case function_sint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ break;
+
+/****
+ *SINT_TO_BYTE
+ */
+ case function_sint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_byte*/
+ break;
+
+/****
+ *SINT_TO_USINT
+ */
+ case function_sint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_usint*/
+ break;
+
+/****
+ *SINT_TO_ULINT
+ */
+ case function_sint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ break;
+
+/****
+ *SINT_TO_BOOL
+ */
+ case function_sint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ break;
+
+/****
+ *SINT_TO_TIME
+ */
+ case function_sint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ break;
+
+/****
+ *SINT_TO_INT
+ */
+ case function_sint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_int*/
+ break;
+
+/****
+ *LINT_TO_REAL
+ */
+ case function_lint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_real*/
+ break;
+
+/****
+ *LINT_TO_SINT
+ */
+ case function_lint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_sint*/
+ break;
+
+/****
+ *LINT_TO_DINT
+ */
+ case function_lint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dint*/
+ break;
+
+/****
+ *LINT_TO_DATE
+ */
+ case function_lint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_date*/
+ break;
+
+/****
+ *LINT_TO_DWORD
+ */
+ case function_lint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dword*/
+ break;
+
+/****
+ *LINT_TO_DT
+ */
+ case function_lint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ break;
+
+/****
+ *LINT_TO_TOD
+ */
+ case function_lint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_tod*/
+ break;
+
+/****
+ *LINT_TO_UDINT
+ */
+ case function_lint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_udint*/
+ break;
+
+/****
+ *LINT_TO_WORD
+ */
+ case function_lint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_word*/
+ break;
+
+/****
+ *LINT_TO_STRING
+ */
+ case function_lint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ break;
+
+/****
+ *LINT_TO_LWORD
+ */
+ case function_lint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ break;
+
+/****
+ *LINT_TO_UINT
+ */
+ case function_lint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_uint*/
+ break;
+
+/****
+ *LINT_TO_LREAL
+ */
+ case function_lint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ break;
+
+/****
+ *LINT_TO_BYTE
+ */
+ case function_lint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_byte*/
+ break;
+
+/****
+ *LINT_TO_USINT
+ */
+ case function_lint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_usint*/
+ break;
+
+/****
+ *LINT_TO_ULINT
+ */
+ case function_lint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ break;
+
+/****
+ *LINT_TO_BOOL
+ */
+ case function_lint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ break;
+
+/****
+ *LINT_TO_TIME
+ */
+ case function_lint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ break;
+
+/****
+ *LINT_TO_INT
+ */
+ case function_lint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_int*/
+ break;
+
+/****
+ *DINT_TO_REAL
+ */
+ case function_dint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_real*/
+ break;
+
+/****
+ *DINT_TO_SINT
+ */
+ case function_dint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_sint*/
+ break;
+
+/****
+ *DINT_TO_LINT
+ */
+ case function_dint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lint*/
+ break;
+
+/****
+ *DINT_TO_DATE
+ */
+ case function_dint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_date*/
+ break;
+
+/****
+ *DINT_TO_DWORD
+ */
+ case function_dint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dword*/
+ break;
+
+/****
+ *DINT_TO_DT
+ */
+ case function_dint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ break;
+
+/****
+ *DINT_TO_TOD
+ */
+ case function_dint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_tod*/
+ break;
+
+/****
+ *DINT_TO_UDINT
+ */
+ case function_dint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_udint*/
+ break;
+
+/****
+ *DINT_TO_WORD
+ */
+ case function_dint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_word*/
+ break;
+
+/****
+ *DINT_TO_STRING
+ */
+ case function_dint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ break;
+
+/****
+ *DINT_TO_LWORD
+ */
+ case function_dint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ break;
+
+/****
+ *DINT_TO_UINT
+ */
+ case function_dint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_uint*/
+ break;
+
+/****
+ *DINT_TO_LREAL
+ */
+ case function_dint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ break;
+
+/****
+ *DINT_TO_BYTE
+ */
+ case function_dint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_byte*/
+ break;
+
+/****
+ *DINT_TO_USINT
+ */
+ case function_dint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_usint*/
+ break;
+
+/****
+ *DINT_TO_ULINT
+ */
+ case function_dint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ break;
+
+/****
+ *DINT_TO_BOOL
+ */
+ case function_dint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ break;
+
+/****
+ *DINT_TO_TIME
+ */
+ case function_dint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ break;
+
+/****
+ *DINT_TO_INT
+ */
+ case function_dint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_int*/
+ break;
+
+/****
+ *DATE_TO_REAL
+ */
+ case function_date_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_real*/
+ break;
+
+/****
+ *DATE_TO_SINT
+ */
+ case function_date_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_sint*/
+ break;
+
+/****
+ *DATE_TO_LINT
+ */
+ case function_date_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lint*/
+ break;
+
+/****
+ *DATE_TO_DINT
+ */
+ case function_date_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dint*/
+ break;
+
+/****
+ *DATE_TO_DWORD
+ */
+ case function_date_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dword*/
+ break;
+
+/****
+ *DATE_TO_UDINT
+ */
+ case function_date_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_udint*/
+ break;
+
+/****
+ *DATE_TO_WORD
+ */
+ case function_date_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_word*/
+ break;
+
+/****
+ *DATE_TO_STRING
+ */
+ case function_date_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ break;
+
+/****
+ *DATE_TO_LWORD
+ */
+ case function_date_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ break;
+
+/****
+ *DATE_TO_UINT
+ */
+ case function_date_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_uint*/
+ break;
+
+/****
+ *DATE_TO_LREAL
+ */
+ case function_date_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ break;
+
+/****
+ *DATE_TO_BYTE
+ */
+ case function_date_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_byte*/
+ break;
+
+/****
+ *DATE_TO_USINT
+ */
+ case function_date_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_usint*/
+ break;
+
+/****
+ *DATE_TO_ULINT
+ */
+ case function_date_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_INT
+ */
+ case function_date_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_int*/
+ break;
+
+/****
+ *DWORD_TO_REAL
+ */
+ case function_dword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_real*/
+ break;
+
+/****
+ *DWORD_TO_SINT
+ */
+ case function_dword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_sint*/
+ break;
+
+/****
+ *DWORD_TO_LINT
+ */
+ case function_dword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lint*/
+ break;
+
+/****
+ *DWORD_TO_DINT
+ */
+ case function_dword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dint*/
+ break;
+
+/****
+ *DWORD_TO_DATE
+ */
+ case function_dword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_date*/
+ break;
+
+/****
+ *DWORD_TO_DT
+ */
+ case function_dword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ break;
+
+/****
+ *DWORD_TO_TOD
+ */
+ case function_dword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_tod*/
+ break;
+
+/****
+ *DWORD_TO_UDINT
+ */
+ case function_dword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_udint*/
+ break;
+
+/****
+ *DWORD_TO_WORD
+ */
+ case function_dword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_word*/
+ break;
+
+/****
+ *DWORD_TO_STRING
+ */
+ case function_dword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ break;
+
+/****
+ *DWORD_TO_LWORD
+ */
+ case function_dword_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ break;
+
+/****
+ *DWORD_TO_UINT
+ */
+ case function_dword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_uint*/
+ break;
+
+/****
+ *DWORD_TO_LREAL
+ */
+ case function_dword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ break;
+
+/****
+ *DWORD_TO_BYTE
+ */
+ case function_dword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_byte*/
+ break;
+
+/****
+ *DWORD_TO_USINT
+ */
+ case function_dword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_usint*/
+ break;
+
+/****
+ *DWORD_TO_ULINT
+ */
+ case function_dword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ break;
+
+/****
+ *DWORD_TO_BOOL
+ */
+ case function_dword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ break;
+
+/****
+ *DWORD_TO_TIME
+ */
+ case function_dword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ break;
+
+/****
+ *DWORD_TO_INT
+ */
+ case function_dword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_int*/
+ break;
+
+/****
+ *DT_TO_REAL
+ */
+ case function_dt_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_real*/
+ break;
+
+/****
+ *DT_TO_SINT
+ */
+ case function_dt_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_sint*/
+ break;
+
+/****
+ *DT_TO_LINT
+ */
+ case function_dt_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lint*/
+ break;
+
+/****
+ *DT_TO_DINT
+ */
+ case function_dt_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dint*/
+ break;
+
+/****
+ *DT_TO_DWORD
+ */
+ case function_dt_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dword*/
+ break;
+
+/****
+ *DT_TO_UDINT
+ */
+ case function_dt_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_udint*/
+ break;
+
+/****
+ *DT_TO_WORD
+ */
+ case function_dt_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_word*/
+ break;
+
+/****
+ *DT_TO_STRING
+ */
+ case function_dt_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_string*/
+ break;
+
+/****
+ *DT_TO_LWORD
+ */
+ case function_dt_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ break;
+
+/****
+ *DT_TO_UINT
+ */
+ case function_dt_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_uint*/
+ break;
+
+/****
+ *DT_TO_LREAL
+ */
+ case function_dt_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ break;
+
+/****
+ *DT_TO_BYTE
+ */
+ case function_dt_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_byte*/
+ break;
+
+/****
+ *DT_TO_USINT
+ */
+ case function_dt_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_usint*/
+ break;
+
+/****
+ *DT_TO_ULINT
+ */
+ case function_dt_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_INT
+ */
+ case function_dt_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_int*/
+ break;
+
+/****
+ *TOD_TO_REAL
+ */
+ case function_tod_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_real*/
+ break;
+
+/****
+ *TOD_TO_SINT
+ */
+ case function_tod_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_sint*/
+ break;
+
+/****
+ *TOD_TO_LINT
+ */
+ case function_tod_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lint*/
+ break;
+
+/****
+ *TOD_TO_DINT
+ */
+ case function_tod_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dint*/
+ break;
+
+/****
+ *TOD_TO_DWORD
+ */
+ case function_tod_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dword*/
+ break;
+
+/****
+ *TOD_TO_UDINT
+ */
+ case function_tod_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_udint*/
+ break;
+
+/****
+ *TOD_TO_WORD
+ */
+ case function_tod_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_word*/
+ break;
+
+/****
+ *TOD_TO_STRING
+ */
+ case function_tod_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ break;
+
+/****
+ *TOD_TO_LWORD
+ */
+ case function_tod_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ break;
+
+/****
+ *TOD_TO_UINT
+ */
+ case function_tod_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_uint*/
+ break;
+
+/****
+ *TOD_TO_LREAL
+ */
+ case function_tod_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ break;
+
+/****
+ *TOD_TO_BYTE
+ */
+ case function_tod_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_byte*/
+ break;
+
+/****
+ *TOD_TO_USINT
+ */
+ case function_tod_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_usint*/
+ break;
+
+/****
+ *TOD_TO_ULINT
+ */
+ case function_tod_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_INT
+ */
+ case function_tod_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_int*/
+ break;
+
+/****
+ *UDINT_TO_REAL
+ */
+ case function_udint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_real*/
+ break;
+
+/****
+ *UDINT_TO_SINT
+ */
+ case function_udint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_sint*/
+ break;
+
+/****
+ *UDINT_TO_LINT
+ */
+ case function_udint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lint*/
+ break;
+
+/****
+ *UDINT_TO_DINT
+ */
+ case function_udint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dint*/
+ break;
+
+/****
+ *UDINT_TO_DATE
+ */
+ case function_udint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_date*/
+ break;
+
+/****
+ *UDINT_TO_DWORD
+ */
+ case function_udint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dword*/
+ break;
+
+/****
+ *UDINT_TO_DT
+ */
+ case function_udint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ break;
+
+/****
+ *UDINT_TO_TOD
+ */
+ case function_udint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_tod*/
+ break;
+
+/****
+ *UDINT_TO_WORD
+ */
+ case function_udint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_word*/
+ break;
+
+/****
+ *UDINT_TO_STRING
+ */
+ case function_udint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ break;
+
+/****
+ *UDINT_TO_LWORD
+ */
+ case function_udint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ break;
+
+/****
+ *UDINT_TO_UINT
+ */
+ case function_udint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_uint*/
+ break;
+
+/****
+ *UDINT_TO_LREAL
+ */
+ case function_udint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ break;
+
+/****
+ *UDINT_TO_BYTE
+ */
+ case function_udint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_byte*/
+ break;
+
+/****
+ *UDINT_TO_USINT
+ */
+ case function_udint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_ULINT
+ */
+ case function_udint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ break;
+
+/****
+ *UDINT_TO_BOOL
+ */
+ case function_udint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ break;
+
+/****
+ *UDINT_TO_TIME
+ */
+ case function_udint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ break;
+
+/****
+ *UDINT_TO_INT
+ */
+ case function_udint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_int*/
+ break;
+
+/****
+ *WORD_TO_REAL
+ */
+ case function_word_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_real*/
+ break;
+
+/****
+ *WORD_TO_SINT
+ */
+ case function_word_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_sint*/
+ break;
+
+/****
+ *WORD_TO_LINT
+ */
+ case function_word_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lint*/
+ break;
+
+/****
+ *WORD_TO_DINT
+ */
+ case function_word_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dint*/
+ break;
+
+/****
+ *WORD_TO_DATE
+ */
+ case function_word_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_date*/
+ break;
+
+/****
+ *WORD_TO_DWORD
+ */
+ case function_word_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dword*/
+ break;
+
+/****
+ *WORD_TO_DT
+ */
+ case function_word_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ break;
+
+/****
+ *WORD_TO_TOD
+ */
+ case function_word_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_tod*/
+ break;
+
+/****
+ *WORD_TO_UDINT
+ */
+ case function_word_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_udint*/
+ break;
+
+/****
+ *WORD_TO_STRING
+ */
+ case function_word_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ break;
+
+/****
+ *WORD_TO_LWORD
+ */
+ case function_word_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ break;
+
+/****
+ *WORD_TO_UINT
+ */
+ case function_word_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_uint*/
+ break;
+
+/****
+ *WORD_TO_LREAL
+ */
+ case function_word_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ break;
+
+/****
+ *WORD_TO_BYTE
+ */
+ case function_word_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_byte*/
+ break;
+
+/****
+ *WORD_TO_USINT
+ */
+ case function_word_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_usint*/
+ break;
+
+/****
+ *WORD_TO_ULINT
+ */
+ case function_word_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ break;
+
+/****
+ *WORD_TO_BOOL
+ */
+ case function_word_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ break;
+
+/****
+ *WORD_TO_TIME
+ */
+ case function_word_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ break;
+
+/****
+ *WORD_TO_INT
+ */
+ case function_word_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_int*/
+ break;
+
+/****
+ *STRING_TO_REAL
+ */
+ case function_string_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_real*/
+ break;
+
+/****
+ *STRING_TO_SINT
+ */
+ case function_string_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_sint*/
+ break;
+
+/****
+ *STRING_TO_LINT
+ */
+ case function_string_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lint*/
+ break;
+
+/****
+ *STRING_TO_DINT
+ */
+ case function_string_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dint*/
+ break;
+
+/****
+ *STRING_TO_DATE
+ */
+ case function_string_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_date*/
+ break;
+
+/****
+ *STRING_TO_DWORD
+ */
+ case function_string_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dword*/
+ break;
+
+/****
+ *STRING_TO_DT
+ */
+ case function_string_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ break;
+
+/****
+ *STRING_TO_TOD
+ */
+ case function_string_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_tod*/
+ break;
+
+/****
+ *STRING_TO_UDINT
+ */
+ case function_string_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_udint*/
+ break;
+
+/****
+ *STRING_TO_WORD
+ */
+ case function_string_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_word*/
+ break;
+
+/****
+ *STRING_TO_LWORD
+ */
+ case function_string_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ break;
+
+/****
+ *STRING_TO_UINT
+ */
+ case function_string_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_uint*/
+ break;
+
+/****
+ *STRING_TO_LREAL
+ */
+ case function_string_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ break;
+
+/****
+ *STRING_TO_BYTE
+ */
+ case function_string_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_byte*/
+ break;
+
+/****
+ *STRING_TO_USINT
+ */
+ case function_string_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_usint*/
+ break;
+
+/****
+ *STRING_TO_ULINT
+ */
+ case function_string_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ break;
+
+/****
+ *STRING_TO_BOOL
+ */
+ case function_string_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ break;
+
+/****
+ *STRING_TO_TIME
+ */
+ case function_string_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ break;
+
+/****
+ *STRING_TO_INT
+ */
+ case function_string_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_int*/
+ break;
+
+/****
+ *LWORD_TO_REAL
+ */
+ case function_lword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_real*/
+ break;
+
+/****
+ *LWORD_TO_SINT
+ */
+ case function_lword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_sint*/
+ break;
+
+/****
+ *LWORD_TO_LINT
+ */
+ case function_lword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lint*/
+ break;
+
+/****
+ *LWORD_TO_DINT
+ */
+ case function_lword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dint*/
+ break;
+
+/****
+ *LWORD_TO_DATE
+ */
+ case function_lword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_date*/
+ break;
+
+/****
+ *LWORD_TO_DWORD
+ */
+ case function_lword_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dword*/
+ break;
+
+/****
+ *LWORD_TO_DT
+ */
+ case function_lword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ break;
+
+/****
+ *LWORD_TO_TOD
+ */
+ case function_lword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_tod*/
+ break;
+
+/****
+ *LWORD_TO_UDINT
+ */
+ case function_lword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_udint*/
+ break;
+
+/****
+ *LWORD_TO_WORD
+ */
+ case function_lword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_word*/
+ break;
+
+/****
+ *LWORD_TO_STRING
+ */
+ case function_lword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ break;
+
+/****
+ *LWORD_TO_UINT
+ */
+ case function_lword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_uint*/
+ break;
+
+/****
+ *LWORD_TO_LREAL
+ */
+ case function_lword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ break;
+
+/****
+ *LWORD_TO_BYTE
+ */
+ case function_lword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_byte*/
+ break;
+
+/****
+ *LWORD_TO_USINT
+ */
+ case function_lword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_usint*/
+ break;
+
+/****
+ *LWORD_TO_ULINT
+ */
+ case function_lword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ break;
+
+/****
+ *LWORD_TO_BOOL
+ */
+ case function_lword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ break;
+
+/****
+ *LWORD_TO_TIME
+ */
+ case function_lword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ break;
+
+/****
+ *LWORD_TO_INT
+ */
+ case function_lword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_int*/
+ break;
+
+/****
+ *UINT_TO_REAL
+ */
+ case function_uint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_real*/
+ break;
+
+/****
+ *UINT_TO_SINT
+ */
+ case function_uint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_sint*/
+ break;
+
+/****
+ *UINT_TO_LINT
+ */
+ case function_uint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lint*/
+ break;
+
+/****
+ *UINT_TO_DINT
+ */
+ case function_uint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dint*/
+ break;
+
+/****
+ *UINT_TO_DATE
+ */
+ case function_uint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_date*/
+ break;
+
+/****
+ *UINT_TO_DWORD
+ */
+ case function_uint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dword*/
+ break;
+
+/****
+ *UINT_TO_DT
+ */
+ case function_uint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ break;
+
+/****
+ *UINT_TO_TOD
+ */
+ case function_uint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_tod*/
+ break;
+
+/****
+ *UINT_TO_UDINT
+ */
+ case function_uint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_udint*/
+ break;
+
+/****
+ *UINT_TO_WORD
+ */
+ case function_uint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_word*/
+ break;
+
+/****
+ *UINT_TO_STRING
+ */
+ case function_uint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ break;
+
+/****
+ *UINT_TO_LWORD
+ */
+ case function_uint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ break;
+
+/****
+ *UINT_TO_LREAL
+ */
+ case function_uint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ break;
+
+/****
+ *UINT_TO_BYTE
+ */
+ case function_uint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_byte*/
+ break;
+
+/****
+ *UINT_TO_USINT
+ */
+ case function_uint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_usint*/
+ break;
+
+/****
+ *UINT_TO_ULINT
+ */
+ case function_uint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ break;
+
+/****
+ *UINT_TO_BOOL
+ */
+ case function_uint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ break;
+
+/****
+ *UINT_TO_TIME
+ */
+ case function_uint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ break;
+
+/****
+ *UINT_TO_INT
+ */
+ case function_uint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_int*/
+ break;
+
+/****
+ *LREAL_TO_REAL
+ */
+ case function_lreal_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_real*/
+ break;
+
+/****
+ *LREAL_TO_SINT
+ */
+ case function_lreal_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_sint*/
+ break;
+
+/****
+ *LREAL_TO_LINT
+ */
+ case function_lreal_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lint*/
+ break;
+
+/****
+ *LREAL_TO_DINT
+ */
+ case function_lreal_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dint*/
+ break;
+
+/****
+ *LREAL_TO_DATE
+ */
+ case function_lreal_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_date*/
+ break;
+
+/****
+ *LREAL_TO_DWORD
+ */
+ case function_lreal_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dword*/
+ break;
+
+/****
+ *LREAL_TO_DT
+ */
+ case function_lreal_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ break;
+
+/****
+ *LREAL_TO_TOD
+ */
+ case function_lreal_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_tod*/
+ break;
+
+/****
+ *LREAL_TO_UDINT
+ */
+ case function_lreal_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_udint*/
+ break;
+
+/****
+ *LREAL_TO_WORD
+ */
+ case function_lreal_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_word*/
+ break;
+
+/****
+ *LREAL_TO_STRING
+ */
+ case function_lreal_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ break;
+
+/****
+ *LREAL_TO_LWORD
+ */
+ case function_lreal_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ break;
+
+/****
+ *LREAL_TO_UINT
+ */
+ case function_lreal_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_uint*/
+ break;
+
+/****
+ *LREAL_TO_BYTE
+ */
+ case function_lreal_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_byte*/
+ break;
+
+/****
+ *LREAL_TO_USINT
+ */
+ case function_lreal_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_usint*/
+ break;
+
+/****
+ *LREAL_TO_ULINT
+ */
+ case function_lreal_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ break;
+
+/****
+ *LREAL_TO_BOOL
+ */
+ case function_lreal_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ break;
+
+/****
+ *LREAL_TO_TIME
+ */
+ case function_lreal_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ break;
+
+/****
+ *LREAL_TO_INT
+ */
+ case function_lreal_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_int*/
+ break;
+
+/****
+ *BYTE_TO_REAL
+ */
+ case function_byte_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_real*/
+ break;
+
+/****
+ *BYTE_TO_SINT
+ */
+ case function_byte_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_sint*/
+ break;
+
+/****
+ *BYTE_TO_LINT
+ */
+ case function_byte_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lint*/
+ break;
+
+/****
+ *BYTE_TO_DINT
+ */
+ case function_byte_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dint*/
+ break;
+
+/****
+ *BYTE_TO_DATE
+ */
+ case function_byte_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_date*/
+ break;
+
+/****
+ *BYTE_TO_DWORD
+ */
+ case function_byte_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dword*/
+ break;
+
+/****
+ *BYTE_TO_DT
+ */
+ case function_byte_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ break;
+
+/****
+ *BYTE_TO_TOD
+ */
+ case function_byte_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_tod*/
+ break;
+
+/****
+ *BYTE_TO_UDINT
+ */
+ case function_byte_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_udint*/
+ break;
+
+/****
+ *BYTE_TO_WORD
+ */
+ case function_byte_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_word*/
+ break;
+
+/****
+ *BYTE_TO_STRING
+ */
+ case function_byte_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ break;
+
+/****
+ *BYTE_TO_LWORD
+ */
+ case function_byte_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ break;
+
+/****
+ *BYTE_TO_UINT
+ */
+ case function_byte_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_uint*/
+ break;
+
+/****
+ *BYTE_TO_LREAL
+ */
+ case function_byte_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ break;
+
+/****
+ *BYTE_TO_USINT
+ */
+ case function_byte_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_usint*/
+ break;
+
+/****
+ *BYTE_TO_ULINT
+ */
+ case function_byte_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ break;
+
+/****
+ *BYTE_TO_BOOL
+ */
+ case function_byte_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_bool*/
+ break;
+
+/****
+ *BYTE_TO_TIME
+ */
+ case function_byte_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ break;
+
+/****
+ *BYTE_TO_INT
+ */
+ case function_byte_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_int*/
+ break;
+
+/****
+ *USINT_TO_REAL
+ */
+ case function_usint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_real*/
+ break;
+
+/****
+ *USINT_TO_SINT
+ */
+ case function_usint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_sint*/
+ break;
+
+/****
+ *USINT_TO_LINT
+ */
+ case function_usint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lint*/
+ break;
+
+/****
+ *USINT_TO_DINT
+ */
+ case function_usint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dint*/
+ break;
+
+/****
+ *USINT_TO_DATE
+ */
+ case function_usint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_date*/
+ break;
+
+/****
+ *USINT_TO_DWORD
+ */
+ case function_usint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dword*/
+ break;
+
+/****
+ *USINT_TO_DT
+ */
+ case function_usint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ break;
+
+/****
+ *USINT_TO_TOD
+ */
+ case function_usint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_tod*/
+ break;
+
+/****
+ *USINT_TO_UDINT
+ */
+ case function_usint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_udint*/
+ break;
+
+/****
+ *USINT_TO_WORD
+ */
+ case function_usint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_word*/
+ break;
+
+/****
+ *USINT_TO_STRING
+ */
+ case function_usint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ break;
+
+/****
+ *USINT_TO_LWORD
+ */
+ case function_usint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ break;
+
+/****
+ *USINT_TO_UINT
+ */
+ case function_usint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_uint*/
+ break;
+
+/****
+ *USINT_TO_LREAL
+ */
+ case function_usint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ break;
+
+/****
+ *USINT_TO_BYTE
+ */
+ case function_usint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_byte*/
+ break;
+
+/****
+ *USINT_TO_ULINT
+ */
+ case function_usint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ break;
+
+/****
+ *USINT_TO_BOOL
+ */
+ case function_usint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ break;
+
+/****
+ *USINT_TO_TIME
+ */
+ case function_usint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ break;
+
+/****
+ *USINT_TO_INT
+ */
+ case function_usint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_int*/
+ break;
+
+/****
+ *ULINT_TO_REAL
+ */
+ case function_ulint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_real*/
+ break;
+
+/****
+ *ULINT_TO_SINT
+ */
+ case function_ulint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_sint*/
+ break;
+
+/****
+ *ULINT_TO_LINT
+ */
+ case function_ulint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lint*/
+ break;
+
+/****
+ *ULINT_TO_DINT
+ */
+ case function_ulint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dint*/
+ break;
+
+/****
+ *ULINT_TO_DATE
+ */
+ case function_ulint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_date*/
+ break;
+
+/****
+ *ULINT_TO_DWORD
+ */
+ case function_ulint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dword*/
+ break;
+
+/****
+ *ULINT_TO_DT
+ */
+ case function_ulint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ break;
+
+/****
+ *ULINT_TO_TOD
+ */
+ case function_ulint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_tod*/
+ break;
+
+/****
+ *ULINT_TO_UDINT
+ */
+ case function_ulint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_udint*/
+ break;
+
+/****
+ *ULINT_TO_WORD
+ */
+ case function_ulint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_word*/
+ break;
+
+/****
+ *ULINT_TO_STRING
+ */
+ case function_ulint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ break;
+
+/****
+ *ULINT_TO_LWORD
+ */
+ case function_ulint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ break;
+
+/****
+ *ULINT_TO_UINT
+ */
+ case function_ulint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_uint*/
+ break;
+
+/****
+ *ULINT_TO_LREAL
+ */
+ case function_ulint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ break;
+
+/****
+ *ULINT_TO_BYTE
+ */
+ case function_ulint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_byte*/
+ break;
+
+/****
+ *ULINT_TO_USINT
+ */
+ case function_ulint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_usint*/
+ break;
+
+/****
+ *ULINT_TO_BOOL
+ */
+ case function_ulint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ break;
+
+/****
+ *ULINT_TO_TIME
+ */
+ case function_ulint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ break;
+
+/****
+ *ULINT_TO_INT
+ */
+ case function_ulint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_int*/
+ break;
+
+/****
+ *BOOL_TO_REAL
+ */
+ case function_bool_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_real*/
+ break;
+
+/****
*BOOL_TO_SINT
*/
case function_bool_to_sint :
@@ -14587,6 +23181,7 @@
}
+
ERROR;
}
@@ -14594,6 +23189,422 @@
break;
/****
+ *BOOL_TO_LINT
+ */
+ case function_bool_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lint*/
+ break;
+
+/****
+ *BOOL_TO_DINT
+ */
+ case function_bool_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dint*/
+ break;
+
+/****
+ *BOOL_TO_DATE
+ */
+ case function_bool_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_date*/
+ break;
+
+/****
+ *BOOL_TO_DWORD
+ */
+ case function_bool_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dword*/
+ break;
+
+/****
+ *BOOL_TO_DT
+ */
+ case function_bool_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ break;
+
+/****
+ *BOOL_TO_TOD
+ */
+ case function_bool_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_tod*/
+ break;
+
+/****
+ *BOOL_TO_UDINT
+ */
+ case function_bool_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_udint*/
+ break;
+
+/****
+ *BOOL_TO_WORD
+ */
+ case function_bool_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_word*/
+ break;
+
+/****
+ *BOOL_TO_STRING
+ */
+ case function_bool_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ break;
+
+/****
+ *BOOL_TO_LWORD
+ */
+ case function_bool_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ break;
+
+/****
+ *BOOL_TO_UINT
+ */
+ case function_bool_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_uint*/
+ break;
+
+/****
+ *BOOL_TO_LREAL
+ */
+ case function_bool_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_BYTE
+ */
+ case function_bool_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_byte*/
+ break;
+
+/****
+ *BOOL_TO_USINT
+ */
+ case function_bool_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_usint*/
+ break;
+
+/****
+ *BOOL_TO_ULINT
+ */
+ case function_bool_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_ulint*/
+ break;
+
+/****
+ *BOOL_TO_TIME
+ */
+ case function_bool_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ break;
+
+/****
*BOOL_TO_INT
*/
case function_bool_to_int :
@@ -14612,6 +23623,7 @@
}
+
ERROR;
}
@@ -14619,17 +23631,95 @@
break;
/****
- *BOOL_TO_DINT
- */
- case function_bool_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+ *TIME_TO_REAL
+ */
+ case function_time_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_real*/
+ break;
+
+/****
+ *TIME_TO_SINT
+ */
+ case function_time_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_sint*/
+ break;
+
+/****
+ *TIME_TO_LINT
+ */
+ case function_time_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lint*/
+ break;
+
+/****
+ *TIME_TO_DINT
+ */
+ case function_time_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -14637,24 +23727,363 @@
}
- ERROR;
- }
-
- }/*function_bool_to_dint*/
- break;
-
-/****
- *BOOL_TO_LINT
- */
- case function_bool_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+
+ ERROR;
+ }
+
+ }/*function_time_to_dint*/
+ break;
+
+/****
+ *TIME_TO_DWORD
+ */
+ case function_time_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dword*/
+ break;
+
+/****
+ *TIME_TO_UDINT
+ */
+ case function_time_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_udint*/
+ break;
+
+/****
+ *TIME_TO_WORD
+ */
+ case function_time_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_word*/
+ break;
+
+/****
+ *TIME_TO_STRING
+ */
+ case function_time_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ break;
+
+/****
+ *TIME_TO_LWORD
+ */
+ case function_time_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ break;
+
+/****
+ *TIME_TO_UINT
+ */
+ case function_time_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_uint*/
+ break;
+
+/****
+ *TIME_TO_LREAL
+ */
+ case function_time_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ break;
+
+/****
+ *TIME_TO_BYTE
+ */
+ case function_time_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_byte*/
+ break;
+
+/****
+ *TIME_TO_USINT
+ */
+ case function_time_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_usint*/
+ break;
+
+/****
+ *TIME_TO_ULINT
+ */
+ case function_time_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_INT
+ */
+ case function_time_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_int*/
+ break;
+
+/****
+ *INT_TO_REAL
+ */
+ case function_int_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_real*/
+ break;
+
+/****
+ *INT_TO_SINT
+ */
+ case function_int_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_sint*/
+ break;
+
+/****
+ *INT_TO_LINT
+ */
+ case function_int_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -14662,24 +24091,337 @@
}
- ERROR;
- }
-
- }/*function_bool_to_lint*/
- break;
-
-/****
- *BOOL_TO_USINT
- */
- case function_bool_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+
+ ERROR;
+ }
+
+ }/*function_int_to_lint*/
+ break;
+
+/****
+ *INT_TO_DINT
+ */
+ case function_int_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dint*/
+ break;
+
+/****
+ *INT_TO_DATE
+ */
+ case function_int_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_date*/
+ break;
+
+/****
+ *INT_TO_DWORD
+ */
+ case function_int_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dword*/
+ break;
+
+/****
+ *INT_TO_DT
+ */
+ case function_int_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ break;
+
+/****
+ *INT_TO_TOD
+ */
+ case function_int_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_tod*/
+ break;
+
+/****
+ *INT_TO_UDINT
+ */
+ case function_int_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_udint*/
+ break;
+
+/****
+ *INT_TO_WORD
+ */
+ case function_int_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_word*/
+ break;
+
+/****
+ *INT_TO_STRING
+ */
+ case function_int_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ break;
+
+/****
+ *INT_TO_LWORD
+ */
+ case function_int_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ break;
+
+/****
+ *INT_TO_UINT
+ */
+ case function_int_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_uint*/
+ break;
+
+/****
+ *INT_TO_LREAL
+ */
+ case function_int_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ break;
+
+/****
+ *INT_TO_BYTE
+ */
+ case function_int_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_byte*/
+ break;
+
+/****
+ *INT_TO_USINT
+ */
+ case function_int_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -14687,24 +24429,155 @@
}
- ERROR;
- }
-
- }/*function_bool_to_usint*/
- break;
-
-/****
- *BOOL_TO_UINT
- */
- case function_bool_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+
+ ERROR;
+ }
+
+ }/*function_int_to_usint*/
+ break;
+
+/****
+ *INT_TO_ULINT
+ */
+ case function_int_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ break;
+
+/****
+ *INT_TO_BOOL
+ */
+ case function_int_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ break;
+
+/****
+ *INT_TO_TIME
+ */
+ case function_int_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ break;
+
+/****
+ *TRUNC
+ */
+ case function_trunc :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(search_expression_type->is_real_type(IN_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_trunc*/
+ break;
+
+/****
+ *BCD_TO_UDINT
+ */
+ case function_bcd_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_udint*/
+ break;
+
+/****
+ *BCD_TO_UINT
+ */
+ case function_bcd_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -14712,49 +24585,25 @@
}
- ERROR;
- }
-
- }/*function_bool_to_uint*/
- break;
-
-/****
- *BOOL_TO_UDINT
- */
- case function_bool_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_udint*/
- break;
-
-/****
- *BOOL_TO_ULINT
- */
- case function_bool_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_uint*/
+ break;
+
+/****
+ *BCD_TO_ULINT
+ */
+ case function_bcd_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -14762,99 +24611,181 @@
}
- ERROR;
- }
-
- }/*function_bool_to_ulint*/
- break;
-
-/****
- *BOOL_TO_REAL
- */
- case function_bool_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_real*/
- break;
-
-/****
- *BOOL_TO_LREAL
- */
- case function_bool_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_TIME
- */
- case function_bool_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- break;
-
-/****
- *BOOL_TO_DATE
- */
- case function_bool_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_ulint*/
+ break;
+
+/****
+ *BCD_TO_USINT
+ */
+ case function_bcd_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_BCD
+ */
+ case function_udint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bcd*/
+ break;
+
+/****
+ *UINT_TO_BCD
+ */
+ case function_uint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bcd*/
+ break;
+
+/****
+ *USINT_TO_BCD
+ */
+ case function_usint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bcd*/
+ break;
+
+/****
+ *ULINT_TO_BCD
+ */
+ case function_ulint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bcd*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_TIME_OF_DAY
+ */
+ case function_date_and_time_to_time_of_day :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_time_of_day*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_DATE
+ */
+ case function_date_and_time_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_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))
{
symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
@@ -14862,8816 +24793,43 @@
}
- ERROR;
- }
-
- }/*function_bool_to_date*/
- break;
-
-/****
- *BOOL_TO_TOD
- */
- case function_bool_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_tod*/
- break;
-
-/****
- *BOOL_TO_DT
- */
- case function_bool_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- break;
-
-/****
- *BOOL_TO_STRING
- */
- case function_bool_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_BYTE
- */
- case function_bool_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_byte*/
- break;
-
-/****
- *BOOL_TO_WORD
- */
- case function_bool_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_word*/
- break;
-
-/****
- *BOOL_TO_DWORD
- */
- case function_bool_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dword*/
- break;
-
-/****
- *BOOL_TO_LWORD
- */
- case function_bool_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- break;
-
-/****
- *SINT_TO_BOOL
- */
- case function_sint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bool*/
- break;
-
-/****
- *SINT_TO_INT
- */
- case function_sint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_int*/
- break;
-
-/****
- *SINT_TO_DINT
- */
- case function_sint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dint*/
- break;
-
-/****
- *SINT_TO_LINT
- */
- case function_sint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lint*/
- break;
-
-/****
- *SINT_TO_USINT
- */
- case function_sint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_usint*/
- break;
-
-/****
- *SINT_TO_UINT
- */
- case function_sint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_uint*/
- break;
-
-/****
- *SINT_TO_UDINT
- */
- case function_sint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_udint*/
- break;
-
-/****
- *SINT_TO_ULINT
- */
- case function_sint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_ulint*/
- break;
-
-/****
- *SINT_TO_REAL
- */
- case function_sint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_real*/
- break;
-
-/****
- *SINT_TO_LREAL
- */
- case function_sint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lreal*/
- break;
-
-/****
- *SINT_TO_TIME
- */
- case function_sint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- break;
-
-/****
- *SINT_TO_DATE
- */
- case function_sint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_date*/
- break;
-
-/****
- *SINT_TO_TOD
- */
- case function_sint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_tod*/
- break;
-
-/****
- *SINT_TO_DT
- */
- case function_sint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- break;
-
-/****
- *SINT_TO_STRING
- */
- case function_sint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_BYTE
- */
- case function_sint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_byte*/
- break;
-
-/****
- *SINT_TO_WORD
- */
- case function_sint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_word*/
- break;
-
-/****
- *SINT_TO_DWORD
- */
- case function_sint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dword*/
- break;
-
-/****
- *SINT_TO_LWORD
- */
- case function_sint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lword*/
- break;
-
-/****
- *INT_TO_BOOL
- */
- case function_int_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bool*/
- break;
-
-/****
- *INT_TO_SINT
- */
- case function_int_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_sint*/
- break;
-
-/****
- *INT_TO_DINT
- */
- case function_int_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dint*/
- break;
-
-/****
- *INT_TO_LINT
- */
- case function_int_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lint*/
- break;
-
-/****
- *INT_TO_USINT
- */
- case function_int_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_usint*/
- break;
-
-/****
- *INT_TO_UINT
- */
- case function_int_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_uint*/
- break;
-
-/****
- *INT_TO_UDINT
- */
- case function_int_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_udint*/
- break;
-
-/****
- *INT_TO_ULINT
- */
- case function_int_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_ulint*/
- break;
-
-/****
- *INT_TO_REAL
- */
- case function_int_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_real*/
- break;
-
-/****
- *INT_TO_LREAL
- */
- case function_int_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lreal*/
- break;
-
-/****
- *INT_TO_TIME
- */
- case function_int_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- break;
-
-/****
- *INT_TO_DATE
- */
- case function_int_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_date*/
- break;
-
-/****
- *INT_TO_TOD
- */
- case function_int_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_tod*/
- break;
-
-/****
- *INT_TO_DT
- */
- case function_int_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- break;
-
-/****
- *INT_TO_STRING
- */
- case function_int_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_BYTE
- */
- case function_int_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_byte*/
- break;
-
-/****
- *INT_TO_WORD
- */
- case function_int_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_word*/
- break;
-
-/****
- *INT_TO_DWORD
- */
- case function_int_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dword*/
- break;
-
-/****
- *INT_TO_LWORD
- */
- case function_int_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lword*/
- break;
-
-/****
- *DINT_TO_BOOL
- */
- case function_dint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- break;
-
-/****
- *DINT_TO_SINT
- */
- case function_dint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_sint*/
- break;
-
-/****
- *DINT_TO_INT
- */
- case function_dint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_int*/
- break;
-
-/****
- *DINT_TO_LINT
- */
- case function_dint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lint*/
- break;
-
-/****
- *DINT_TO_USINT
- */
- case function_dint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_usint*/
- break;
-
-/****
- *DINT_TO_UINT
- */
- case function_dint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_uint*/
- break;
-
-/****
- *DINT_TO_UDINT
- */
- case function_dint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_udint*/
- break;
-
-/****
- *DINT_TO_ULINT
- */
- case function_dint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_ulint*/
- break;
-
-/****
- *DINT_TO_REAL
- */
- case function_dint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_real*/
- break;
-
-/****
- *DINT_TO_LREAL
- */
- case function_dint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- break;
-
-/****
- *DINT_TO_TIME
- */
- case function_dint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- break;
-
-/****
- *DINT_TO_DATE
- */
- case function_dint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_date*/
- break;
-
-/****
- *DINT_TO_TOD
- */
- case function_dint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_tod*/
- break;
-
-/****
- *DINT_TO_DT
- */
- case function_dint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- break;
-
-/****
- *DINT_TO_STRING
- */
- case function_dint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_BYTE
- */
- case function_dint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_byte*/
- break;
-
-/****
- *DINT_TO_WORD
- */
- case function_dint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_word*/
- break;
-
-/****
- *DINT_TO_DWORD
- */
- case function_dint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dword*/
- break;
-
-/****
- *DINT_TO_LWORD
- */
- case function_dint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- break;
-
-/****
- *LINT_TO_BOOL
- */
- case function_lint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- break;
-
-/****
- *LINT_TO_SINT
- */
- case function_lint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_sint*/
- break;
-
-/****
- *LINT_TO_INT
- */
- case function_lint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_int*/
- break;
-
-/****
- *LINT_TO_DINT
- */
- case function_lint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dint*/
- break;
-
-/****
- *LINT_TO_USINT
- */
- case function_lint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_usint*/
- break;
-
-/****
- *LINT_TO_UINT
- */
- case function_lint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_uint*/
- break;
-
-/****
- *LINT_TO_UDINT
- */
- case function_lint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_udint*/
- break;
-
-/****
- *LINT_TO_ULINT
- */
- case function_lint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- break;
-
-/****
- *LINT_TO_REAL
- */
- case function_lint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_real*/
- break;
-
-/****
- *LINT_TO_LREAL
- */
- case function_lint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- break;
-
-/****
- *LINT_TO_TIME
- */
- case function_lint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- break;
-
-/****
- *LINT_TO_DATE
- */
- case function_lint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_date*/
- break;
-
-/****
- *LINT_TO_TOD
- */
- case function_lint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_tod*/
- break;
-
-/****
- *LINT_TO_DT
- */
- case function_lint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- break;
-
-/****
- *LINT_TO_STRING
- */
- case function_lint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_BYTE
- */
- case function_lint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_byte*/
- break;
-
-/****
- *LINT_TO_WORD
- */
- case function_lint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_word*/
- break;
-
-/****
- *LINT_TO_DWORD
- */
- case function_lint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dword*/
- break;
-
-/****
- *LINT_TO_LWORD
- */
- case function_lint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- break;
-
-/****
- *USINT_TO_BOOL
- */
- case function_usint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- break;
-
-/****
- *USINT_TO_SINT
- */
- case function_usint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_sint*/
- break;
-
-/****
- *USINT_TO_INT
- */
- case function_usint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_int*/
- break;
-
-/****
- *USINT_TO_DINT
- */
- case function_usint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dint*/
- break;
-
-/****
- *USINT_TO_LINT
- */
- case function_usint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lint*/
- break;
-
-/****
- *USINT_TO_UINT
- */
- case function_usint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_uint*/
- break;
-
-/****
- *USINT_TO_UDINT
- */
- case function_usint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_udint*/
- break;
-
-/****
- *USINT_TO_ULINT
- */
- case function_usint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- break;
-
-/****
- *USINT_TO_REAL
- */
- case function_usint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_real*/
- break;
-
-/****
- *USINT_TO_LREAL
- */
- case function_usint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- break;
-
-/****
- *USINT_TO_TIME
- */
- case function_usint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- break;
-
-/****
- *USINT_TO_DATE
- */
- case function_usint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_date*/
- break;
-
-/****
- *USINT_TO_TOD
- */
- case function_usint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_tod*/
- break;
-
-/****
- *USINT_TO_DT
- */
- case function_usint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- break;
-
-/****
- *USINT_TO_STRING
- */
- case function_usint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_BYTE
- */
- case function_usint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_byte*/
- break;
-
-/****
- *USINT_TO_WORD
- */
- case function_usint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_word*/
- break;
-
-/****
- *USINT_TO_DWORD
- */
- case function_usint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dword*/
- break;
-
-/****
- *USINT_TO_LWORD
- */
- case function_usint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- break;
-
-/****
- *UINT_TO_BOOL
- */
- case function_uint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- break;
-
-/****
- *UINT_TO_SINT
- */
- case function_uint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_sint*/
- break;
-
-/****
- *UINT_TO_INT
- */
- case function_uint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_int*/
- break;
-
-/****
- *UINT_TO_DINT
- */
- case function_uint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dint*/
- break;
-
-/****
- *UINT_TO_LINT
- */
- case function_uint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lint*/
- break;
-
-/****
- *UINT_TO_USINT
- */
- case function_uint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_usint*/
- break;
-
-/****
- *UINT_TO_UDINT
- */
- case function_uint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_udint*/
- break;
-
-/****
- *UINT_TO_ULINT
- */
- case function_uint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- break;
-
-/****
- *UINT_TO_REAL
- */
- case function_uint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_real*/
- break;
-
-/****
- *UINT_TO_LREAL
- */
- case function_uint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- break;
-
-/****
- *UINT_TO_TIME
- */
- case function_uint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- break;
-
-/****
- *UINT_TO_DATE
- */
- case function_uint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_date*/
- break;
-
-/****
- *UINT_TO_TOD
- */
- case function_uint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_tod*/
- break;
-
-/****
- *UINT_TO_DT
- */
- case function_uint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- break;
-
-/****
- *UINT_TO_STRING
- */
- case function_uint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_BYTE
- */
- case function_uint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_byte*/
- break;
-
-/****
- *UINT_TO_WORD
- */
- case function_uint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_word*/
- break;
-
-/****
- *UINT_TO_DWORD
- */
- case function_uint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dword*/
- break;
-
-/****
- *UINT_TO_LWORD
- */
- case function_uint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- break;
-
-/****
- *UDINT_TO_BOOL
- */
- case function_udint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- break;
-
-/****
- *UDINT_TO_SINT
- */
- case function_udint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_sint*/
- break;
-
-/****
- *UDINT_TO_INT
- */
- case function_udint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_int*/
- break;
-
-/****
- *UDINT_TO_DINT
- */
- case function_udint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dint*/
- break;
-
-/****
- *UDINT_TO_LINT
- */
- case function_udint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lint*/
- break;
-
-/****
- *UDINT_TO_USINT
- */
- case function_udint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_usint*/
- break;
-
-/****
- *UDINT_TO_UINT
- */
- case function_udint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_uint*/
- break;
-
-/****
- *UDINT_TO_ULINT
- */
- case function_udint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- break;
-
-/****
- *UDINT_TO_REAL
- */
- case function_udint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_real*/
- break;
-
-/****
- *UDINT_TO_LREAL
- */
- case function_udint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- break;
-
-/****
- *UDINT_TO_TIME
- */
- case function_udint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- break;
-
-/****
- *UDINT_TO_DATE
- */
- case function_udint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_date*/
- break;
-
-/****
- *UDINT_TO_TOD
- */
- case function_udint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_tod*/
- break;
-
-/****
- *UDINT_TO_DT
- */
- case function_udint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- break;
-
-/****
- *UDINT_TO_STRING
- */
- case function_udint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_BYTE
- */
- case function_udint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_byte*/
- break;
-
-/****
- *UDINT_TO_WORD
- */
- case function_udint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_word*/
- break;
-
-/****
- *UDINT_TO_DWORD
- */
- case function_udint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dword*/
- break;
-
-/****
- *UDINT_TO_LWORD
- */
- case function_udint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- break;
-
-/****
- *ULINT_TO_BOOL
- */
- case function_ulint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- break;
-
-/****
- *ULINT_TO_SINT
- */
- case function_ulint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_sint*/
- break;
-
-/****
- *ULINT_TO_INT
- */
- case function_ulint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_int*/
- break;
-
-/****
- *ULINT_TO_DINT
- */
- case function_ulint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dint*/
- break;
-
-/****
- *ULINT_TO_LINT
- */
- case function_ulint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lint*/
- break;
-
-/****
- *ULINT_TO_USINT
- */
- case function_ulint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_usint*/
- break;
-
-/****
- *ULINT_TO_UINT
- */
- case function_ulint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_uint*/
- break;
-
-/****
- *ULINT_TO_UDINT
- */
- case function_ulint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- break;
-
-/****
- *ULINT_TO_REAL
- */
- case function_ulint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_real*/
- break;
-
-/****
- *ULINT_TO_LREAL
- */
- case function_ulint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- break;
-
-/****
- *ULINT_TO_TIME
- */
- case function_ulint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- break;
-
-/****
- *ULINT_TO_DATE
- */
- case function_ulint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_date*/
- break;
-
-/****
- *ULINT_TO_TOD
- */
- case function_ulint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_tod*/
- break;
-
-/****
- *ULINT_TO_DT
- */
- case function_ulint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- break;
-
-/****
- *ULINT_TO_STRING
- */
- case function_ulint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_BYTE
- */
- case function_ulint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_byte*/
- break;
-
-/****
- *ULINT_TO_WORD
- */
- case function_ulint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_word*/
- break;
-
-/****
- *ULINT_TO_DWORD
- */
- case function_ulint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dword*/
- break;
-
-/****
- *ULINT_TO_LWORD
- */
- case function_ulint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- break;
-
-/****
- *REAL_TO_BOOL
- */
- case function_real_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_bool*/
- break;
-
-/****
- *REAL_TO_SINT
- */
- case function_real_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_sint*/
- break;
-
-/****
- *REAL_TO_INT
- */
- case function_real_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_int*/
- break;
-
-/****
- *REAL_TO_DINT
- */
- case function_real_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dint*/
- break;
-
-/****
- *REAL_TO_LINT
- */
- case function_real_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lint*/
- break;
-
-/****
- *REAL_TO_USINT
- */
- case function_real_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_usint*/
- break;
-
-/****
- *REAL_TO_UINT
- */
- case function_real_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_uint*/
- break;
-
-/****
- *REAL_TO_UDINT
- */
- case function_real_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_udint*/
- break;
-
-/****
- *REAL_TO_ULINT
- */
- case function_real_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_ulint*/
- break;
-
-/****
- *REAL_TO_LREAL
- */
- case function_real_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lreal*/
- break;
-
-/****
- *REAL_TO_TIME
- */
- case function_real_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_time*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_date*/
- break;
-
-/****
- *REAL_TO_TOD
- */
- case function_real_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_tod*/
- break;
-
-/****
- *REAL_TO_DT
- */
- case function_real_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dt*/
- break;
-
-/****
- *REAL_TO_STRING
- */
- case function_real_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_string*/
- break;
-
-/****
- *REAL_TO_BYTE
- */
- case function_real_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_byte*/
- break;
-
-/****
- *REAL_TO_WORD
- */
- case function_real_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_word*/
- break;
-
-/****
- *REAL_TO_DWORD
- */
- case function_real_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dword*/
- break;
-
-/****
- *REAL_TO_LWORD
- */
- case function_real_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lword*/
- break;
-
-/****
- *LREAL_TO_BOOL
- */
- case function_lreal_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_bool*/
- break;
-
-/****
- *LREAL_TO_SINT
- */
- case function_lreal_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_sint*/
- break;
-
-/****
- *LREAL_TO_INT
- */
- case function_lreal_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_int*/
- break;
-
-/****
- *LREAL_TO_DINT
- */
- case function_lreal_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dint*/
- break;
-
-/****
- *LREAL_TO_LINT
- */
- case function_lreal_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lint*/
- break;
-
-/****
- *LREAL_TO_USINT
- */
- case function_lreal_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_usint*/
- break;
-
-/****
- *LREAL_TO_UINT
- */
- case function_lreal_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_uint*/
- break;
-
-/****
- *LREAL_TO_UDINT
- */
- case function_lreal_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_udint*/
- break;
-
-/****
- *LREAL_TO_ULINT
- */
- case function_lreal_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_ulint*/
- break;
-
-/****
- *LREAL_TO_REAL
- */
- case function_lreal_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_real*/
- break;
-
-/****
- *LREAL_TO_TIME
- */
- case function_lreal_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_time*/
- break;
-
-/****
- *LREAL_TO_DATE
- */
- case function_lreal_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_date*/
- break;
-
-/****
- *LREAL_TO_TOD
- */
- case function_lreal_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_tod*/
- break;
-
-/****
- *LREAL_TO_DT
- */
- case function_lreal_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- break;
-
-/****
- *LREAL_TO_STRING
- */
- case function_lreal_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_BYTE
- */
- case function_lreal_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_byte*/
- break;
-
-/****
- *LREAL_TO_WORD
- */
- case function_lreal_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_word*/
- break;
-
-/****
- *LREAL_TO_DWORD
- */
- case function_lreal_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dword*/
- break;
-
-/****
- *LREAL_TO_LWORD
- */
- case function_lreal_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lword*/
- break;
-
-/****
- *TIME_TO_SINT
- */
- case function_time_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_sint*/
- break;
-
-/****
- *TIME_TO_INT
- */
- case function_time_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_int*/
- break;
-
-/****
- *TIME_TO_DINT
- */
- case function_time_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dint*/
- break;
-
-/****
- *TIME_TO_LINT
- */
- case function_time_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lint*/
- break;
-
-/****
- *TIME_TO_USINT
- */
- case function_time_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_usint*/
- break;
-
-/****
- *TIME_TO_UINT
- */
- case function_time_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_uint*/
- break;
-
-/****
- *TIME_TO_UDINT
- */
- case function_time_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_udint*/
- break;
-
-/****
- *TIME_TO_ULINT
- */
- case function_time_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_REAL
- */
- case function_time_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_real*/
- break;
-
-/****
- *TIME_TO_LREAL
- */
- case function_time_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- break;
-
-/****
- *TIME_TO_STRING
- */
- case function_time_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_BYTE
- */
- case function_time_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_byte*/
- break;
-
-/****
- *TIME_TO_WORD
- */
- case function_time_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_word*/
- break;
-
-/****
- *TIME_TO_DWORD
- */
- case function_time_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dword*/
- break;
-
-/****
- *TIME_TO_LWORD
- */
- case function_time_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- break;
-
-/****
- *DATE_TO_SINT
- */
- case function_date_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_sint*/
- break;
-
-/****
- *DATE_TO_INT
- */
- case function_date_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_int*/
- break;
-
-/****
- *DATE_TO_DINT
- */
- case function_date_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dint*/
- break;
-
-/****
- *DATE_TO_LINT
- */
- case function_date_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lint*/
- break;
-
-/****
- *DATE_TO_USINT
- */
- case function_date_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_usint*/
- break;
-
-/****
- *DATE_TO_UINT
- */
- case function_date_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_uint*/
- break;
-
-/****
- *DATE_TO_UDINT
- */
- case function_date_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_udint*/
- break;
-
-/****
- *DATE_TO_ULINT
- */
- case function_date_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_REAL
- */
- case function_date_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_real*/
- break;
-
-/****
- *DATE_TO_LREAL
- */
- case function_date_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- break;
-
-/****
- *DATE_TO_STRING
- */
- case function_date_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_BYTE
- */
- case function_date_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_byte*/
- break;
-
-/****
- *DATE_TO_WORD
- */
- case function_date_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_word*/
- break;
-
-/****
- *DATE_TO_DWORD
- */
- case function_date_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dword*/
- break;
-
-/****
- *DATE_TO_LWORD
- */
- case function_date_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- break;
-
-/****
- *TOD_TO_SINT
- */
- case function_tod_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_sint*/
- break;
-
-/****
- *TOD_TO_INT
- */
- case function_tod_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_int*/
- break;
-
-/****
- *TOD_TO_DINT
- */
- case function_tod_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dint*/
- break;
-
-/****
- *TOD_TO_LINT
- */
- case function_tod_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lint*/
- break;
-
-/****
- *TOD_TO_USINT
- */
- case function_tod_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_usint*/
- break;
-
-/****
- *TOD_TO_UINT
- */
- case function_tod_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_uint*/
- break;
-
-/****
- *TOD_TO_UDINT
- */
- case function_tod_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_udint*/
- break;
-
-/****
- *TOD_TO_ULINT
- */
- case function_tod_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_REAL
- */
- case function_tod_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_real*/
- break;
-
-/****
- *TOD_TO_LREAL
- */
- case function_tod_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- break;
-
-/****
- *TOD_TO_STRING
- */
- case function_tod_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_BYTE
- */
- case function_tod_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_byte*/
- break;
-
-/****
- *TOD_TO_WORD
- */
- case function_tod_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_word*/
- break;
-
-/****
- *TOD_TO_DWORD
- */
- case function_tod_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dword*/
- break;
-
-/****
- *TOD_TO_LWORD
- */
- case function_tod_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- break;
-
-/****
- *DT_TO_SINT
- */
- case function_dt_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_sint*/
- break;
-
-/****
- *DT_TO_INT
- */
- case function_dt_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_int*/
- break;
-
-/****
- *DT_TO_DINT
- */
- case function_dt_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dint*/
- break;
-
-/****
- *DT_TO_LINT
- */
- case function_dt_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lint*/
- break;
-
-/****
- *DT_TO_USINT
- */
- case function_dt_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_usint*/
- break;
-
-/****
- *DT_TO_UINT
- */
- case function_dt_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_uint*/
- break;
-
-/****
- *DT_TO_UDINT
- */
- case function_dt_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_udint*/
- break;
-
-/****
- *DT_TO_ULINT
- */
- case function_dt_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_REAL
- */
- case function_dt_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_real*/
- break;
-
-/****
- *DT_TO_LREAL
- */
- case function_dt_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- break;
-
-/****
- *DT_TO_STRING
- */
- case function_dt_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_BYTE
- */
- case function_dt_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_byte*/
- break;
-
-/****
- *DT_TO_WORD
- */
- case function_dt_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_word*/
- break;
-
-/****
- *DT_TO_DWORD
- */
- case function_dt_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dword*/
- break;
-
-/****
- *DT_TO_LWORD
- */
- case function_dt_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- break;
-
-/****
- *STRING_TO_BOOL
- */
- case function_string_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- break;
-
-/****
- *STRING_TO_SINT
- */
- case function_string_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_sint*/
- break;
-
-/****
- *STRING_TO_INT
- */
- case function_string_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_int*/
- break;
-
-/****
- *STRING_TO_DINT
- */
- case function_string_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dint*/
- break;
-
-/****
- *STRING_TO_LINT
- */
- case function_string_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lint*/
- break;
-
-/****
- *STRING_TO_USINT
- */
- case function_string_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_usint*/
- break;
-
-/****
- *STRING_TO_UINT
- */
- case function_string_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_uint*/
- break;
-
-/****
- *STRING_TO_UDINT
- */
- case function_string_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_udint*/
- break;
-
-/****
- *STRING_TO_ULINT
- */
- case function_string_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- break;
-
-/****
- *STRING_TO_REAL
- */
- case function_string_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_real*/
- break;
-
-/****
- *STRING_TO_LREAL
- */
- case function_string_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- break;
-
-/****
- *STRING_TO_TIME
- */
- case function_string_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- break;
-
-/****
- *STRING_TO_DATE
- */
- case function_string_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_date*/
- break;
-
-/****
- *STRING_TO_TOD
- */
- case function_string_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_tod*/
- break;
-
-/****
- *STRING_TO_DT
- */
- case function_string_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *STRING_TO_BYTE
- */
- case function_string_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_byte*/
- break;
-
-/****
- *STRING_TO_WORD
- */
- case function_string_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_word*/
- break;
-
-/****
- *STRING_TO_DWORD
- */
- case function_string_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dword*/
- break;
-
-/****
- *STRING_TO_LWORD
- */
- case function_string_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- break;
-
-/****
- *BYTE_TO_BOOL
- */
- case function_byte_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- break;
-
-/****
- *BYTE_TO_SINT
- */
- case function_byte_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_sint*/
- break;
-
-/****
- *BYTE_TO_INT
- */
- case function_byte_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_int*/
- break;
-
-/****
- *BYTE_TO_DINT
- */
- case function_byte_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dint*/
- break;
-
-/****
- *BYTE_TO_LINT
- */
- case function_byte_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lint*/
- break;
-
-/****
- *BYTE_TO_USINT
- */
- case function_byte_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_usint*/
- break;
-
-/****
- *BYTE_TO_UINT
- */
- case function_byte_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_uint*/
- break;
-
-/****
- *BYTE_TO_UDINT
- */
- case function_byte_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_udint*/
- break;
-
-/****
- *BYTE_TO_ULINT
- */
- case function_byte_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- break;
-
-/****
- *BYTE_TO_REAL
- */
- case function_byte_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_real*/
- break;
-
-/****
- *BYTE_TO_LREAL
- */
- case function_byte_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- break;
-
-/****
- *BYTE_TO_TIME
- */
- case function_byte_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- break;
-
-/****
- *BYTE_TO_DATE
- */
- case function_byte_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_date*/
- break;
-
-/****
- *BYTE_TO_TOD
- */
- case function_byte_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_tod*/
- break;
-
-/****
- *BYTE_TO_DT
- */
- case function_byte_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- break;
-
-/****
- *BYTE_TO_STRING
- */
- case function_byte_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WORD
- */
- case function_byte_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_word*/
- break;
-
-/****
- *BYTE_TO_DWORD
- */
- case function_byte_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dword*/
- break;
-
-/****
- *BYTE_TO_LWORD
- */
- case function_byte_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- break;
-
-/****
- *WORD_TO_BOOL
- */
- case function_word_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- break;
-
-/****
- *WORD_TO_SINT
- */
- case function_word_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_sint*/
- break;
-
-/****
- *WORD_TO_INT
- */
- case function_word_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_int*/
- break;
-
-/****
- *WORD_TO_DINT
- */
- case function_word_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dint*/
- break;
-
-/****
- *WORD_TO_LINT
- */
- case function_word_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lint*/
- break;
-
-/****
- *WORD_TO_USINT
- */
- case function_word_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_usint*/
- break;
-
-/****
- *WORD_TO_UINT
- */
- case function_word_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_uint*/
- break;
-
-/****
- *WORD_TO_UDINT
- */
- case function_word_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_udint*/
- break;
-
-/****
- *WORD_TO_ULINT
- */
- case function_word_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- break;
-
-/****
- *WORD_TO_REAL
- */
- case function_word_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_real*/
- break;
-
-/****
- *WORD_TO_LREAL
- */
- case function_word_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- break;
-
-/****
- *WORD_TO_TIME
- */
- case function_word_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- break;
-
-/****
- *WORD_TO_DATE
- */
- case function_word_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_date*/
- break;
-
-/****
- *WORD_TO_TOD
- */
- case function_word_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_tod*/
- break;
-
-/****
- *WORD_TO_DT
- */
- case function_word_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- break;
-
-/****
- *WORD_TO_STRING
- */
- case function_word_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_BYTE
- */
- case function_word_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_byte*/
- break;
-
-/****
- *WORD_TO_DWORD
- */
- case function_word_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dword*/
- break;
-
-/****
- *WORD_TO_LWORD
- */
- case function_word_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- break;
-
-/****
- *DWORD_TO_BOOL
- */
- case function_dword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- break;
-
-/****
- *DWORD_TO_SINT
- */
- case function_dword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_sint*/
- break;
-
-/****
- *DWORD_TO_INT
- */
- case function_dword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_int*/
- break;
-
-/****
- *DWORD_TO_DINT
- */
- case function_dword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dint*/
- break;
-
-/****
- *DWORD_TO_LINT
- */
- case function_dword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lint*/
- break;
-
-/****
- *DWORD_TO_USINT
- */
- case function_dword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_usint*/
- break;
-
-/****
- *DWORD_TO_UINT
- */
- case function_dword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_uint*/
- break;
-
-/****
- *DWORD_TO_UDINT
- */
- case function_dword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_udint*/
- break;
-
-/****
- *DWORD_TO_ULINT
- */
- case function_dword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- break;
-
-/****
- *DWORD_TO_REAL
- */
- case function_dword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_real*/
- break;
-
-/****
- *DWORD_TO_LREAL
- */
- case function_dword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- break;
-
-/****
- *DWORD_TO_TIME
- */
- case function_dword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- break;
-
-/****
- *DWORD_TO_DATE
- */
- case function_dword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_date*/
- break;
-
-/****
- *DWORD_TO_TOD
- */
- case function_dword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_tod*/
- break;
-
-/****
- *DWORD_TO_DT
- */
- case function_dword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- break;
-
-/****
- *DWORD_TO_STRING
- */
- case function_dword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_BYTE
- */
- case function_dword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_byte*/
- break;
-
-/****
- *DWORD_TO_WORD
- */
- case function_dword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_word*/
- break;
-
-/****
- *DWORD_TO_LWORD
- */
- case function_dword_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- break;
-
-/****
- *LWORD_TO_BOOL
- */
- case function_lword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- break;
-
-/****
- *LWORD_TO_SINT
- */
- case function_lword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_sint*/
- break;
-
-/****
- *LWORD_TO_INT
- */
- case function_lword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_int*/
- break;
-
-/****
- *LWORD_TO_DINT
- */
- case function_lword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dint*/
- break;
-
-/****
- *LWORD_TO_LINT
- */
- case function_lword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lint*/
- break;
-
-/****
- *LWORD_TO_USINT
- */
- case function_lword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_usint*/
- break;
-
-/****
- *LWORD_TO_UINT
- */
- case function_lword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_uint*/
- break;
-
-/****
- *LWORD_TO_UDINT
- */
- case function_lword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_udint*/
- break;
-
-/****
- *LWORD_TO_ULINT
- */
- case function_lword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- break;
-
-/****
- *LWORD_TO_REAL
- */
- case function_lword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_real*/
- break;
-
-/****
- *LWORD_TO_LREAL
- */
- case function_lword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- break;
-
-/****
- *LWORD_TO_TIME
- */
- case function_lword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- break;
-
-/****
- *LWORD_TO_DATE
- */
- case function_lword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_date*/
- break;
-
-/****
- *LWORD_TO_TOD
- */
- case function_lword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_tod*/
- break;
-
-/****
- *LWORD_TO_DT
- */
- case function_lword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- break;
-
-/****
- *LWORD_TO_STRING
- */
- case function_lword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_BYTE
- */
- case function_lword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_byte*/
- break;
-
-/****
- *LWORD_TO_WORD
- */
- case function_lword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_word*/
- break;
-
-/****
- *LWORD_TO_DWORD
- */
- case function_lword_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- break;
-
-/****
- *TRUNC
- */
- case function_trunc :
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_date*/
+ break;
+
+/****
+ *ABS
+ */
+ case function_abs :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(search_expression_type->is_num_type(IN_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = IN_type_symbol;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_abs*/
+ break;
+
+/****
+ *SQRT
+ */
+ case function_sqrt :
{
symbol_c *last_type_symbol = NULL;
@@ -23682,296 +24840,22 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_trunc*/
- break;
-
-/****
- *BCD_TO_USINT
- */
- case function_bcd_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_usint*/
- break;
-
-/****
- *BCD_TO_UINT
- */
- case function_bcd_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_uint*/
- break;
-
-/****
- *BCD_TO_UDINT
- */
- case function_bcd_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_udint*/
- break;
-
-/****
- *BCD_TO_ULINT
- */
- case function_bcd_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_ulint*/
- break;
-
-/****
- *USINT_TO_BCD
- */
- case function_usint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bcd*/
- break;
-
-/****
- *UINT_TO_BCD
- */
- case function_uint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bcd*/
- break;
-
-/****
- *UDINT_TO_BCD
- */
- case function_udint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bcd*/
- break;
-
-/****
- *ULINT_TO_BCD
- */
- case function_ulint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bcd*/
- break;
-
-/****
- *DATE_AND_TIME_TO_TIME_OF_DAY
- */
- case function_date_and_time_to_time_of_day :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_time_of_day*/
- break;
-
-/****
- *DATE_AND_TIME_TO_DATE
- */
- case function_date_and_time_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_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))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_date*/
- break;
-
-/****
- *ABS
- */
- case function_abs :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(search_expression_type->is_num_type(IN_type_symbol))
- {
-
symbol_c * return_type_symbol = IN_type_symbol;
return return_type_symbol;
}
- ERROR;
- }
-
- }/*function_abs*/
- break;
-
-/****
- *SQRT
- */
- case function_sqrt :
+
+ ERROR;
+ }
+
+ }/*function_sqrt*/
+ break;
+
+/****
+ *LN
+ */
+ case function_ln :
{
symbol_c *last_type_symbol = NULL;
@@ -23987,16 +24871,17 @@
}
- ERROR;
- }
-
- }/*function_sqrt*/
- break;
-
-/****
- *LN
- */
- case function_ln :
+
+ ERROR;
+ }
+
+ }/*function_ln*/
+ break;
+
+/****
+ *LOG
+ */
+ case function_log :
{
symbol_c *last_type_symbol = NULL;
@@ -24012,16 +24897,17 @@
}
- ERROR;
- }
-
- }/*function_ln*/
- break;
-
-/****
- *LOG
- */
- case function_log :
+
+ ERROR;
+ }
+
+ }/*function_log*/
+ break;
+
+/****
+ *EXP
+ */
+ case function_exp :
{
symbol_c *last_type_symbol = NULL;
@@ -24037,16 +24923,17 @@
}
- ERROR;
- }
-
- }/*function_log*/
- break;
-
-/****
- *EXP
- */
- case function_exp :
+
+ ERROR;
+ }
+
+ }/*function_exp*/
+ break;
+
+/****
+ *SIN
+ */
+ case function_sin :
{
symbol_c *last_type_symbol = NULL;
@@ -24062,16 +24949,17 @@
}
- ERROR;
- }
-
- }/*function_exp*/
- break;
-
-/****
- *SIN
- */
- case function_sin :
+
+ ERROR;
+ }
+
+ }/*function_sin*/
+ break;
+
+/****
+ *COS
+ */
+ case function_cos :
{
symbol_c *last_type_symbol = NULL;
@@ -24087,16 +24975,17 @@
}
- ERROR;
- }
-
- }/*function_sin*/
- break;
-
-/****
- *COS
- */
- case function_cos :
+
+ ERROR;
+ }
+
+ }/*function_cos*/
+ break;
+
+/****
+ *TAN
+ */
+ case function_tan :
{
symbol_c *last_type_symbol = NULL;
@@ -24112,16 +25001,17 @@
}
- ERROR;
- }
-
- }/*function_cos*/
- break;
-
-/****
- *TAN
- */
- case function_tan :
+
+ ERROR;
+ }
+
+ }/*function_tan*/
+ break;
+
+/****
+ *ASIN
+ */
+ case function_asin :
{
symbol_c *last_type_symbol = NULL;
@@ -24137,16 +25027,17 @@
}
- ERROR;
- }
-
- }/*function_tan*/
- break;
-
-/****
- *ASIN
- */
- case function_asin :
+
+ ERROR;
+ }
+
+ }/*function_asin*/
+ break;
+
+/****
+ *ACOS
+ */
+ case function_acos :
{
symbol_c *last_type_symbol = NULL;
@@ -24162,16 +25053,17 @@
}
- ERROR;
- }
-
- }/*function_asin*/
- break;
-
-/****
- *ACOS
- */
- case function_acos :
+
+ ERROR;
+ }
+
+ }/*function_acos*/
+ break;
+
+/****
+ *ATAN
+ */
+ case function_atan :
{
symbol_c *last_type_symbol = NULL;
@@ -24187,30 +25079,6 @@
}
- ERROR;
- }
-
- }/*function_acos*/
- break;
-
-/****
- *ATAN
- */
- case function_atan :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(search_expression_type->is_real_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = IN_type_symbol;
- return return_type_symbol;
-
- }
ERROR;
}
@@ -24251,6 +25119,7 @@
}
+
ERROR;
}
@@ -24278,6 +25147,7 @@
}
+
ERROR;
}
@@ -24305,6 +25175,7 @@
}
+
ERROR;
}
@@ -24332,11 +25203,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24376,6 +25249,7 @@
}
+
ERROR;
}
@@ -24403,11 +25277,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24447,6 +25323,7 @@
}
+
ERROR;
}
@@ -24474,6 +25351,7 @@
}
+
ERROR;
}
@@ -24509,6 +25387,7 @@
}
+
ERROR;
}
@@ -24544,6 +25423,7 @@
}
+
ERROR;
}
@@ -24571,11 +25451,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24615,6 +25497,7 @@
}
+
ERROR;
}
@@ -24642,11 +25525,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24686,11 +25571,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24730,11 +25617,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24760,6 +25649,7 @@
}
+
ERROR;
}
@@ -24799,11 +25689,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24843,11 +25735,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24887,11 +25781,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24931,11 +25827,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -24975,11 +25873,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25019,11 +25919,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25063,11 +25965,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25093,6 +25997,7 @@
}
+
ERROR;
}
@@ -25146,16 +26051,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25195,11 +26103,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25239,11 +26149,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25297,16 +26209,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25360,16 +26275,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25409,11 +26327,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25453,11 +26373,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25497,11 +26419,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25541,11 +26465,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25585,11 +26511,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25629,11 +26557,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25659,6 +26589,7 @@
}
+
ERROR;
}
@@ -25698,11 +26629,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25742,11 +26675,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25800,16 +26735,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25849,6 +26787,7 @@
}
+
ERROR;
}
@@ -25876,11 +26815,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25934,16 +26875,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -25997,16 +26941,19 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -26074,21 +27021,25 @@
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -26128,11 +27079,13 @@
}
+
ERROR;
}
}
+
ERROR;
}
--- a/stage4/generate_c/st_code_gen.c Wed Oct 15 15:38:58 2008 +0200
+++ b/stage4/generate_c/st_code_gen.c Fri Oct 24 16:37:46 2008 +0200
@@ -1,5 +1,5 @@
/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the
@@ -21,15 +21,11065 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
switch(current_function_type){
/****
+ *REAL_TO_SINT
+ */
+ case function_real_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_sint*/
+ break;
+
+/****
+ *REAL_TO_LINT
+ */
+ case function_real_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lint*/
+ break;
+
+/****
+ *REAL_TO_DINT
+ */
+ case function_real_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dint*/
+ break;
+
+/****
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_date*/
+ break;
+
+/****
+ *REAL_TO_DWORD
+ */
+ case function_real_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dword*/
+ break;
+
+/****
+ *REAL_TO_DT
+ */
+ case function_real_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ break;
+
+/****
+ *REAL_TO_TOD
+ */
+ case function_real_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_tod*/
+ break;
+
+/****
+ *REAL_TO_UDINT
+ */
+ case function_real_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_udint*/
+ break;
+
+/****
+ *REAL_TO_WORD
+ */
+ case function_real_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_word*/
+ break;
+
+/****
+ *REAL_TO_STRING
+ */
+ case function_real_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_string*/
+ break;
+
+/****
+ *REAL_TO_LWORD
+ */
+ case function_real_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lword*/
+ break;
+
+/****
+ *REAL_TO_UINT
+ */
+ case function_real_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_uint*/
+ break;
+
+/****
+ *REAL_TO_LREAL
+ */
+ case function_real_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_lreal*/
+ break;
+
+/****
+ *REAL_TO_BYTE
+ */
+ case function_real_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_byte*/
+ break;
+
+/****
+ *REAL_TO_USINT
+ */
+ case function_real_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_usint*/
+ break;
+
+/****
+ *REAL_TO_ULINT
+ */
+ case function_real_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_ulint*/
+ break;
+
+/****
+ *REAL_TO_BOOL
+ */
+ case function_real_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_bool*/
+ break;
+
+/****
+ *REAL_TO_TIME
+ */
+ case function_real_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_time*/
+ break;
+
+/****
+ *REAL_TO_INT
+ */
+ case function_real_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_real_to_int*/
+ break;
+
+/****
+ *SINT_TO_REAL
+ */
+ case function_sint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_real*/
+ break;
+
+/****
+ *SINT_TO_LINT
+ */
+ case function_sint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lint*/
+ break;
+
+/****
+ *SINT_TO_DINT
+ */
+ case function_sint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dint*/
+ break;
+
+/****
+ *SINT_TO_DATE
+ */
+ case function_sint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_date*/
+ break;
+
+/****
+ *SINT_TO_DWORD
+ */
+ case function_sint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dword*/
+ break;
+
+/****
+ *SINT_TO_DT
+ */
+ case function_sint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ break;
+
+/****
+ *SINT_TO_TOD
+ */
+ case function_sint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_tod*/
+ break;
+
+/****
+ *SINT_TO_UDINT
+ */
+ case function_sint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_udint*/
+ break;
+
+/****
+ *SINT_TO_WORD
+ */
+ case function_sint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_word*/
+ break;
+
+/****
+ *SINT_TO_STRING
+ */
+ case function_sint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ break;
+
+/****
+ *SINT_TO_LWORD
+ */
+ case function_sint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ break;
+
+/****
+ *SINT_TO_UINT
+ */
+ case function_sint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_uint*/
+ break;
+
+/****
+ *SINT_TO_LREAL
+ */
+ case function_sint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ break;
+
+/****
+ *SINT_TO_BYTE
+ */
+ case function_sint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_byte*/
+ break;
+
+/****
+ *SINT_TO_USINT
+ */
+ case function_sint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_usint*/
+ break;
+
+/****
+ *SINT_TO_ULINT
+ */
+ case function_sint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ break;
+
+/****
+ *SINT_TO_BOOL
+ */
+ case function_sint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ break;
+
+/****
+ *SINT_TO_TIME
+ */
+ case function_sint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ break;
+
+/****
+ *SINT_TO_INT
+ */
+ case function_sint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sint_to_int*/
+ break;
+
+/****
+ *LINT_TO_REAL
+ */
+ case function_lint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_real*/
+ break;
+
+/****
+ *LINT_TO_SINT
+ */
+ case function_lint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_sint*/
+ break;
+
+/****
+ *LINT_TO_DINT
+ */
+ case function_lint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dint*/
+ break;
+
+/****
+ *LINT_TO_DATE
+ */
+ case function_lint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_date*/
+ break;
+
+/****
+ *LINT_TO_DWORD
+ */
+ case function_lint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dword*/
+ break;
+
+/****
+ *LINT_TO_DT
+ */
+ case function_lint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ break;
+
+/****
+ *LINT_TO_TOD
+ */
+ case function_lint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_tod*/
+ break;
+
+/****
+ *LINT_TO_UDINT
+ */
+ case function_lint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_udint*/
+ break;
+
+/****
+ *LINT_TO_WORD
+ */
+ case function_lint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_word*/
+ break;
+
+/****
+ *LINT_TO_STRING
+ */
+ case function_lint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ break;
+
+/****
+ *LINT_TO_LWORD
+ */
+ case function_lint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ break;
+
+/****
+ *LINT_TO_UINT
+ */
+ case function_lint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_uint*/
+ break;
+
+/****
+ *LINT_TO_LREAL
+ */
+ case function_lint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ break;
+
+/****
+ *LINT_TO_BYTE
+ */
+ case function_lint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_byte*/
+ break;
+
+/****
+ *LINT_TO_USINT
+ */
+ case function_lint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_usint*/
+ break;
+
+/****
+ *LINT_TO_ULINT
+ */
+ case function_lint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ break;
+
+/****
+ *LINT_TO_BOOL
+ */
+ case function_lint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ break;
+
+/****
+ *LINT_TO_TIME
+ */
+ case function_lint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ break;
+
+/****
+ *LINT_TO_INT
+ */
+ case function_lint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lint_to_int*/
+ break;
+
+/****
+ *DINT_TO_REAL
+ */
+ case function_dint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_real*/
+ break;
+
+/****
+ *DINT_TO_SINT
+ */
+ case function_dint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_sint*/
+ break;
+
+/****
+ *DINT_TO_LINT
+ */
+ case function_dint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lint*/
+ break;
+
+/****
+ *DINT_TO_DATE
+ */
+ case function_dint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_date*/
+ break;
+
+/****
+ *DINT_TO_DWORD
+ */
+ case function_dint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dword*/
+ break;
+
+/****
+ *DINT_TO_DT
+ */
+ case function_dint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ break;
+
+/****
+ *DINT_TO_TOD
+ */
+ case function_dint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_tod*/
+ break;
+
+/****
+ *DINT_TO_UDINT
+ */
+ case function_dint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_udint*/
+ break;
+
+/****
+ *DINT_TO_WORD
+ */
+ case function_dint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_word*/
+ break;
+
+/****
+ *DINT_TO_STRING
+ */
+ case function_dint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ break;
+
+/****
+ *DINT_TO_LWORD
+ */
+ case function_dint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ break;
+
+/****
+ *DINT_TO_UINT
+ */
+ case function_dint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_uint*/
+ break;
+
+/****
+ *DINT_TO_LREAL
+ */
+ case function_dint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ break;
+
+/****
+ *DINT_TO_BYTE
+ */
+ case function_dint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_byte*/
+ break;
+
+/****
+ *DINT_TO_USINT
+ */
+ case function_dint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_usint*/
+ break;
+
+/****
+ *DINT_TO_ULINT
+ */
+ case function_dint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ break;
+
+/****
+ *DINT_TO_BOOL
+ */
+ case function_dint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ break;
+
+/****
+ *DINT_TO_TIME
+ */
+ case function_dint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ break;
+
+/****
+ *DINT_TO_INT
+ */
+ case function_dint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dint_to_int*/
+ break;
+
+/****
+ *DATE_TO_REAL
+ */
+ case function_date_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_real*/
+ break;
+
+/****
+ *DATE_TO_SINT
+ */
+ case function_date_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_sint*/
+ break;
+
+/****
+ *DATE_TO_LINT
+ */
+ case function_date_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lint*/
+ break;
+
+/****
+ *DATE_TO_DINT
+ */
+ case function_date_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dint*/
+ break;
+
+/****
+ *DATE_TO_DWORD
+ */
+ case function_date_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_dword*/
+ break;
+
+/****
+ *DATE_TO_UDINT
+ */
+ case function_date_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_udint*/
+ break;
+
+/****
+ *DATE_TO_WORD
+ */
+ case function_date_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_word*/
+ break;
+
+/****
+ *DATE_TO_STRING
+ */
+ case function_date_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ break;
+
+/****
+ *DATE_TO_LWORD
+ */
+ case function_date_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ break;
+
+/****
+ *DATE_TO_UINT
+ */
+ case function_date_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_uint*/
+ break;
+
+/****
+ *DATE_TO_LREAL
+ */
+ case function_date_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ break;
+
+/****
+ *DATE_TO_BYTE
+ */
+ case function_date_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_byte*/
+ break;
+
+/****
+ *DATE_TO_USINT
+ */
+ case function_date_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_usint*/
+ break;
+
+/****
+ *DATE_TO_ULINT
+ */
+ case function_date_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_INT
+ */
+ case function_date_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_to_int*/
+ break;
+
+/****
+ *DWORD_TO_REAL
+ */
+ case function_dword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_real*/
+ break;
+
+/****
+ *DWORD_TO_SINT
+ */
+ case function_dword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_sint*/
+ break;
+
+/****
+ *DWORD_TO_LINT
+ */
+ case function_dword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lint*/
+ break;
+
+/****
+ *DWORD_TO_DINT
+ */
+ case function_dword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dint*/
+ break;
+
+/****
+ *DWORD_TO_DATE
+ */
+ case function_dword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_date*/
+ break;
+
+/****
+ *DWORD_TO_DT
+ */
+ case function_dword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ break;
+
+/****
+ *DWORD_TO_TOD
+ */
+ case function_dword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_tod*/
+ break;
+
+/****
+ *DWORD_TO_UDINT
+ */
+ case function_dword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_udint*/
+ break;
+
+/****
+ *DWORD_TO_WORD
+ */
+ case function_dword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_word*/
+ break;
+
+/****
+ *DWORD_TO_STRING
+ */
+ case function_dword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ break;
+
+/****
+ *DWORD_TO_LWORD
+ */
+ case function_dword_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ break;
+
+/****
+ *DWORD_TO_UINT
+ */
+ case function_dword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_uint*/
+ break;
+
+/****
+ *DWORD_TO_LREAL
+ */
+ case function_dword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ break;
+
+/****
+ *DWORD_TO_BYTE
+ */
+ case function_dword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_byte*/
+ break;
+
+/****
+ *DWORD_TO_USINT
+ */
+ case function_dword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_usint*/
+ break;
+
+/****
+ *DWORD_TO_ULINT
+ */
+ case function_dword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ break;
+
+/****
+ *DWORD_TO_BOOL
+ */
+ case function_dword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ break;
+
+/****
+ *DWORD_TO_TIME
+ */
+ case function_dword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ break;
+
+/****
+ *DWORD_TO_INT
+ */
+ case function_dword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dword_to_int*/
+ break;
+
+/****
+ *DT_TO_REAL
+ */
+ case function_dt_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_real*/
+ break;
+
+/****
+ *DT_TO_SINT
+ */
+ case function_dt_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_sint*/
+ break;
+
+/****
+ *DT_TO_LINT
+ */
+ case function_dt_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lint*/
+ break;
+
+/****
+ *DT_TO_DINT
+ */
+ case function_dt_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dint*/
+ break;
+
+/****
+ *DT_TO_DWORD
+ */
+ case function_dt_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_dword*/
+ break;
+
+/****
+ *DT_TO_UDINT
+ */
+ case function_dt_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_udint*/
+ break;
+
+/****
+ *DT_TO_WORD
+ */
+ case function_dt_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_word*/
+ break;
+
+/****
+ *DT_TO_STRING
+ */
+ case function_dt_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__dt_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_string*/
+ break;
+
+/****
+ *DT_TO_LWORD
+ */
+ case function_dt_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ break;
+
+/****
+ *DT_TO_UINT
+ */
+ case function_dt_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_uint*/
+ break;
+
+/****
+ *DT_TO_LREAL
+ */
+ case function_dt_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ break;
+
+/****
+ *DT_TO_BYTE
+ */
+ case function_dt_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_byte*/
+ break;
+
+/****
+ *DT_TO_USINT
+ */
+ case function_dt_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_usint*/
+ break;
+
+/****
+ *DT_TO_ULINT
+ */
+ case function_dt_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_INT
+ */
+ case function_dt_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_dt_to_int*/
+ break;
+
+/****
+ *TOD_TO_REAL
+ */
+ case function_tod_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_real*/
+ break;
+
+/****
+ *TOD_TO_SINT
+ */
+ case function_tod_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_sint*/
+ break;
+
+/****
+ *TOD_TO_LINT
+ */
+ case function_tod_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lint*/
+ break;
+
+/****
+ *TOD_TO_DINT
+ */
+ case function_tod_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dint*/
+ break;
+
+/****
+ *TOD_TO_DWORD
+ */
+ case function_tod_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_dword*/
+ break;
+
+/****
+ *TOD_TO_UDINT
+ */
+ case function_tod_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_udint*/
+ break;
+
+/****
+ *TOD_TO_WORD
+ */
+ case function_tod_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_word*/
+ break;
+
+/****
+ *TOD_TO_STRING
+ */
+ case function_tod_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__tod_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ break;
+
+/****
+ *TOD_TO_LWORD
+ */
+ case function_tod_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ break;
+
+/****
+ *TOD_TO_UINT
+ */
+ case function_tod_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_uint*/
+ break;
+
+/****
+ *TOD_TO_LREAL
+ */
+ case function_tod_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ break;
+
+/****
+ *TOD_TO_BYTE
+ */
+ case function_tod_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_byte*/
+ break;
+
+/****
+ *TOD_TO_USINT
+ */
+ case function_tod_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_usint*/
+ break;
+
+/****
+ *TOD_TO_ULINT
+ */
+ case function_tod_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_INT
+ */
+ case function_tod_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tod_to_int*/
+ break;
+
+/****
+ *UDINT_TO_REAL
+ */
+ case function_udint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_real*/
+ break;
+
+/****
+ *UDINT_TO_SINT
+ */
+ case function_udint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_sint*/
+ break;
+
+/****
+ *UDINT_TO_LINT
+ */
+ case function_udint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lint*/
+ break;
+
+/****
+ *UDINT_TO_DINT
+ */
+ case function_udint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dint*/
+ break;
+
+/****
+ *UDINT_TO_DATE
+ */
+ case function_udint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_date*/
+ break;
+
+/****
+ *UDINT_TO_DWORD
+ */
+ case function_udint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dword*/
+ break;
+
+/****
+ *UDINT_TO_DT
+ */
+ case function_udint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ break;
+
+/****
+ *UDINT_TO_TOD
+ */
+ case function_udint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_tod*/
+ break;
+
+/****
+ *UDINT_TO_WORD
+ */
+ case function_udint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_word*/
+ break;
+
+/****
+ *UDINT_TO_STRING
+ */
+ case function_udint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ break;
+
+/****
+ *UDINT_TO_LWORD
+ */
+ case function_udint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ break;
+
+/****
+ *UDINT_TO_UINT
+ */
+ case function_udint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_uint*/
+ break;
+
+/****
+ *UDINT_TO_LREAL
+ */
+ case function_udint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ break;
+
+/****
+ *UDINT_TO_BYTE
+ */
+ case function_udint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_byte*/
+ break;
+
+/****
+ *UDINT_TO_USINT
+ */
+ case function_udint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_ULINT
+ */
+ case function_udint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ break;
+
+/****
+ *UDINT_TO_BOOL
+ */
+ case function_udint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ break;
+
+/****
+ *UDINT_TO_TIME
+ */
+ case function_udint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ break;
+
+/****
+ *UDINT_TO_INT
+ */
+ case function_udint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_int*/
+ break;
+
+/****
+ *WORD_TO_REAL
+ */
+ case function_word_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_real*/
+ break;
+
+/****
+ *WORD_TO_SINT
+ */
+ case function_word_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_sint*/
+ break;
+
+/****
+ *WORD_TO_LINT
+ */
+ case function_word_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lint*/
+ break;
+
+/****
+ *WORD_TO_DINT
+ */
+ case function_word_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dint*/
+ break;
+
+/****
+ *WORD_TO_DATE
+ */
+ case function_word_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_date*/
+ break;
+
+/****
+ *WORD_TO_DWORD
+ */
+ case function_word_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dword*/
+ break;
+
+/****
+ *WORD_TO_DT
+ */
+ case function_word_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ break;
+
+/****
+ *WORD_TO_TOD
+ */
+ case function_word_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_tod*/
+ break;
+
+/****
+ *WORD_TO_UDINT
+ */
+ case function_word_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_udint*/
+ break;
+
+/****
+ *WORD_TO_STRING
+ */
+ case function_word_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ break;
+
+/****
+ *WORD_TO_LWORD
+ */
+ case function_word_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ break;
+
+/****
+ *WORD_TO_UINT
+ */
+ case function_word_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_uint*/
+ break;
+
+/****
+ *WORD_TO_LREAL
+ */
+ case function_word_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ break;
+
+/****
+ *WORD_TO_BYTE
+ */
+ case function_word_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_byte*/
+ break;
+
+/****
+ *WORD_TO_USINT
+ */
+ case function_word_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_usint*/
+ break;
+
+/****
+ *WORD_TO_ULINT
+ */
+ case function_word_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ break;
+
+/****
+ *WORD_TO_BOOL
+ */
+ case function_word_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ break;
+
+/****
+ *WORD_TO_TIME
+ */
+ case function_word_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ break;
+
+/****
+ *WORD_TO_INT
+ */
+ case function_word_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_word_to_int*/
+ break;
+
+/****
+ *STRING_TO_REAL
+ */
+ case function_string_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_real*/
+ break;
+
+/****
+ *STRING_TO_SINT
+ */
+ case function_string_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_sint*/
+ break;
+
+/****
+ *STRING_TO_LINT
+ */
+ case function_string_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lint*/
+ break;
+
+/****
+ *STRING_TO_DINT
+ */
+ case function_string_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dint*/
+ break;
+
+/****
+ *STRING_TO_DATE
+ */
+ case function_string_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_date*/
+ break;
+
+/****
+ *STRING_TO_DWORD
+ */
+ case function_string_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dword*/
+ break;
+
+/****
+ *STRING_TO_DT
+ */
+ case function_string_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ break;
+
+/****
+ *STRING_TO_TOD
+ */
+ case function_string_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_tod*/
+ break;
+
+/****
+ *STRING_TO_UDINT
+ */
+ case function_string_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_udint*/
+ break;
+
+/****
+ *STRING_TO_WORD
+ */
+ case function_string_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_word*/
+ break;
+
+/****
+ *STRING_TO_LWORD
+ */
+ case function_string_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ break;
+
+/****
+ *STRING_TO_UINT
+ */
+ case function_string_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_uint*/
+ break;
+
+/****
+ *STRING_TO_LREAL
+ */
+ case function_string_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ break;
+
+/****
+ *STRING_TO_BYTE
+ */
+ case function_string_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bit"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_byte*/
+ break;
+
+/****
+ *STRING_TO_USINT
+ */
+ case function_string_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_usint*/
+ break;
+
+/****
+ *STRING_TO_ULINT
+ */
+ case function_string_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ break;
+
+/****
+ *STRING_TO_BOOL
+ */
+ case function_string_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_bool"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ break;
+
+/****
+ *STRING_TO_TIME
+ */
+ case function_string_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ break;
+
+/****
+ *STRING_TO_INT
+ */
+ case function_string_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__string_to_sint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_string_to_int*/
+ break;
+
+/****
+ *LWORD_TO_REAL
+ */
+ case function_lword_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_real*/
+ break;
+
+/****
+ *LWORD_TO_SINT
+ */
+ case function_lword_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_sint*/
+ break;
+
+/****
+ *LWORD_TO_LINT
+ */
+ case function_lword_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lint*/
+ break;
+
+/****
+ *LWORD_TO_DINT
+ */
+ case function_lword_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dint*/
+ break;
+
+/****
+ *LWORD_TO_DATE
+ */
+ case function_lword_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_date*/
+ break;
+
+/****
+ *LWORD_TO_DWORD
+ */
+ case function_lword_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dword*/
+ break;
+
+/****
+ *LWORD_TO_DT
+ */
+ case function_lword_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ break;
+
+/****
+ *LWORD_TO_TOD
+ */
+ case function_lword_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_tod*/
+ break;
+
+/****
+ *LWORD_TO_UDINT
+ */
+ case function_lword_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_udint*/
+ break;
+
+/****
+ *LWORD_TO_WORD
+ */
+ case function_lword_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_word*/
+ break;
+
+/****
+ *LWORD_TO_STRING
+ */
+ case function_lword_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ break;
+
+/****
+ *LWORD_TO_UINT
+ */
+ case function_lword_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_uint*/
+ break;
+
+/****
+ *LWORD_TO_LREAL
+ */
+ case function_lword_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ break;
+
+/****
+ *LWORD_TO_BYTE
+ */
+ case function_lword_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_byte*/
+ break;
+
+/****
+ *LWORD_TO_USINT
+ */
+ case function_lword_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_usint*/
+ break;
+
+/****
+ *LWORD_TO_ULINT
+ */
+ case function_lword_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ break;
+
+/****
+ *LWORD_TO_BOOL
+ */
+ case function_lword_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ break;
+
+/****
+ *LWORD_TO_TIME
+ */
+ case function_lword_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ break;
+
+/****
+ *LWORD_TO_INT
+ */
+ case function_lword_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lword_to_int*/
+ break;
+
+/****
+ *UINT_TO_REAL
+ */
+ case function_uint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_real*/
+ break;
+
+/****
+ *UINT_TO_SINT
+ */
+ case function_uint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_sint*/
+ break;
+
+/****
+ *UINT_TO_LINT
+ */
+ case function_uint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lint*/
+ break;
+
+/****
+ *UINT_TO_DINT
+ */
+ case function_uint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dint*/
+ break;
+
+/****
+ *UINT_TO_DATE
+ */
+ case function_uint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_date*/
+ break;
+
+/****
+ *UINT_TO_DWORD
+ */
+ case function_uint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dword*/
+ break;
+
+/****
+ *UINT_TO_DT
+ */
+ case function_uint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ break;
+
+/****
+ *UINT_TO_TOD
+ */
+ case function_uint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_tod*/
+ break;
+
+/****
+ *UINT_TO_UDINT
+ */
+ case function_uint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_udint*/
+ break;
+
+/****
+ *UINT_TO_WORD
+ */
+ case function_uint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_word*/
+ break;
+
+/****
+ *UINT_TO_STRING
+ */
+ case function_uint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ break;
+
+/****
+ *UINT_TO_LWORD
+ */
+ case function_uint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ break;
+
+/****
+ *UINT_TO_LREAL
+ */
+ case function_uint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ break;
+
+/****
+ *UINT_TO_BYTE
+ */
+ case function_uint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_byte*/
+ break;
+
+/****
+ *UINT_TO_USINT
+ */
+ case function_uint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_usint*/
+ break;
+
+/****
+ *UINT_TO_ULINT
+ */
+ case function_uint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ break;
+
+/****
+ *UINT_TO_BOOL
+ */
+ case function_uint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ break;
+
+/****
+ *UINT_TO_TIME
+ */
+ case function_uint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ break;
+
+/****
+ *UINT_TO_INT
+ */
+ case function_uint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_int*/
+ break;
+
+/****
+ *LREAL_TO_REAL
+ */
+ case function_lreal_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_real*/
+ break;
+
+/****
+ *LREAL_TO_SINT
+ */
+ case function_lreal_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_sint*/
+ break;
+
+/****
+ *LREAL_TO_LINT
+ */
+ case function_lreal_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lint*/
+ break;
+
+/****
+ *LREAL_TO_DINT
+ */
+ case function_lreal_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dint*/
+ break;
+
+/****
+ *LREAL_TO_DATE
+ */
+ case function_lreal_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_date*/
+ break;
+
+/****
+ *LREAL_TO_DWORD
+ */
+ case function_lreal_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dword*/
+ break;
+
+/****
+ *LREAL_TO_DT
+ */
+ case function_lreal_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ break;
+
+/****
+ *LREAL_TO_TOD
+ */
+ case function_lreal_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_tod*/
+ break;
+
+/****
+ *LREAL_TO_UDINT
+ */
+ case function_lreal_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_udint*/
+ break;
+
+/****
+ *LREAL_TO_WORD
+ */
+ case function_lreal_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_word*/
+ break;
+
+/****
+ *LREAL_TO_STRING
+ */
+ case function_lreal_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ break;
+
+/****
+ *LREAL_TO_LWORD
+ */
+ case function_lreal_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ break;
+
+/****
+ *LREAL_TO_UINT
+ */
+ case function_lreal_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_uint*/
+ break;
+
+/****
+ *LREAL_TO_BYTE
+ */
+ case function_lreal_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_byte*/
+ break;
+
+/****
+ *LREAL_TO_USINT
+ */
+ case function_lreal_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_usint*/
+ break;
+
+/****
+ *LREAL_TO_ULINT
+ */
+ case function_lreal_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ break;
+
+/****
+ *LREAL_TO_BOOL
+ */
+ case function_lreal_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ break;
+
+/****
+ *LREAL_TO_TIME
+ */
+ case function_lreal_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__real_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ break;
+
+/****
+ *LREAL_TO_INT
+ */
+ case function_lreal_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_int*/
+ break;
+
+/****
+ *BYTE_TO_REAL
+ */
+ case function_byte_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_real*/
+ break;
+
+/****
+ *BYTE_TO_SINT
+ */
+ case function_byte_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_sint*/
+ break;
+
+/****
+ *BYTE_TO_LINT
+ */
+ case function_byte_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lint*/
+ break;
+
+/****
+ *BYTE_TO_DINT
+ */
+ case function_byte_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dint*/
+ break;
+
+/****
+ *BYTE_TO_DATE
+ */
+ case function_byte_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_date*/
+ break;
+
+/****
+ *BYTE_TO_DWORD
+ */
+ case function_byte_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dword*/
+ break;
+
+/****
+ *BYTE_TO_DT
+ */
+ case function_byte_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ break;
+
+/****
+ *BYTE_TO_TOD
+ */
+ case function_byte_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_tod*/
+ break;
+
+/****
+ *BYTE_TO_UDINT
+ */
+ case function_byte_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_udint*/
+ break;
+
+/****
+ *BYTE_TO_WORD
+ */
+ case function_byte_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_word*/
+ break;
+
+/****
+ *BYTE_TO_STRING
+ */
+ case function_byte_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bit_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ break;
+
+/****
+ *BYTE_TO_LWORD
+ */
+ case function_byte_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ break;
+
+/****
+ *BYTE_TO_UINT
+ */
+ case function_byte_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_uint*/
+ break;
+
+/****
+ *BYTE_TO_LREAL
+ */
+ case function_byte_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ break;
+
+/****
+ *BYTE_TO_USINT
+ */
+ case function_byte_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_usint*/
+ break;
+
+/****
+ *BYTE_TO_ULINT
+ */
+ case function_byte_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ break;
+
+/****
+ *BYTE_TO_BOOL
+ */
+ case function_byte_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_bool*/
+ break;
+
+/****
+ *BYTE_TO_TIME
+ */
+ case function_byte_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ break;
+
+/****
+ *BYTE_TO_INT
+ */
+ case function_byte_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_byte_to_int*/
+ break;
+
+/****
+ *USINT_TO_REAL
+ */
+ case function_usint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_real*/
+ break;
+
+/****
+ *USINT_TO_SINT
+ */
+ case function_usint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_sint*/
+ break;
+
+/****
+ *USINT_TO_LINT
+ */
+ case function_usint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lint*/
+ break;
+
+/****
+ *USINT_TO_DINT
+ */
+ case function_usint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dint*/
+ break;
+
+/****
+ *USINT_TO_DATE
+ */
+ case function_usint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_date*/
+ break;
+
+/****
+ *USINT_TO_DWORD
+ */
+ case function_usint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dword*/
+ break;
+
+/****
+ *USINT_TO_DT
+ */
+ case function_usint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ break;
+
+/****
+ *USINT_TO_TOD
+ */
+ case function_usint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_tod*/
+ break;
+
+/****
+ *USINT_TO_UDINT
+ */
+ case function_usint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_udint*/
+ break;
+
+/****
+ *USINT_TO_WORD
+ */
+ case function_usint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_word*/
+ break;
+
+/****
+ *USINT_TO_STRING
+ */
+ case function_usint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ break;
+
+/****
+ *USINT_TO_LWORD
+ */
+ case function_usint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ break;
+
+/****
+ *USINT_TO_UINT
+ */
+ case function_usint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_uint*/
+ break;
+
+/****
+ *USINT_TO_LREAL
+ */
+ case function_usint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ break;
+
+/****
+ *USINT_TO_BYTE
+ */
+ case function_usint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_byte*/
+ break;
+
+/****
+ *USINT_TO_ULINT
+ */
+ case function_usint_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ break;
+
+/****
+ *USINT_TO_BOOL
+ */
+ case function_usint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ break;
+
+/****
+ *USINT_TO_TIME
+ */
+ case function_usint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ break;
+
+/****
+ *USINT_TO_INT
+ */
+ case function_usint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_int*/
+ break;
+
+/****
+ *ULINT_TO_REAL
+ */
+ case function_ulint_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_real*/
+ break;
+
+/****
+ *ULINT_TO_SINT
+ */
+ case function_ulint_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_sint*/
+ break;
+
+/****
+ *ULINT_TO_LINT
+ */
+ case function_ulint_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lint*/
+ break;
+
+/****
+ *ULINT_TO_DINT
+ */
+ case function_ulint_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dint*/
+ break;
+
+/****
+ *ULINT_TO_DATE
+ */
+ case function_ulint_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_date*/
+ break;
+
+/****
+ *ULINT_TO_DWORD
+ */
+ case function_ulint_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dword*/
+ break;
+
+/****
+ *ULINT_TO_DT
+ */
+ case function_ulint_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ break;
+
+/****
+ *ULINT_TO_TOD
+ */
+ case function_ulint_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_tod*/
+ break;
+
+/****
+ *ULINT_TO_UDINT
+ */
+ case function_ulint_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_udint*/
+ break;
+
+/****
+ *ULINT_TO_WORD
+ */
+ case function_ulint_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_word*/
+ break;
+
+/****
+ *ULINT_TO_STRING
+ */
+ case function_ulint_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ break;
+
+/****
+ *ULINT_TO_LWORD
+ */
+ case function_ulint_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ break;
+
+/****
+ *ULINT_TO_UINT
+ */
+ case function_ulint_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_uint*/
+ break;
+
+/****
+ *ULINT_TO_LREAL
+ */
+ case function_ulint_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ break;
+
+/****
+ *ULINT_TO_BYTE
+ */
+ case function_ulint_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_byte*/
+ break;
+
+/****
+ *ULINT_TO_USINT
+ */
+ case function_ulint_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_usint*/
+ break;
+
+/****
+ *ULINT_TO_BOOL
+ */
+ case function_ulint_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ break;
+
+/****
+ *ULINT_TO_TIME
+ */
+ case function_ulint_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ break;
+
+/****
+ *ULINT_TO_INT
+ */
+ case function_ulint_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_int*/
+ break;
+
+/****
+ *BOOL_TO_REAL
+ */
+ case function_bool_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_real*/
+ break;
+
+/****
*BOOL_TO_SINT
*/
case function_bool_to_sint :
@@ -50,14 +11100,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
{
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -66,6 +11115,571 @@
break;
/****
+ *BOOL_TO_LINT
+ */
+ case function_bool_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lint*/
+ break;
+
+/****
+ *BOOL_TO_DINT
+ */
+ case function_bool_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dint*/
+ break;
+
+/****
+ *BOOL_TO_DATE
+ */
+ case function_bool_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_date*/
+ break;
+
+/****
+ *BOOL_TO_DWORD
+ */
+ case function_bool_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dword*/
+ break;
+
+/****
+ *BOOL_TO_DT
+ */
+ case function_bool_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ break;
+
+/****
+ *BOOL_TO_TOD
+ */
+ case function_bool_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_tod*/
+ break;
+
+/****
+ *BOOL_TO_UDINT
+ */
+ case function_bool_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_udint*/
+ break;
+
+/****
+ *BOOL_TO_WORD
+ */
+ case function_bool_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_word*/
+ break;
+
+/****
+ *BOOL_TO_STRING
+ */
+ case function_bool_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bool_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ break;
+
+/****
+ *BOOL_TO_LWORD
+ */
+ case function_bool_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ break;
+
+/****
+ *BOOL_TO_UINT
+ */
+ case function_bool_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_uint*/
+ break;
+
+/****
+ *BOOL_TO_LREAL
+ */
+ case function_bool_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_BYTE
+ */
+ case function_bool_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_byte*/
+ break;
+
+/****
+ *BOOL_TO_USINT
+ */
+ case function_bool_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_usint*/
+ break;
+
+/****
+ *BOOL_TO_ULINT
+ */
+ case function_bool_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_ulint*/
+ break;
+
+/****
+ *BOOL_TO_TIME
+ */
+ case function_bool_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ break;
+
+/****
*BOOL_TO_INT
*/
case function_bool_to_int :
@@ -86,14 +11700,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
{
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -102,13195 +11715,1648 @@
break;
/****
- *BOOL_TO_DINT
- */
- case function_bool_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ *TIME_TO_REAL
+ */
+ case function_time_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_real*/
+ break;
+
+/****
+ *TIME_TO_SINT
+ */
+ case function_time_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_sint*/
+ break;
+
+/****
+ *TIME_TO_LINT
+ */
+ case function_time_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lint*/
+ break;
+
+/****
+ *TIME_TO_DINT
+ */
+ case function_time_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dint*/
- break;
-
-/****
- *BOOL_TO_LINT
- */
- case function_bool_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dint*/
+ break;
+
+/****
+ *TIME_TO_DWORD
+ */
+ case function_time_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_dword*/
+ break;
+
+/****
+ *TIME_TO_UDINT
+ */
+ case function_time_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_udint*/
+ break;
+
+/****
+ *TIME_TO_WORD
+ */
+ case function_time_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_word*/
+ break;
+
+/****
+ *TIME_TO_STRING
+ */
+ case function_time_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ break;
+
+/****
+ *TIME_TO_LWORD
+ */
+ case function_time_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ break;
+
+/****
+ *TIME_TO_UINT
+ */
+ case function_time_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_uint*/
+ break;
+
+/****
+ *TIME_TO_LREAL
+ */
+ case function_time_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_real"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ break;
+
+/****
+ *TIME_TO_BYTE
+ */
+ case function_time_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_byte*/
+ break;
+
+/****
+ *TIME_TO_USINT
+ */
+ case function_time_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_usint*/
+ break;
+
+/****
+ *TIME_TO_ULINT
+ */
+ case function_time_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_INT
+ */
+ case function_time_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_to_int"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_time_to_int*/
+ break;
+
+/****
+ *INT_TO_REAL
+ */
+ case function_int_to_real :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_real*/
+ break;
+
+/****
+ *INT_TO_SINT
+ */
+ case function_int_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_sint*/
+ break;
+
+/****
+ *INT_TO_LINT
+ */
+ case function_int_to_lint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lint*/
- break;
-
-/****
- *BOOL_TO_USINT
- */
- case function_bool_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lint*/
+ break;
+
+/****
+ *INT_TO_DINT
+ */
+ case function_int_to_dint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dint*/
+ break;
+
+/****
+ *INT_TO_DATE
+ */
+ case function_int_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_date*/
+ break;
+
+/****
+ *INT_TO_DWORD
+ */
+ case function_int_to_dword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dword*/
+ break;
+
+/****
+ *INT_TO_DT
+ */
+ case function_int_to_dt :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ break;
+
+/****
+ *INT_TO_TOD
+ */
+ case function_int_to_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_tod*/
+ break;
+
+/****
+ *INT_TO_UDINT
+ */
+ case function_int_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_udint*/
+ break;
+
+/****
+ *INT_TO_WORD
+ */
+ case function_int_to_word :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_word*/
+ break;
+
+/****
+ *INT_TO_STRING
+ */
+ case function_int_to_string :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__sint_to_string"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ break;
+
+/****
+ *INT_TO_LWORD
+ */
+ case function_int_to_lword :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ break;
+
+/****
+ *INT_TO_UINT
+ */
+ case function_int_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_uint*/
+ break;
+
+/****
+ *INT_TO_LREAL
+ */
+ case function_int_to_lreal :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ break;
+
+/****
+ *INT_TO_BYTE
+ */
+ case function_int_to_byte :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_byte*/
+ break;
+
+/****
+ *INT_TO_USINT
+ */
+ case function_int_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_usint*/
- break;
-
-/****
- *BOOL_TO_UINT
- */
- case function_bool_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_usint*/
+ break;
+
+/****
+ *INT_TO_ULINT
+ */
+ case function_int_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ break;
+
+/****
+ *INT_TO_BOOL
+ */
+ case function_int_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ break;
+
+/****
+ *INT_TO_TIME
+ */
+ case function_int_to_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__int_to_time"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ break;
+
+/****
+ *TRUNC
+ */
+ case function_trunc :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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))
+ {
+
+ 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"));
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_trunc*/
+ break;
+
+/****
+ *BCD_TO_UDINT
+ */
+ case function_bcd_to_udint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_udint*/
+ break;
+
+/****
+ *BCD_TO_UINT
+ */
+ case function_bcd_to_uint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_uint*/
- break;
-
-/****
- *BOOL_TO_UDINT
- */
- case function_bool_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_udint*/
- break;
-
-/****
- *BOOL_TO_ULINT
- */
- case function_bool_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_uint*/
+ break;
+
+/****
+ *BCD_TO_ULINT
+ */
+ case function_bcd_to_ulint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_ulint*/
- break;
-
-/****
- *BOOL_TO_REAL
- */
- case function_bool_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_real*/
- break;
-
-/****
- *BOOL_TO_LREAL
- */
- case function_bool_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_TIME
- */
- case function_bool_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- break;
-
-/****
- *BOOL_TO_DATE
- */
- case function_bool_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
- {
-
+ function_type_prefix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_ulint*/
+ break;
+
+/****
+ *BCD_TO_USINT
+ */
+ case function_bcd_to_usint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__bcd_to_uint"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_bcd_to_usint*/
+ break;
+
+/****
+ *UDINT_TO_BCD
+ */
+ case function_udint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bcd*/
+ break;
+
+/****
+ *UINT_TO_BCD
+ */
+ case function_uint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bcd*/
+ break;
+
+/****
+ *USINT_TO_BCD
+ */
+ case function_usint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bcd*/
+ break;
+
+/****
+ *ULINT_TO_BCD
+ */
+ case function_ulint_to_bcd :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__uint_to_bcd"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bcd*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_TIME_OF_DAY
+ */
+ case function_date_and_time_to_time_of_day :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day"));
+ 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;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_time_of_day*/
+ break;
+
+/****
+ *DATE_AND_TIME_TO_DATE
+ */
+ case function_date_and_time_to_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date"));
+ 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;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_date*/
- break;
-
-/****
- *BOOL_TO_TOD
- */
- case function_bool_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_tod*/
- break;
-
-/****
- *BOOL_TO_DT
- */
- case function_bool_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- break;
-
-/****
- *BOOL_TO_STRING
- */
- case function_bool_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bool_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_BYTE
- */
- case function_bool_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_byte*/
- break;
-
-/****
- *BOOL_TO_WORD
- */
- case function_bool_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_word*/
- break;
-
-/****
- *BOOL_TO_DWORD
- */
- case function_bool_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dword*/
- break;
-
-/****
- *BOOL_TO_LWORD
- */
- case function_bool_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- break;
-
-/****
- *SINT_TO_BOOL
- */
- case function_sint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bool*/
- break;
-
-/****
- *SINT_TO_INT
- */
- case function_sint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_int*/
- break;
-
-/****
- *SINT_TO_DINT
- */
- case function_sint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dint*/
- break;
-
-/****
- *SINT_TO_LINT
- */
- case function_sint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lint*/
- break;
-
-/****
- *SINT_TO_USINT
- */
- case function_sint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_usint*/
- break;
-
-/****
- *SINT_TO_UINT
- */
- case function_sint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_uint*/
- break;
-
-/****
- *SINT_TO_UDINT
- */
- case function_sint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_udint*/
- break;
-
-/****
- *SINT_TO_ULINT
- */
- case function_sint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_ulint*/
- break;
-
-/****
- *SINT_TO_REAL
- */
- case function_sint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_real*/
- break;
-
-/****
- *SINT_TO_LREAL
- */
- case function_sint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lreal*/
- break;
-
-/****
- *SINT_TO_TIME
- */
- case function_sint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- break;
-
-/****
- *SINT_TO_DATE
- */
- case function_sint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_date*/
- break;
-
-/****
- *SINT_TO_TOD
- */
- case function_sint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_tod*/
- break;
-
-/****
- *SINT_TO_DT
- */
- case function_sint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- break;
-
-/****
- *SINT_TO_STRING
- */
- case function_sint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_BYTE
- */
- case function_sint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_byte*/
- break;
-
-/****
- *SINT_TO_WORD
- */
- case function_sint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_word*/
- break;
-
-/****
- *SINT_TO_DWORD
- */
- case function_sint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dword*/
- break;
-
-/****
- *SINT_TO_LWORD
- */
- case function_sint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_lword*/
- break;
-
-/****
- *INT_TO_BOOL
- */
- case function_int_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bool*/
- break;
-
-/****
- *INT_TO_SINT
- */
- case function_int_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_sint*/
- break;
-
-/****
- *INT_TO_DINT
- */
- case function_int_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dint*/
- break;
-
-/****
- *INT_TO_LINT
- */
- case function_int_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lint*/
- break;
-
-/****
- *INT_TO_USINT
- */
- case function_int_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_usint*/
- break;
-
-/****
- *INT_TO_UINT
- */
- case function_int_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_uint*/
- break;
-
-/****
- *INT_TO_UDINT
- */
- case function_int_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_udint*/
- break;
-
-/****
- *INT_TO_ULINT
- */
- case function_int_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_ulint*/
- break;
-
-/****
- *INT_TO_REAL
- */
- case function_int_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_real*/
- break;
-
-/****
- *INT_TO_LREAL
- */
- case function_int_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lreal*/
- break;
-
-/****
- *INT_TO_TIME
- */
- case function_int_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- break;
-
-/****
- *INT_TO_DATE
- */
- case function_int_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_date*/
- break;
-
-/****
- *INT_TO_TOD
- */
- case function_int_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_tod*/
- break;
-
-/****
- *INT_TO_DT
- */
- case function_int_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- break;
-
-/****
- *INT_TO_STRING
- */
- case function_int_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_BYTE
- */
- case function_int_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_byte*/
- break;
-
-/****
- *INT_TO_WORD
- */
- case function_int_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_word*/
- break;
-
-/****
- *INT_TO_DWORD
- */
- case function_int_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dword*/
- break;
-
-/****
- *INT_TO_LWORD
- */
- case function_int_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_lword*/
- break;
-
-/****
- *DINT_TO_BOOL
- */
- case function_dint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- break;
-
-/****
- *DINT_TO_SINT
- */
- case function_dint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_sint*/
- break;
-
-/****
- *DINT_TO_INT
- */
- case function_dint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_int*/
- break;
-
-/****
- *DINT_TO_LINT
- */
- case function_dint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lint*/
- break;
-
-/****
- *DINT_TO_USINT
- */
- case function_dint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_usint*/
- break;
-
-/****
- *DINT_TO_UINT
- */
- case function_dint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_uint*/
- break;
-
-/****
- *DINT_TO_UDINT
- */
- case function_dint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_udint*/
- break;
-
-/****
- *DINT_TO_ULINT
- */
- case function_dint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_ulint*/
- break;
-
-/****
- *DINT_TO_REAL
- */
- case function_dint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_real*/
- break;
-
-/****
- *DINT_TO_LREAL
- */
- case function_dint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- break;
-
-/****
- *DINT_TO_TIME
- */
- case function_dint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- break;
-
-/****
- *DINT_TO_DATE
- */
- case function_dint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_date*/
- break;
-
-/****
- *DINT_TO_TOD
- */
- case function_dint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_tod*/
- break;
-
-/****
- *DINT_TO_DT
- */
- case function_dint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- break;
-
-/****
- *DINT_TO_STRING
- */
- case function_dint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_BYTE
- */
- case function_dint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_byte*/
- break;
-
-/****
- *DINT_TO_WORD
- */
- case function_dint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_word*/
- break;
-
-/****
- *DINT_TO_DWORD
- */
- case function_dint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dword*/
- break;
-
-/****
- *DINT_TO_LWORD
- */
- case function_dint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- break;
-
-/****
- *LINT_TO_BOOL
- */
- case function_lint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- break;
-
-/****
- *LINT_TO_SINT
- */
- case function_lint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_sint*/
- break;
-
-/****
- *LINT_TO_INT
- */
- case function_lint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_int*/
- break;
-
-/****
- *LINT_TO_DINT
- */
- case function_lint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dint*/
- break;
-
-/****
- *LINT_TO_USINT
- */
- case function_lint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_usint*/
- break;
-
-/****
- *LINT_TO_UINT
- */
- case function_lint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_uint*/
- break;
-
-/****
- *LINT_TO_UDINT
- */
- case function_lint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_udint*/
- break;
-
-/****
- *LINT_TO_ULINT
- */
- case function_lint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- break;
-
-/****
- *LINT_TO_REAL
- */
- case function_lint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_real*/
- break;
-
-/****
- *LINT_TO_LREAL
- */
- case function_lint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- break;
-
-/****
- *LINT_TO_TIME
- */
- case function_lint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- break;
-
-/****
- *LINT_TO_DATE
- */
- case function_lint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_date*/
- break;
-
-/****
- *LINT_TO_TOD
- */
- case function_lint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_tod*/
- break;
-
-/****
- *LINT_TO_DT
- */
- case function_lint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- break;
-
-/****
- *LINT_TO_STRING
- */
- case function_lint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__sint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_BYTE
- */
- case function_lint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_byte*/
- break;
-
-/****
- *LINT_TO_WORD
- */
- case function_lint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_word*/
- break;
-
-/****
- *LINT_TO_DWORD
- */
- case function_lint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dword*/
- break;
-
-/****
- *LINT_TO_LWORD
- */
- case function_lint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- break;
-
-/****
- *USINT_TO_BOOL
- */
- case function_usint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- break;
-
-/****
- *USINT_TO_SINT
- */
- case function_usint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_sint*/
- break;
-
-/****
- *USINT_TO_INT
- */
- case function_usint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_int*/
- break;
-
-/****
- *USINT_TO_DINT
- */
- case function_usint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dint*/
- break;
-
-/****
- *USINT_TO_LINT
- */
- case function_usint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lint*/
- break;
-
-/****
- *USINT_TO_UINT
- */
- case function_usint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_uint*/
- break;
-
-/****
- *USINT_TO_UDINT
- */
- case function_usint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_udint*/
- break;
-
-/****
- *USINT_TO_ULINT
- */
- case function_usint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- break;
-
-/****
- *USINT_TO_REAL
- */
- case function_usint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_real*/
- break;
-
-/****
- *USINT_TO_LREAL
- */
- case function_usint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- break;
-
-/****
- *USINT_TO_TIME
- */
- case function_usint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- break;
-
-/****
- *USINT_TO_DATE
- */
- case function_usint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_date*/
- break;
-
-/****
- *USINT_TO_TOD
- */
- case function_usint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_tod*/
- break;
-
-/****
- *USINT_TO_DT
- */
- case function_usint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- break;
-
-/****
- *USINT_TO_STRING
- */
- case function_usint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_BYTE
- */
- case function_usint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_byte*/
- break;
-
-/****
- *USINT_TO_WORD
- */
- case function_usint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_word*/
- break;
-
-/****
- *USINT_TO_DWORD
- */
- case function_usint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dword*/
- break;
-
-/****
- *USINT_TO_LWORD
- */
- case function_usint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- break;
-
-/****
- *UINT_TO_BOOL
- */
- case function_uint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- break;
-
-/****
- *UINT_TO_SINT
- */
- case function_uint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_sint*/
- break;
-
-/****
- *UINT_TO_INT
- */
- case function_uint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_int*/
- break;
-
-/****
- *UINT_TO_DINT
- */
- case function_uint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dint*/
- break;
-
-/****
- *UINT_TO_LINT
- */
- case function_uint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lint*/
- break;
-
-/****
- *UINT_TO_USINT
- */
- case function_uint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_usint*/
- break;
-
-/****
- *UINT_TO_UDINT
- */
- case function_uint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_udint*/
- break;
-
-/****
- *UINT_TO_ULINT
- */
- case function_uint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- break;
-
-/****
- *UINT_TO_REAL
- */
- case function_uint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_real*/
- break;
-
-/****
- *UINT_TO_LREAL
- */
- case function_uint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- break;
-
-/****
- *UINT_TO_TIME
- */
- case function_uint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- break;
-
-/****
- *UINT_TO_DATE
- */
- case function_uint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_date*/
- break;
-
-/****
- *UINT_TO_TOD
- */
- case function_uint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_tod*/
- break;
-
-/****
- *UINT_TO_DT
- */
- case function_uint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- break;
-
-/****
- *UINT_TO_STRING
- */
- case function_uint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_BYTE
- */
- case function_uint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_byte*/
- break;
-
-/****
- *UINT_TO_WORD
- */
- case function_uint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_word*/
- break;
-
-/****
- *UINT_TO_DWORD
- */
- case function_uint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dword*/
- break;
-
-/****
- *UINT_TO_LWORD
- */
- case function_uint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- break;
-
-/****
- *UDINT_TO_BOOL
- */
- case function_udint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- break;
-
-/****
- *UDINT_TO_SINT
- */
- case function_udint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_sint*/
- break;
-
-/****
- *UDINT_TO_INT
- */
- case function_udint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_int*/
- break;
-
-/****
- *UDINT_TO_DINT
- */
- case function_udint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dint*/
- break;
-
-/****
- *UDINT_TO_LINT
- */
- case function_udint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lint*/
- break;
-
-/****
- *UDINT_TO_USINT
- */
- case function_udint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_usint*/
- break;
-
-/****
- *UDINT_TO_UINT
- */
- case function_udint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_uint*/
- break;
-
-/****
- *UDINT_TO_ULINT
- */
- case function_udint_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- break;
-
-/****
- *UDINT_TO_REAL
- */
- case function_udint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_real*/
- break;
-
-/****
- *UDINT_TO_LREAL
- */
- case function_udint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- break;
-
-/****
- *UDINT_TO_TIME
- */
- case function_udint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- break;
-
-/****
- *UDINT_TO_DATE
- */
- case function_udint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_date*/
- break;
-
-/****
- *UDINT_TO_TOD
- */
- case function_udint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_tod*/
- break;
-
-/****
- *UDINT_TO_DT
- */
- case function_udint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- break;
-
-/****
- *UDINT_TO_STRING
- */
- case function_udint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_BYTE
- */
- case function_udint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_byte*/
- break;
-
-/****
- *UDINT_TO_WORD
- */
- case function_udint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_word*/
- break;
-
-/****
- *UDINT_TO_DWORD
- */
- case function_udint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dword*/
- break;
-
-/****
- *UDINT_TO_LWORD
- */
- case function_udint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- break;
-
-/****
- *ULINT_TO_BOOL
- */
- case function_ulint_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- break;
-
-/****
- *ULINT_TO_SINT
- */
- case function_ulint_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_sint*/
- break;
-
-/****
- *ULINT_TO_INT
- */
- case function_ulint_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_int*/
- break;
-
-/****
- *ULINT_TO_DINT
- */
- case function_ulint_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dint*/
- break;
-
-/****
- *ULINT_TO_LINT
- */
- case function_ulint_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lint*/
- break;
-
-/****
- *ULINT_TO_USINT
- */
- case function_ulint_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_usint*/
- break;
-
-/****
- *ULINT_TO_UINT
- */
- case function_ulint_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_uint*/
- break;
-
-/****
- *ULINT_TO_UDINT
- */
- case function_ulint_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- break;
-
-/****
- *ULINT_TO_REAL
- */
- case function_ulint_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_real*/
- break;
-
-/****
- *ULINT_TO_LREAL
- */
- case function_ulint_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- break;
-
-/****
- *ULINT_TO_TIME
- */
- case function_ulint_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- break;
-
-/****
- *ULINT_TO_DATE
- */
- case function_ulint_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_date*/
- break;
-
-/****
- *ULINT_TO_TOD
- */
- case function_ulint_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_tod*/
- break;
-
-/****
- *ULINT_TO_DT
- */
- case function_ulint_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- break;
-
-/****
- *ULINT_TO_STRING
- */
- case function_ulint_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_BYTE
- */
- case function_ulint_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_byte*/
- break;
-
-/****
- *ULINT_TO_WORD
- */
- case function_ulint_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_word*/
- break;
-
-/****
- *ULINT_TO_DWORD
- */
- case function_ulint_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dword*/
- break;
-
-/****
- *ULINT_TO_LWORD
- */
- case function_ulint_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- break;
-
-/****
- *REAL_TO_BOOL
- */
- case function_real_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_bool*/
- break;
-
-/****
- *REAL_TO_SINT
- */
- case function_real_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_sint*/
- break;
-
-/****
- *REAL_TO_INT
- */
- case function_real_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_int*/
- break;
-
-/****
- *REAL_TO_DINT
- */
- case function_real_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dint*/
- break;
-
-/****
- *REAL_TO_LINT
- */
- case function_real_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lint*/
- break;
-
-/****
- *REAL_TO_USINT
- */
- case function_real_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_usint*/
- break;
-
-/****
- *REAL_TO_UINT
- */
- case function_real_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_uint*/
- break;
-
-/****
- *REAL_TO_UDINT
- */
- case function_real_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_udint*/
- break;
-
-/****
- *REAL_TO_ULINT
- */
- case function_real_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_ulint*/
- break;
-
-/****
- *REAL_TO_LREAL
- */
- case function_real_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lreal*/
- break;
-
-/****
- *REAL_TO_TIME
- */
- case function_real_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_time*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_date*/
- break;
-
-/****
- *REAL_TO_TOD
- */
- case function_real_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_tod*/
- break;
-
-/****
- *REAL_TO_DT
- */
- case function_real_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dt*/
- break;
-
-/****
- *REAL_TO_STRING
- */
- case function_real_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_string*/
- break;
-
-/****
- *REAL_TO_BYTE
- */
- case function_real_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_byte*/
- break;
-
-/****
- *REAL_TO_WORD
- */
- case function_real_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_word*/
- break;
-
-/****
- *REAL_TO_DWORD
- */
- case function_real_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_dword*/
- break;
-
-/****
- *REAL_TO_LWORD
- */
- case function_real_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_lword*/
- break;
-
-/****
- *LREAL_TO_BOOL
- */
- case function_lreal_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_bool*/
- break;
-
-/****
- *LREAL_TO_SINT
- */
- case function_lreal_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_sint*/
- break;
-
-/****
- *LREAL_TO_INT
- */
- case function_lreal_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_int*/
- break;
-
-/****
- *LREAL_TO_DINT
- */
- case function_lreal_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dint*/
- break;
-
-/****
- *LREAL_TO_LINT
- */
- case function_lreal_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lint*/
- break;
-
-/****
- *LREAL_TO_USINT
- */
- case function_lreal_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_usint*/
- break;
-
-/****
- *LREAL_TO_UINT
- */
- case function_lreal_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_uint*/
- break;
-
-/****
- *LREAL_TO_UDINT
- */
- case function_lreal_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_udint*/
- break;
-
-/****
- *LREAL_TO_ULINT
- */
- case function_lreal_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_ulint*/
- break;
-
-/****
- *LREAL_TO_REAL
- */
- case function_lreal_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_real*/
- break;
-
-/****
- *LREAL_TO_TIME
- */
- case function_lreal_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_time*/
- break;
-
-/****
- *LREAL_TO_DATE
- */
- case function_lreal_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_date*/
- break;
-
-/****
- *LREAL_TO_TOD
- */
- case function_lreal_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_tod*/
- break;
-
-/****
- *LREAL_TO_DT
- */
- case function_lreal_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- break;
-
-/****
- *LREAL_TO_STRING
- */
- case function_lreal_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__real_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_BYTE
- */
- case function_lreal_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_byte*/
- break;
-
-/****
- *LREAL_TO_WORD
- */
- case function_lreal_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_word*/
- break;
-
-/****
- *LREAL_TO_DWORD
- */
- case function_lreal_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dword*/
- break;
-
-/****
- *LREAL_TO_LWORD
- */
- case function_lreal_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_lword*/
- break;
-
-/****
- *TIME_TO_SINT
- */
- case function_time_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_sint*/
- break;
-
-/****
- *TIME_TO_INT
- */
- case function_time_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_int*/
- break;
-
-/****
- *TIME_TO_DINT
- */
- case function_time_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dint*/
- break;
-
-/****
- *TIME_TO_LINT
- */
- case function_time_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lint*/
- break;
-
-/****
- *TIME_TO_USINT
- */
- case function_time_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_usint*/
- break;
-
-/****
- *TIME_TO_UINT
- */
- case function_time_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_uint*/
- break;
-
-/****
- *TIME_TO_UDINT
- */
- case function_time_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_udint*/
- break;
-
-/****
- *TIME_TO_ULINT
- */
- case function_time_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_REAL
- */
- case function_time_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_real*/
- break;
-
-/****
- *TIME_TO_LREAL
- */
- case function_time_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- break;
-
-/****
- *TIME_TO_STRING
- */
- case function_time_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_BYTE
- */
- case function_time_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_byte*/
- break;
-
-/****
- *TIME_TO_WORD
- */
- case function_time_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_word*/
- break;
-
-/****
- *TIME_TO_DWORD
- */
- case function_time_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_dword*/
- break;
-
-/****
- *TIME_TO_LWORD
- */
- case function_time_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- break;
-
-/****
- *DATE_TO_SINT
- */
- case function_date_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_sint*/
- break;
-
-/****
- *DATE_TO_INT
- */
- case function_date_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_int*/
- break;
-
-/****
- *DATE_TO_DINT
- */
- case function_date_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dint*/
- break;
-
-/****
- *DATE_TO_LINT
- */
- case function_date_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lint*/
- break;
-
-/****
- *DATE_TO_USINT
- */
- case function_date_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_usint*/
- break;
-
-/****
- *DATE_TO_UINT
- */
- case function_date_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_uint*/
- break;
-
-/****
- *DATE_TO_UDINT
- */
- case function_date_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_udint*/
- break;
-
-/****
- *DATE_TO_ULINT
- */
- case function_date_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_REAL
- */
- case function_date_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_real*/
- break;
-
-/****
- *DATE_TO_LREAL
- */
- case function_date_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- break;
-
-/****
- *DATE_TO_STRING
- */
- case function_date_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__date_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_BYTE
- */
- case function_date_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_byte*/
- break;
-
-/****
- *DATE_TO_WORD
- */
- case function_date_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_word*/
- break;
-
-/****
- *DATE_TO_DWORD
- */
- case function_date_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_dword*/
- break;
-
-/****
- *DATE_TO_LWORD
- */
- case function_date_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- break;
-
-/****
- *TOD_TO_SINT
- */
- case function_tod_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_sint*/
- break;
-
-/****
- *TOD_TO_INT
- */
- case function_tod_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_int*/
- break;
-
-/****
- *TOD_TO_DINT
- */
- case function_tod_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dint*/
- break;
-
-/****
- *TOD_TO_LINT
- */
- case function_tod_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lint*/
- break;
-
-/****
- *TOD_TO_USINT
- */
- case function_tod_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_usint*/
- break;
-
-/****
- *TOD_TO_UINT
- */
- case function_tod_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_uint*/
- break;
-
-/****
- *TOD_TO_UDINT
- */
- case function_tod_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_udint*/
- break;
-
-/****
- *TOD_TO_ULINT
- */
- case function_tod_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_REAL
- */
- case function_tod_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_real*/
- break;
-
-/****
- *TOD_TO_LREAL
- */
- case function_tod_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- break;
-
-/****
- *TOD_TO_STRING
- */
- case function_tod_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__tod_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_BYTE
- */
- case function_tod_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_byte*/
- break;
-
-/****
- *TOD_TO_WORD
- */
- case function_tod_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_word*/
- break;
-
-/****
- *TOD_TO_DWORD
- */
- case function_tod_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_dword*/
- break;
-
-/****
- *TOD_TO_LWORD
- */
- case function_tod_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- break;
-
-/****
- *DT_TO_SINT
- */
- case function_dt_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_sint*/
- break;
-
-/****
- *DT_TO_INT
- */
- case function_dt_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_int*/
- break;
-
-/****
- *DT_TO_DINT
- */
- case function_dt_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dint*/
- break;
-
-/****
- *DT_TO_LINT
- */
- case function_dt_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lint*/
- break;
-
-/****
- *DT_TO_USINT
- */
- case function_dt_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_usint*/
- break;
-
-/****
- *DT_TO_UINT
- */
- case function_dt_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_uint*/
- break;
-
-/****
- *DT_TO_UDINT
- */
- case function_dt_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_udint*/
- break;
-
-/****
- *DT_TO_ULINT
- */
- case function_dt_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_REAL
- */
- case function_dt_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_real*/
- break;
-
-/****
- *DT_TO_LREAL
- */
- case function_dt_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- break;
-
-/****
- *DT_TO_STRING
- */
- case function_dt_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__dt_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_BYTE
- */
- case function_dt_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_byte*/
- break;
-
-/****
- *DT_TO_WORD
- */
- case function_dt_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_word*/
- break;
-
-/****
- *DT_TO_DWORD
- */
- case function_dt_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_dword*/
- break;
-
-/****
- *DT_TO_LWORD
- */
- case function_dt_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__time_to_int(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- break;
-
-/****
- *STRING_TO_BOOL
- */
- case function_string_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bool(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- break;
-
-/****
- *STRING_TO_SINT
- */
- case function_string_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_sint*/
- break;
-
-/****
- *STRING_TO_INT
- */
- case function_string_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_int*/
- break;
-
-/****
- *STRING_TO_DINT
- */
- case function_string_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dint*/
- break;
-
-/****
- *STRING_TO_LINT
- */
- case function_string_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_sint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lint*/
- break;
-
-/****
- *STRING_TO_USINT
- */
- case function_string_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_usint*/
- break;
-
-/****
- *STRING_TO_UINT
- */
- case function_string_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_uint*/
- break;
-
-/****
- *STRING_TO_UDINT
- */
- case function_string_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_udint*/
- break;
-
-/****
- *STRING_TO_ULINT
- */
- case function_string_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- break;
-
-/****
- *STRING_TO_REAL
- */
- case function_string_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_real*/
- break;
-
-/****
- *STRING_TO_LREAL
- */
- case function_string_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_real(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- break;
-
-/****
- *STRING_TO_TIME
- */
- case function_string_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- break;
-
-/****
- *STRING_TO_DATE
- */
- case function_string_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_date*/
- break;
-
-/****
- *STRING_TO_TOD
- */
- case function_string_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_tod*/
- break;
-
-/****
- *STRING_TO_DT
- */
- case function_string_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *STRING_TO_BYTE
- */
- case function_string_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_byte*/
- break;
-
-/****
- *STRING_TO_WORD
- */
- case function_string_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_word*/
- break;
-
-/****
- *STRING_TO_DWORD
- */
- case function_string_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dword*/
- break;
-
-/****
- *STRING_TO_LWORD
- */
- case function_string_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__string_to_bit(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- break;
-
-/****
- *BYTE_TO_BOOL
- */
- case function_byte_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- break;
-
-/****
- *BYTE_TO_SINT
- */
- case function_byte_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_sint*/
- break;
-
-/****
- *BYTE_TO_INT
- */
- case function_byte_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_int*/
- break;
-
-/****
- *BYTE_TO_DINT
- */
- case function_byte_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dint*/
- break;
-
-/****
- *BYTE_TO_LINT
- */
- case function_byte_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lint*/
- break;
-
-/****
- *BYTE_TO_USINT
- */
- case function_byte_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_usint*/
- break;
-
-/****
- *BYTE_TO_UINT
- */
- case function_byte_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_uint*/
- break;
-
-/****
- *BYTE_TO_UDINT
- */
- case function_byte_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_udint*/
- break;
-
-/****
- *BYTE_TO_ULINT
- */
- case function_byte_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- break;
-
-/****
- *BYTE_TO_REAL
- */
- case function_byte_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_real*/
- break;
-
-/****
- *BYTE_TO_LREAL
- */
- case function_byte_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- break;
-
-/****
- *BYTE_TO_TIME
- */
- case function_byte_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- break;
-
-/****
- *BYTE_TO_DATE
- */
- case function_byte_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_date*/
- break;
-
-/****
- *BYTE_TO_TOD
- */
- case function_byte_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_tod*/
- break;
-
-/****
- *BYTE_TO_DT
- */
- case function_byte_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- break;
-
-/****
- *BYTE_TO_STRING
- */
- case function_byte_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WORD
- */
- case function_byte_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_word*/
- break;
-
-/****
- *BYTE_TO_DWORD
- */
- case function_byte_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dword*/
- break;
-
-/****
- *BYTE_TO_LWORD
- */
- case function_byte_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- break;
-
-/****
- *WORD_TO_BOOL
- */
- case function_word_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- break;
-
-/****
- *WORD_TO_SINT
- */
- case function_word_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_sint*/
- break;
-
-/****
- *WORD_TO_INT
- */
- case function_word_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_int*/
- break;
-
-/****
- *WORD_TO_DINT
- */
- case function_word_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dint*/
- break;
-
-/****
- *WORD_TO_LINT
- */
- case function_word_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lint*/
- break;
-
-/****
- *WORD_TO_USINT
- */
- case function_word_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_usint*/
- break;
-
-/****
- *WORD_TO_UINT
- */
- case function_word_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_uint*/
- break;
-
-/****
- *WORD_TO_UDINT
- */
- case function_word_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_udint*/
- break;
-
-/****
- *WORD_TO_ULINT
- */
- case function_word_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- break;
-
-/****
- *WORD_TO_REAL
- */
- case function_word_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_real*/
- break;
-
-/****
- *WORD_TO_LREAL
- */
- case function_word_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- break;
-
-/****
- *WORD_TO_TIME
- */
- case function_word_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- break;
-
-/****
- *WORD_TO_DATE
- */
- case function_word_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_date*/
- break;
-
-/****
- *WORD_TO_TOD
- */
- case function_word_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_tod*/
- break;
-
-/****
- *WORD_TO_DT
- */
- case function_word_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- break;
-
-/****
- *WORD_TO_STRING
- */
- case function_word_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_BYTE
- */
- case function_word_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_byte*/
- break;
-
-/****
- *WORD_TO_DWORD
- */
- case function_word_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dword*/
- break;
-
-/****
- *WORD_TO_LWORD
- */
- case function_word_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- break;
-
-/****
- *DWORD_TO_BOOL
- */
- case function_dword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- break;
-
-/****
- *DWORD_TO_SINT
- */
- case function_dword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_sint*/
- break;
-
-/****
- *DWORD_TO_INT
- */
- case function_dword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_int*/
- break;
-
-/****
- *DWORD_TO_DINT
- */
- case function_dword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dint*/
- break;
-
-/****
- *DWORD_TO_LINT
- */
- case function_dword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lint*/
- break;
-
-/****
- *DWORD_TO_USINT
- */
- case function_dword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_usint*/
- break;
-
-/****
- *DWORD_TO_UINT
- */
- case function_dword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_uint*/
- break;
-
-/****
- *DWORD_TO_UDINT
- */
- case function_dword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_udint*/
- break;
-
-/****
- *DWORD_TO_ULINT
- */
- case function_dword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- break;
-
-/****
- *DWORD_TO_REAL
- */
- case function_dword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_real*/
- break;
-
-/****
- *DWORD_TO_LREAL
- */
- case function_dword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- break;
-
-/****
- *DWORD_TO_TIME
- */
- case function_dword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- break;
-
-/****
- *DWORD_TO_DATE
- */
- case function_dword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_date*/
- break;
-
-/****
- *DWORD_TO_TOD
- */
- case function_dword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_tod*/
- break;
-
-/****
- *DWORD_TO_DT
- */
- case function_dword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- break;
-
-/****
- *DWORD_TO_STRING
- */
- case function_dword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_BYTE
- */
- case function_dword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_byte*/
- break;
-
-/****
- *DWORD_TO_WORD
- */
- case function_dword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_word*/
- break;
-
-/****
- *DWORD_TO_LWORD
- */
- case function_dword_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- break;
-
-/****
- *LWORD_TO_BOOL
- */
- case function_lword_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- break;
-
-/****
- *LWORD_TO_SINT
- */
- case function_lword_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_sint*/
- break;
-
-/****
- *LWORD_TO_INT
- */
- case function_lword_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_int*/
- break;
-
-/****
- *LWORD_TO_DINT
- */
- case function_lword_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dint*/
- break;
-
-/****
- *LWORD_TO_LINT
- */
- case function_lword_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lint*/
- break;
-
-/****
- *LWORD_TO_USINT
- */
- case function_lword_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_usint*/
- break;
-
-/****
- *LWORD_TO_UINT
- */
- case function_lword_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_uint*/
- break;
-
-/****
- *LWORD_TO_UDINT
- */
- case function_lword_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_udint*/
- break;
-
-/****
- *LWORD_TO_ULINT
- */
- case function_lword_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- break;
-
-/****
- *LWORD_TO_REAL
- */
- case function_lword_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_real*/
- break;
-
-/****
- *LWORD_TO_LREAL
- */
- case function_lword_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- break;
-
-/****
- *LWORD_TO_TIME
- */
- case function_lword_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- break;
-
-/****
- *LWORD_TO_DATE
- */
- case function_lword_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_date*/
- break;
-
-/****
- *LWORD_TO_TOD
- */
- case function_lword_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_tod*/
- break;
-
-/****
- *LWORD_TO_DT
- */
- case function_lword_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__int_to_time(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- break;
-
-/****
- *LWORD_TO_STRING
- */
- case function_lword_to_string :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bit_to_string(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_BYTE
- */
- case function_lword_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_byte*/
- break;
-
-/****
- *LWORD_TO_WORD
- */
- case function_lword_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_word*/
- break;
-
-/****
- *LWORD_TO_DWORD
- */
- case function_lword_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- break;
-
-/****
- *TRUNC
- */
- case function_trunc :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_date_and_time_to_date*/
+ break;
+
+/****
+ *ABS
+ */
+ case function_abs :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ identifier_c param_name("IN");
+ /* Get the value from a foo(<param_name> = <param_value>) style call */
+ symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
+
+ /* Get the value from a foo(<param_value>) style call */
+ if (IN_param_value == NULL)
+ IN_param_value = function_call_param_iterator.next();
+ symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
+ last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__abs_"));
+ 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;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_abs*/
+ break;
+
+/****
+ *SQRT
+ */
+ case function_sqrt :
{
symbol_c *last_type_symbol = NULL;
@@ -13308,426 +13374,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(int)");
- IN_param_value->accept(*this);
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_trunc*/
- break;
-
-/****
- *BCD_TO_USINT
- */
- case function_bcd_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_usint*/
- break;
-
-/****
- *BCD_TO_UINT
- */
- case function_bcd_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_uint*/
- break;
-
-/****
- *BCD_TO_UDINT
- */
- case function_bcd_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_udint*/
- break;
-
-/****
- *BCD_TO_ULINT
- */
- case function_bcd_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__bcd_to_uint(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_ulint*/
- break;
-
-/****
- *USINT_TO_BCD
- */
- case function_usint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bcd*/
- break;
-
-/****
- *UINT_TO_BCD
- */
- case function_uint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bcd*/
- break;
-
-/****
- *UDINT_TO_BCD
- */
- case function_udint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bcd*/
- break;
-
-/****
- *ULINT_TO_BCD
- */
- case function_ulint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")__uint_to_bcd(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bcd*/
- break;
-
-/****
- *DATE_AND_TIME_TO_TIME_OF_DAY
- */
- case function_date_and_time_to_time_of_day :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__date_and_time_to_time_of_day(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_time_of_day*/
- break;
-
-/****
- *DATE_AND_TIME_TO_DATE
- */
- case function_date_and_time_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_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 * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("__date_and_time_to_date(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_date_and_time_to_date*/
- break;
-
-/****
- *ABS
- */
- case function_abs :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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))
- {
-
+ function_name = (symbol_c*)(new pragma_c("sqrt"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__abs_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_abs*/
- break;
-
-/****
- *SQRT
- */
- case function_sqrt :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sqrt*/
+ break;
+
+/****
+ *LN
+ */
+ case function_ln :
{
symbol_c *last_type_symbol = NULL;
@@ -13745,24 +13409,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("ln"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("sqrt(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sqrt*/
- break;
-
-/****
- *LN
- */
- case function_ln :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_ln*/
+ break;
+
+/****
+ *LOG
+ */
+ case function_log :
{
symbol_c *last_type_symbol = NULL;
@@ -13780,24 +13444,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("log"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("ln(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ln*/
- break;
-
-/****
- *LOG
- */
- case function_log :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_log*/
+ break;
+
+/****
+ *EXP
+ */
+ case function_exp :
{
symbol_c *last_type_symbol = NULL;
@@ -13815,24 +13479,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("exp"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("log(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_log*/
- break;
-
-/****
- *EXP
- */
- case function_exp :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_exp*/
+ break;
+
+/****
+ *SIN
+ */
+ case function_sin :
{
symbol_c *last_type_symbol = NULL;
@@ -13850,24 +13514,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("sin"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("exp(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_exp*/
- break;
-
-/****
- *SIN
- */
- case function_sin :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sin*/
+ break;
+
+/****
+ *COS
+ */
+ case function_cos :
{
symbol_c *last_type_symbol = NULL;
@@ -13885,24 +13549,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("cos"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("sin(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sin*/
- break;
-
-/****
- *COS
- */
- case function_cos :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_cos*/
+ break;
+
+/****
+ *TAN
+ */
+ case function_tan :
{
symbol_c *last_type_symbol = NULL;
@@ -13920,24 +13584,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("tan"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("cos(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_cos*/
- break;
-
-/****
- *TAN
- */
- case function_tan :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_tan*/
+ break;
+
+/****
+ *ASIN
+ */
+ case function_asin :
{
symbol_c *last_type_symbol = NULL;
@@ -13955,24 +13619,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("asin"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("tan(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_tan*/
- break;
-
-/****
- *ASIN
- */
- case function_asin :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_asin*/
+ break;
+
+/****
+ *ACOS
+ */
+ case function_acos :
{
symbol_c *last_type_symbol = NULL;
@@ -13990,24 +13654,24 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("acos"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("asin(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_asin*/
- break;
-
-/****
- *ACOS
- */
- case function_acos :
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_acos*/
+ break;
+
+/****
+ *ATAN
+ */
+ case function_atan :
{
symbol_c *last_type_symbol = NULL;
@@ -14025,48 +13689,13 @@
if(search_expression_type->is_real_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("atan"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("acos(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_acos*/
- break;
-
-/****
- *ATAN
- */
- case function_atan :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_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 * return_type_symbol = IN_type_symbol;
- s4o.print("atan(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
+ break;
+
+ }
+
ERROR;
}
@@ -14109,12 +13738,13 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("+\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__add_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14134,19 +13764,17 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("+\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -14169,16 +13797,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14201,16 +13828,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14233,21 +13859,21 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14289,12 +13915,13 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("*\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__mul_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -14314,19 +13941,17 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("*\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -14349,21 +13974,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__time_mul"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_mul(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14405,18 +14030,16 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__sub_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("-\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -14439,16 +14062,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14471,29 +14093,26 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14516,29 +14135,26 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -14561,21 +14177,21 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_sub(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14617,18 +14233,16 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__div_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("/\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
@@ -14651,21 +14265,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__time_div"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_div(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14707,23 +14321,22 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__mod_"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("%\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14765,21 +14378,21 @@
if(search_expression_type->is_num_type(IN2_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("pow"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- s4o.print("pow(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14807,11 +14420,14 @@
if(search_expression_type->is_num_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__move_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_suffix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -14854,19 +14470,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__shl_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- IN_param_value->accept(*this);
- s4o.print("<<");
- N_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14908,19 +14527,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__shr_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- IN_param_value->accept(*this);
- s4o.print(">>");
- N_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -14962,23 +14584,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__ror_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__ror_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- N_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15020,23 +14641,22 @@
if(search_expression_type->is_integer_type(N_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__rol_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__rol_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- N_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15078,14 +14698,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("&\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__and_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15105,29 +14724,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("&\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15169,14 +14782,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("|\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__or_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15196,29 +14808,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("|\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15260,14 +14866,13 @@
if(search_expression_type->is_binary_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("(");
- if (search_expression_type->is_bool_type(last_type_symbol))
- s4o.print("(\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print("^\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__xor_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15287,29 +14892,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print("^\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- if (search_expression_type->is_bool_type(last_type_symbol)) {
- s4o.print("&1");
- s4o.print(")");
- }
- s4o.print("");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15337,12 +14936,14 @@
if(search_expression_type->is_binary_type(IN_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__not_"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("~");
- IN_param_value->accept(*this);
- return NULL;
-
- }
+ function_type_suffix = return_type_symbol;
+ break;
+
+ }
+
ERROR;
}
@@ -15399,26 +15000,29 @@
{
+ function_name = (symbol_c*)(new pragma_c("__sel_"));
+ ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = last_type_symbol;
- G_param_value->accept(*this);
- s4o.print(" ? ");
- IN1_param_value->accept(*this);
- s4o.print(" : ");
- IN0_param_value->accept(*this);
- return NULL;
+ function_type_suffix = IN0_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15460,16 +15064,13 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__max_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__max_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15489,24 +15090,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15548,16 +15148,13 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__min_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__min_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15577,24 +15174,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15650,30 +15246,29 @@
{
+ function_name = (symbol_c*)(new pragma_c("__limit_"));
+ ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in)
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__limit_");
- IN_type_symbol->accept(*this);
- s4o.print("(");
- MN_param_value->accept(*this);
- s4o.print(", ");
- IN_param_value->accept(*this);
- s4o.print(", ");
- MX_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ function_type_suffix = IN_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15729,18 +15324,14 @@
{
- symbol_c * return_type_symbol = last_type_symbol;
- s4o.indent_right();
- s4o.print("__mux_");
- return_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- K_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN0_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__mux_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
int base_num = 2;
symbol_c *param_value = NULL;
@@ -15760,29 +15351,29 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15824,16 +15415,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__gt_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__gt_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15853,24 +15441,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -15912,16 +15499,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__ge_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__ge_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -15941,24 +15525,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16000,16 +15583,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__eq_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__eq_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -16029,24 +15609,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16088,16 +15667,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__lt_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__lt_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -16117,24 +15693,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16176,16 +15751,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__le_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__le_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -16205,24 +15777,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16264,16 +15835,13 @@
{
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.indent_right();
- s4o.print("__ne_");
- last_type_symbol->accept(*this);
- s4o.print("(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__ne_"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -16293,24 +15861,23 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ function_type_suffix = last_type_symbol;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16338,13 +15905,13 @@
if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__len"));
+ 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;
- s4o.print("__len(");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
+ break;
+
+ }
+
ERROR;
}
@@ -16387,21 +15954,21 @@
if(search_expression_type->is_integer_type(L_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__left"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__left(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16443,21 +16010,21 @@
if(search_expression_type->is_integer_type(L_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__right"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__right(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16513,28 +16080,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__mid"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__mid(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16576,16 +16143,15 @@
if(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"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__time_add(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
@@ -16608,14 +16174,13 @@
if(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;
- s4o.indent_right();
- s4o.print("__concat(");
- s4o.print_integer(nb_param);
- s4o.print(",\n" + s4o.indent_spaces);
- IN1_param_value->accept(*this);
- s4o.print(",\n" + s4o.indent_spaces);
- IN2_param_value->accept(*this);
+ function_name = (symbol_c*)(new pragma_c("__concat"));
+
+ char nb_param_str[10];
+ sprintf(nb_param_str, "%d", nb_param);
+ ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
int base_num = 3;
symbol_c *param_value = NULL;
@@ -16635,24 +16200,22 @@
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
/*Function specific CODE */
- s4o.print(",\n" + s4o.indent_spaces);
- param_value->accept(*this);
-
+ ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
}
}while(param_value != NULL);
- s4o.print(")");
- s4o.indent_left();
- return NULL;
-
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16708,28 +16271,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__insert"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__insert(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16785,28 +16348,28 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__delete"));
+ ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__delete(");
- IN_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16876,35 +16439,35 @@
if(search_expression_type->is_integer_type(P_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__replace"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__replace(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(", ");
- L_param_value->accept(*this);
- s4o.print(", ");
- P_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16946,21 +16509,21 @@
if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
+ function_name = (symbol_c*)(new pragma_c("__find"));
+ ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+ 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;
- s4o.print("__find(");
- IN1_param_value->accept(*this);
- s4o.print(", ");
- IN2_param_value->accept(*this);
- s4o.print(")");
- return NULL;
+ break;
}
+
ERROR;
}
}
+
ERROR;
}
@@ -16970,4 +16533,3 @@
case function_none :
ERROR;
}
-return NULL;