--- a/stage4/generate_cc/function_type_decl.h Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/function_type_decl.h Sat Jul 07 11:34:21 2007 +0200
@@ -20,7 +20,6 @@
function_real_to_dword,
function_real_to_lword,
function_real_to_string,
- function_real_to_wstring,
function_real_to_date,
function_real_to_tod,
function_real_to_dt,
@@ -40,7 +39,6 @@
function_lreal_to_dword,
function_lreal_to_lword,
function_lreal_to_string,
- function_lreal_to_wstring,
function_lreal_to_date,
function_lreal_to_tod,
function_lreal_to_dt,
@@ -60,7 +58,6 @@
function_sint_to_dword,
function_sint_to_lword,
function_sint_to_string,
- function_sint_to_wstring,
function_sint_to_date,
function_sint_to_tod,
function_sint_to_dt,
@@ -80,7 +77,6 @@
function_int_to_dword,
function_int_to_lword,
function_int_to_string,
- function_int_to_wstring,
function_int_to_date,
function_int_to_tod,
function_int_to_dt,
@@ -100,7 +96,6 @@
function_dint_to_dword,
function_dint_to_lword,
function_dint_to_string,
- function_dint_to_wstring,
function_dint_to_date,
function_dint_to_tod,
function_dint_to_dt,
@@ -120,7 +115,6 @@
function_lint_to_dword,
function_lint_to_lword,
function_lint_to_string,
- function_lint_to_wstring,
function_lint_to_date,
function_lint_to_tod,
function_lint_to_dt,
@@ -140,7 +134,6 @@
function_usint_to_dword,
function_usint_to_lword,
function_usint_to_string,
- function_usint_to_wstring,
function_usint_to_date,
function_usint_to_tod,
function_usint_to_dt,
@@ -160,7 +153,6 @@
function_uint_to_dword,
function_uint_to_lword,
function_uint_to_string,
- function_uint_to_wstring,
function_uint_to_date,
function_uint_to_tod,
function_uint_to_dt,
@@ -180,7 +172,6 @@
function_udint_to_dword,
function_udint_to_lword,
function_udint_to_string,
- function_udint_to_wstring,
function_udint_to_date,
function_udint_to_tod,
function_udint_to_dt,
@@ -200,7 +191,6 @@
function_ulint_to_dword,
function_ulint_to_lword,
function_ulint_to_string,
- function_ulint_to_wstring,
function_ulint_to_date,
function_ulint_to_tod,
function_ulint_to_dt,
@@ -220,7 +210,6 @@
function_time_to_dword,
function_time_to_lword,
function_time_to_string,
- function_time_to_wstring,
function_bool_to_real,
function_bool_to_lreal,
function_bool_to_sint,
@@ -237,7 +226,6 @@
function_bool_to_dword,
function_bool_to_lword,
function_bool_to_string,
- function_bool_to_wstring,
function_bool_to_date,
function_bool_to_tod,
function_bool_to_dt,
@@ -257,7 +245,6 @@
function_byte_to_dword,
function_byte_to_lword,
function_byte_to_string,
- function_byte_to_wstring,
function_byte_to_date,
function_byte_to_tod,
function_byte_to_dt,
@@ -277,7 +264,6 @@
function_word_to_dword,
function_word_to_lword,
function_word_to_string,
- function_word_to_wstring,
function_word_to_date,
function_word_to_tod,
function_word_to_dt,
@@ -297,7 +283,6 @@
function_dword_to_word,
function_dword_to_lword,
function_dword_to_string,
- function_dword_to_wstring,
function_dword_to_date,
function_dword_to_tod,
function_dword_to_dt,
@@ -317,7 +302,6 @@
function_lword_to_word,
function_lword_to_dword,
function_lword_to_string,
- function_lword_to_wstring,
function_lword_to_date,
function_lword_to_tod,
function_lword_to_dt,
@@ -340,25 +324,6 @@
function_string_to_date,
function_string_to_tod,
function_string_to_dt,
- function_wstring_to_real,
- function_wstring_to_lreal,
- function_wstring_to_sint,
- function_wstring_to_int,
- function_wstring_to_dint,
- function_wstring_to_lint,
- function_wstring_to_usint,
- function_wstring_to_uint,
- function_wstring_to_udint,
- function_wstring_to_ulint,
- function_wstring_to_time,
- function_wstring_to_bool,
- function_wstring_to_byte,
- function_wstring_to_word,
- function_wstring_to_dword,
- function_wstring_to_lword,
- function_wstring_to_date,
- function_wstring_to_tod,
- function_wstring_to_dt,
function_date_to_real,
function_date_to_lreal,
function_date_to_sint,
@@ -375,7 +340,6 @@
function_date_to_dword,
function_date_to_lword,
function_date_to_string,
- function_date_to_wstring,
function_tod_to_real,
function_tod_to_lreal,
function_tod_to_sint,
@@ -392,7 +356,6 @@
function_tod_to_dword,
function_tod_to_lword,
function_tod_to_string,
- function_tod_to_wstring,
function_dt_to_real,
function_dt_to_lreal,
function_dt_to_sint,
@@ -409,20 +372,11 @@
function_dt_to_dword,
function_dt_to_lword,
function_dt_to_string,
- function_dt_to_wstring,
function_trunc,
- function_bcd_to_sint,
- function_bcd_to_int,
- function_bcd_to_dint,
- function_bcd_to_lint,
function_bcd_to_usint,
function_bcd_to_uint,
function_bcd_to_udint,
function_bcd_to_ulint,
- function_sint_to_bcd,
- function_int_to_bcd,
- function_dint_to_bcd,
- function_lint_to_bcd,
function_usint_to_bcd,
function_uint_to_bcd,
function_udint_to_bcd,
--- a/stage4/generate_cc/get_function_type_decl.c Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/get_function_type_decl.c Sat Jul 07 11:34:21 2007 +0200
@@ -5,1418 +5,1280 @@
*/
function_type_t get_function_type(identifier_c *function_name) {
- if (!strcasecmp(function_name->value, "REAL_TO_LREAL"))
- return function_real_to_lreal;
-
- 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_TIME"))
- return function_real_to_time;
-
- if (!strcasecmp(function_name->value, "REAL_TO_BOOL"))
- return function_real_to_bool;
-
- 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, "REAL_TO_STRING"))
- return function_real_to_string;
-
- if (!strcasecmp(function_name->value, "REAL_TO_WSTRING"))
- return function_real_to_wstring;
-
- 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, "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_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_TIME"))
- return function_lreal_to_time;
-
- if (!strcasecmp(function_name->value, "LREAL_TO_BOOL"))
- return function_lreal_to_bool;
-
- 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, "LREAL_TO_STRING"))
- return function_lreal_to_string;
-
- if (!strcasecmp(function_name->value, "LREAL_TO_WSTRING"))
- return function_lreal_to_wstring;
-
- 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, "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_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_TIME"))
- return function_sint_to_time;
-
- if (!strcasecmp(function_name->value, "SINT_TO_BOOL"))
- return function_sint_to_bool;
-
- 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, "SINT_TO_STRING"))
- return function_sint_to_string;
-
- if (!strcasecmp(function_name->value, "SINT_TO_WSTRING"))
- return function_sint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_int_to_time;
-
- if (!strcasecmp(function_name->value, "INT_TO_BOOL"))
- return function_int_to_bool;
-
- 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, "INT_TO_STRING"))
- return function_int_to_string;
-
- if (!strcasecmp(function_name->value, "INT_TO_WSTRING"))
- return function_int_to_wstring;
-
- 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, "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_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_TIME"))
- return function_dint_to_time;
-
- if (!strcasecmp(function_name->value, "DINT_TO_BOOL"))
- return function_dint_to_bool;
-
- 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, "DINT_TO_STRING"))
- return function_dint_to_string;
-
- if (!strcasecmp(function_name->value, "DINT_TO_WSTRING"))
- return function_dint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_lint_to_time;
-
- if (!strcasecmp(function_name->value, "LINT_TO_BOOL"))
- return function_lint_to_bool;
-
- 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, "LINT_TO_STRING"))
- return function_lint_to_string;
-
- if (!strcasecmp(function_name->value, "LINT_TO_WSTRING"))
- return function_lint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_usint_to_time;
-
- if (!strcasecmp(function_name->value, "USINT_TO_BOOL"))
- return function_usint_to_bool;
-
- 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, "USINT_TO_STRING"))
- return function_usint_to_string;
-
- if (!strcasecmp(function_name->value, "USINT_TO_WSTRING"))
- return function_usint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_uint_to_time;
-
- if (!strcasecmp(function_name->value, "UINT_TO_BOOL"))
- return function_uint_to_bool;
-
- 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, "UINT_TO_STRING"))
- return function_uint_to_string;
-
- if (!strcasecmp(function_name->value, "UINT_TO_WSTRING"))
- return function_uint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_udint_to_time;
-
- if (!strcasecmp(function_name->value, "UDINT_TO_BOOL"))
- return function_udint_to_bool;
-
- 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, "UDINT_TO_STRING"))
- return function_udint_to_string;
-
- if (!strcasecmp(function_name->value, "UDINT_TO_WSTRING"))
- return function_udint_to_wstring;
-
- 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, "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_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_TIME"))
- return function_ulint_to_time;
-
- if (!strcasecmp(function_name->value, "ULINT_TO_BOOL"))
- return function_ulint_to_bool;
-
- 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, "ULINT_TO_STRING"))
- return function_ulint_to_string;
-
- if (!strcasecmp(function_name->value, "ULINT_TO_WSTRING"))
- return function_ulint_to_wstring;
-
- 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, "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_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_BOOL"))
- return function_time_to_bool;
-
- 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, "TIME_TO_STRING"))
- return function_time_to_string;
-
- if (!strcasecmp(function_name->value, "TIME_TO_WSTRING"))
- return function_time_to_wstring;
-
- 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_SINT"))
- return function_bool_to_sint;
-
- 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_TIME"))
- return function_bool_to_time;
-
- 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, "BOOL_TO_STRING"))
- return function_bool_to_string;
-
- if (!strcasecmp(function_name->value, "BOOL_TO_WSTRING"))
- return function_bool_to_wstring;
-
- 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, "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_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_TIME"))
- return function_byte_to_time;
-
- if (!strcasecmp(function_name->value, "BYTE_TO_BOOL"))
- return function_byte_to_bool;
-
- 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, "BYTE_TO_STRING"))
- return function_byte_to_string;
-
- if (!strcasecmp(function_name->value, "BYTE_TO_WSTRING"))
- return function_byte_to_wstring;
-
- 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, "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_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_TIME"))
- return function_word_to_time;
-
- if (!strcasecmp(function_name->value, "WORD_TO_BOOL"))
- return function_word_to_bool;
-
- 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, "WORD_TO_STRING"))
- return function_word_to_string;
-
- if (!strcasecmp(function_name->value, "WORD_TO_WSTRING"))
- return function_word_to_wstring;
-
- 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, "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_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_TIME"))
- return function_dword_to_time;
-
- if (!strcasecmp(function_name->value, "DWORD_TO_BOOL"))
- return function_dword_to_bool;
-
- 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, "DWORD_TO_STRING"))
- return function_dword_to_string;
-
- if (!strcasecmp(function_name->value, "DWORD_TO_WSTRING"))
- return function_dword_to_wstring;
-
- 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, "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_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_TIME"))
- return function_lword_to_time;
-
- if (!strcasecmp(function_name->value, "LWORD_TO_BOOL"))
- return function_lword_to_bool;
-
- 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, "LWORD_TO_STRING"))
- return function_lword_to_string;
-
- if (!strcasecmp(function_name->value, "LWORD_TO_WSTRING"))
- return function_lword_to_wstring;
-
- 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, "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_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_TIME"))
- return function_string_to_time;
-
- if (!strcasecmp(function_name->value, "STRING_TO_BOOL"))
- return function_string_to_bool;
-
- 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, "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, "WSTRING_TO_REAL"))
- return function_wstring_to_real;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_LREAL"))
- return function_wstring_to_lreal;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_SINT"))
- return function_wstring_to_sint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_INT"))
- return function_wstring_to_int;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_DINT"))
- return function_wstring_to_dint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_LINT"))
- return function_wstring_to_lint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_USINT"))
- return function_wstring_to_usint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_UINT"))
- return function_wstring_to_uint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_UDINT"))
- return function_wstring_to_udint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_ULINT"))
- return function_wstring_to_ulint;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_TIME"))
- return function_wstring_to_time;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_BOOL"))
- return function_wstring_to_bool;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_BYTE"))
- return function_wstring_to_byte;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_WORD"))
- return function_wstring_to_word;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_DWORD"))
- return function_wstring_to_dword;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_LWORD"))
- return function_wstring_to_lword;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_DATE"))
- return function_wstring_to_date;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_TOD"))
- return function_wstring_to_tod;
-
- if (!strcasecmp(function_name->value, "WSTRING_TO_DT"))
- return function_wstring_to_dt;
-
- 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_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_BOOL"))
- return function_date_to_bool;
-
- 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, "DATE_TO_STRING"))
- return function_date_to_string;
-
- if (!strcasecmp(function_name->value, "DATE_TO_WSTRING"))
- return function_date_to_wstring;
-
- 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_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_BOOL"))
- return function_tod_to_bool;
-
- 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, "TOD_TO_STRING"))
- return function_tod_to_string;
-
- if (!strcasecmp(function_name->value, "TOD_TO_WSTRING"))
- return function_tod_to_wstring;
-
- 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_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_BOOL"))
- return function_dt_to_bool;
-
- 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, "DT_TO_STRING"))
- return function_dt_to_string;
-
- if (!strcasecmp(function_name->value, "DT_TO_WSTRING"))
- return function_dt_to_wstring;
-
- if (!strcasecmp(function_name->value, "TRUNC"))
- return function_trunc;
-
- if (!strcasecmp(function_name->value, "BCD_TO_SINT"))
- return function_bcd_to_sint;
-
- if (!strcasecmp(function_name->value, "BCD_TO_INT"))
- return function_bcd_to_int;
-
- if (!strcasecmp(function_name->value, "BCD_TO_DINT"))
- return function_bcd_to_dint;
-
- if (!strcasecmp(function_name->value, "BCD_TO_LINT"))
- return function_bcd_to_lint;
-
- 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, "SINT_TO_BCD"))
- return function_sint_to_bcd;
-
- if (!strcasecmp(function_name->value, "INT_TO_BCD"))
- return function_int_to_bcd;
-
- if (!strcasecmp(function_name->value, "DINT_TO_BCD"))
- return function_dint_to_bcd;
-
- if (!strcasecmp(function_name->value, "LINT_TO_BCD"))
- return function_lint_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;
-
- if (!strcasecmp(function_name->value, "DATE_AND_TIME_TO_TIME_OF_DAY"))
- return function_date_and_time_to_time_of_day;
-
- if (!strcasecmp(function_name->value, "DATE_AND_TIME_TO_DATE"))
- return function_date_and_time_to_date;
-
- if (!strcasecmp(function_name->value, "ABS"))
- return function_abs;
-
- if (!strcasecmp(function_name->value, "SQRT"))
- return function_sqrt;
-
- if (!strcasecmp(function_name->value, "LN"))
- return function_ln;
-
- if (!strcasecmp(function_name->value, "LOG"))
- return function_log;
-
- if (!strcasecmp(function_name->value, "EXP"))
- return function_exp;
-
- if (!strcasecmp(function_name->value, "SIN"))
- return function_sin;
-
- if (!strcasecmp(function_name->value, "COS"))
- return function_cos;
-
- if (!strcasecmp(function_name->value, "TAN"))
- return function_tan;
-
- if (!strcasecmp(function_name->value, "ASIN"))
- return function_asin;
-
- if (!strcasecmp(function_name->value, "ACOS"))
- return function_acos;
-
- if (!strcasecmp(function_name->value, "ATAN"))
- return function_atan;
-
- if (!strcasecmp(function_name->value, "ADD"))
- return function_add;
-
- if (!strcasecmp(function_name->value, "MUL"))
- return function_mul;
-
- if (!strcasecmp(function_name->value, "SUB"))
- return function_sub;
-
- if (!strcasecmp(function_name->value, "DIV"))
- return function_div;
-
- if (!strcasecmp(function_name->value, "MOD"))
- return function_mod;
-
- if (!strcasecmp(function_name->value, "EXPT"))
- return function_expt;
-
- if (!strcasecmp(function_name->value, "MOVE"))
- return function_move;
-
- if (!strcasecmp(function_name->value, "SHL"))
- return function_shl;
-
- if (!strcasecmp(function_name->value, "SHR"))
- return function_shr;
-
- if (!strcasecmp(function_name->value, "ROR"))
- return function_ror;
-
- if (!strcasecmp(function_name->value, "ROL"))
- return function_rol;
-
- if (!strcasecmp(function_name->value, "AND"))
- return function_and;
-
- if (!strcasecmp(function_name->value, "OR"))
- return function_or;
-
- if (!strcasecmp(function_name->value, "XOR"))
- return function_xor;
-
- if (!strcasecmp(function_name->value, "NOT"))
- return function_not;
-
- if (!strcasecmp(function_name->value, "SEL"))
- return function_sel;
-
- if (!strcasecmp(function_name->value, "MAX"))
- return function_max;
-
- if (!strcasecmp(function_name->value, "MIN"))
- return function_min;
-
- if (!strcasecmp(function_name->value, "LIMIT"))
- return function_limit;
-
- if (!strcasecmp(function_name->value, "MUX"))
- return function_mux;
-
- if (!strcasecmp(function_name->value, "GT"))
- return function_gt;
-
- if (!strcasecmp(function_name->value, "GE"))
- return function_ge;
-
- if (!strcasecmp(function_name->value, "EQ"))
- return function_eq;
-
- if (!strcasecmp(function_name->value, "LT"))
- return function_lt;
-
- if (!strcasecmp(function_name->value, "LE"))
- return function_le;
-
- if (!strcasecmp(function_name->value, "NE"))
- return function_ne;
-
- if (!strcasecmp(function_name->value, "LEN"))
- return function_len;
-
- if (!strcasecmp(function_name->value, "LEFT"))
- return function_left;
-
- if (!strcasecmp(function_name->value, "RIGHT"))
- return function_right;
-
- if (!strcasecmp(function_name->value, "MID"))
- return function_mid;
-
- if (!strcasecmp(function_name->value, "CONCAT"))
- return function_concat;
-
- if (!strcasecmp(function_name->value, "INSERT"))
- return function_insert;
-
- if (!strcasecmp(function_name->value, "DELETE"))
- return function_delete;
-
- if (!strcasecmp(function_name->value, "REPLACE"))
- return function_replace;
-
- if (!strcasecmp(function_name->value, "FIND"))
- return function_find;
+if (!strcasecmp(function_name->value, "REAL_TO_LREAL"))
+ return function_real_to_lreal;
+
+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_TIME"))
+ return function_real_to_time;
+
+if (!strcasecmp(function_name->value, "REAL_TO_BOOL"))
+ return function_real_to_bool;
+
+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, "REAL_TO_STRING"))
+ return function_real_to_string;
+
+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, "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_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_TIME"))
+ return function_lreal_to_time;
+
+if (!strcasecmp(function_name->value, "LREAL_TO_BOOL"))
+ return function_lreal_to_bool;
+
+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, "LREAL_TO_STRING"))
+ return function_lreal_to_string;
+
+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, "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_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_TIME"))
+ return function_sint_to_time;
+
+if (!strcasecmp(function_name->value, "SINT_TO_BOOL"))
+ return function_sint_to_bool;
+
+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, "SINT_TO_STRING"))
+ return function_sint_to_string;
+
+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, "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_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_TIME"))
+ return function_int_to_time;
+
+if (!strcasecmp(function_name->value, "INT_TO_BOOL"))
+ return function_int_to_bool;
+
+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, "INT_TO_STRING"))
+ return function_int_to_string;
+
+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, "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_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_TIME"))
+ return function_dint_to_time;
+
+if (!strcasecmp(function_name->value, "DINT_TO_BOOL"))
+ return function_dint_to_bool;
+
+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, "DINT_TO_STRING"))
+ return function_dint_to_string;
+
+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, "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_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_TIME"))
+ return function_lint_to_time;
+
+if (!strcasecmp(function_name->value, "LINT_TO_BOOL"))
+ return function_lint_to_bool;
+
+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, "LINT_TO_STRING"))
+ return function_lint_to_string;
+
+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, "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_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_TIME"))
+ return function_usint_to_time;
+
+if (!strcasecmp(function_name->value, "USINT_TO_BOOL"))
+ return function_usint_to_bool;
+
+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, "USINT_TO_STRING"))
+ return function_usint_to_string;
+
+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, "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_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_TIME"))
+ return function_uint_to_time;
+
+if (!strcasecmp(function_name->value, "UINT_TO_BOOL"))
+ return function_uint_to_bool;
+
+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, "UINT_TO_STRING"))
+ return function_uint_to_string;
+
+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, "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_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_TIME"))
+ return function_udint_to_time;
+
+if (!strcasecmp(function_name->value, "UDINT_TO_BOOL"))
+ return function_udint_to_bool;
+
+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, "UDINT_TO_STRING"))
+ return function_udint_to_string;
+
+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, "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_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_TIME"))
+ return function_ulint_to_time;
+
+if (!strcasecmp(function_name->value, "ULINT_TO_BOOL"))
+ return function_ulint_to_bool;
+
+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, "ULINT_TO_STRING"))
+ return function_ulint_to_string;
+
+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, "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_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_BOOL"))
+ return function_time_to_bool;
+
+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, "TIME_TO_STRING"))
+ return function_time_to_string;
+
+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_SINT"))
+ return function_bool_to_sint;
+
+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_TIME"))
+ return function_bool_to_time;
+
+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, "BOOL_TO_STRING"))
+ return function_bool_to_string;
+
+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, "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_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_TIME"))
+ return function_byte_to_time;
+
+if (!strcasecmp(function_name->value, "BYTE_TO_BOOL"))
+ return function_byte_to_bool;
+
+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, "BYTE_TO_STRING"))
+ return function_byte_to_string;
+
+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, "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_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_TIME"))
+ return function_word_to_time;
+
+if (!strcasecmp(function_name->value, "WORD_TO_BOOL"))
+ return function_word_to_bool;
+
+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, "WORD_TO_STRING"))
+ return function_word_to_string;
+
+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, "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_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_TIME"))
+ return function_dword_to_time;
+
+if (!strcasecmp(function_name->value, "DWORD_TO_BOOL"))
+ return function_dword_to_bool;
+
+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, "DWORD_TO_STRING"))
+ return function_dword_to_string;
+
+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, "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_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_TIME"))
+ return function_lword_to_time;
+
+if (!strcasecmp(function_name->value, "LWORD_TO_BOOL"))
+ return function_lword_to_bool;
+
+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, "LWORD_TO_STRING"))
+ return function_lword_to_string;
+
+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, "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_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_TIME"))
+ return function_string_to_time;
+
+if (!strcasecmp(function_name->value, "STRING_TO_BOOL"))
+ return function_string_to_bool;
+
+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, "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, "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_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_BOOL"))
+ return function_date_to_bool;
+
+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, "DATE_TO_STRING"))
+ return function_date_to_string;
+
+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_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_BOOL"))
+ return function_tod_to_bool;
+
+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, "TOD_TO_STRING"))
+ return function_tod_to_string;
+
+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_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_BOOL"))
+ return function_dt_to_bool;
+
+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, "DT_TO_STRING"))
+ return function_dt_to_string;
+
+if (!strcasecmp(function_name->value, "TRUNC"))
+ return function_trunc;
+
+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, "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;
+
+if (!strcasecmp(function_name->value, "DATE_AND_TIME_TO_TIME_OF_DAY"))
+ return function_date_and_time_to_time_of_day;
+
+if (!strcasecmp(function_name->value, "DATE_AND_TIME_TO_DATE"))
+ return function_date_and_time_to_date;
+
+if (!strcasecmp(function_name->value, "ABS"))
+ return function_abs;
+
+if (!strcasecmp(function_name->value, "SQRT"))
+ return function_sqrt;
+
+if (!strcasecmp(function_name->value, "LN"))
+ return function_ln;
+
+if (!strcasecmp(function_name->value, "LOG"))
+ return function_log;
+
+if (!strcasecmp(function_name->value, "EXP"))
+ return function_exp;
+
+if (!strcasecmp(function_name->value, "SIN"))
+ return function_sin;
+
+if (!strcasecmp(function_name->value, "COS"))
+ return function_cos;
+
+if (!strcasecmp(function_name->value, "TAN"))
+ return function_tan;
+
+if (!strcasecmp(function_name->value, "ASIN"))
+ return function_asin;
+
+if (!strcasecmp(function_name->value, "ACOS"))
+ return function_acos;
+
+if (!strcasecmp(function_name->value, "ATAN"))
+ return function_atan;
+
+if (!strcasecmp(function_name->value, "ADD"))
+ return function_add;
+
+if (!strcasecmp(function_name->value, "MUL"))
+ return function_mul;
+
+if (!strcasecmp(function_name->value, "SUB"))
+ return function_sub;
+
+if (!strcasecmp(function_name->value, "DIV"))
+ return function_div;
+
+if (!strcasecmp(function_name->value, "MOD"))
+ return function_mod;
+
+if (!strcasecmp(function_name->value, "EXPT"))
+ return function_expt;
+
+if (!strcasecmp(function_name->value, "MOVE"))
+ return function_move;
+
+if (!strcasecmp(function_name->value, "SHL"))
+ return function_shl;
+
+if (!strcasecmp(function_name->value, "SHR"))
+ return function_shr;
+
+if (!strcasecmp(function_name->value, "ROR"))
+ return function_ror;
+
+if (!strcasecmp(function_name->value, "ROL"))
+ return function_rol;
+
+if (!strcasecmp(function_name->value, "AND"))
+ return function_and;
+
+if (!strcasecmp(function_name->value, "OR"))
+ return function_or;
+
+if (!strcasecmp(function_name->value, "XOR"))
+ return function_xor;
+
+if (!strcasecmp(function_name->value, "NOT"))
+ return function_not;
+
+if (!strcasecmp(function_name->value, "SEL"))
+ return function_sel;
+
+if (!strcasecmp(function_name->value, "MAX"))
+ return function_max;
+
+if (!strcasecmp(function_name->value, "MIN"))
+ return function_min;
+
+if (!strcasecmp(function_name->value, "LIMIT"))
+ return function_limit;
+
+if (!strcasecmp(function_name->value, "MUX"))
+ return function_mux;
+
+if (!strcasecmp(function_name->value, "GT"))
+ return function_gt;
+
+if (!strcasecmp(function_name->value, "GE"))
+ return function_ge;
+
+if (!strcasecmp(function_name->value, "EQ"))
+ return function_eq;
+
+if (!strcasecmp(function_name->value, "LT"))
+ return function_lt;
+
+if (!strcasecmp(function_name->value, "LE"))
+ return function_le;
+
+if (!strcasecmp(function_name->value, "NE"))
+ return function_ne;
+
+if (!strcasecmp(function_name->value, "LEN"))
+ return function_len;
+
+if (!strcasecmp(function_name->value, "LEFT"))
+ return function_left;
+
+if (!strcasecmp(function_name->value, "RIGHT"))
+ return function_right;
+
+if (!strcasecmp(function_name->value, "MID"))
+ return function_mid;
+
+if (!strcasecmp(function_name->value, "CONCAT"))
+ return function_concat;
+
+if (!strcasecmp(function_name->value, "INSERT"))
+ return function_insert;
+
+if (!strcasecmp(function_name->value, "DELETE"))
+ return function_delete;
+
+if (!strcasecmp(function_name->value, "REPLACE"))
+ return function_replace;
+
+if (!strcasecmp(function_name->value, "FIND"))
+ return function_find;
else return function_none;
}
--- a/stage4/generate_cc/iec_std_lib.h Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/iec_std_lib.h Sat Jul 07 11:34:21 2007 +0200
@@ -60,6 +60,8 @@
typedef struct timespec DT;
typedef struct timespec TOD;
+#define __TIME_CMP(t1, t2) (t2.tv_sec == t1.tv_sec ? t2.tv_nsec - t1.tv_nsec : t1.tv_sec - t2.tv_sec)
+
#define STR_MAX_LEN 40
typedef int8_t __strlen_t;
typedef struct {
@@ -67,6 +69,9 @@
u_int8_t body[STR_MAX_LEN];
} STRING;
+#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;
@@ -689,15 +694,11 @@
ANY_NBIT(__limit_)
ANY_NUM(__limit_)
-inline TIME __limit_ptime( TIME* MN, TIME* IN, TIME* MX){
- return IN->tv_sec > MN->tv_sec || (IN->tv_sec == MN->tv_sec && IN->tv_nsec > MN->tv_nsec) ? /* IN>MN ?*/
- IN->tv_sec < MX->tv_sec || (IN->tv_sec == MX->tv_sec && IN->tv_nsec < MX->tv_nsec) ? /* IN<MX ?*/
- *IN : *MX : *MN;
-}
-
#define __limit_time(TYPENAME)\
inline TIME __limit_##TYPENAME( TYPENAME MN, TYPENAME IN, TYPENAME MX){\
- return __limit_ptime(&MN, &IN, &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 */
@@ -705,7 +706,7 @@
__limit_time(TIME)
inline STRING __limit_STRING( STRING MN, STRING IN, STRING MX){
- return strcmp((char*)&IN.body, (char*)&MN.body) > 0 ? strcmp((char*)&IN.body, (char*)&MX.body) < 0 ? IN : MX : MN;
+ return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
}
/**************/
@@ -755,8 +756,8 @@
ANY_NBIT(__max_num)
ANY_NUM(__max_num)
-__extrem_(__max_, STRING, strcmp((char*)&op1.body,(char*)&tmp.body) < 0)
-#define __max_time(TYPENAME) __extrem_(__max_, TYPENAME, tmp.tv_sec > op1.tv_sec || (tmp.tv_sec == op1.tv_sec && tmp.tv_nsec > op1.tv_nsec))
+__extrem_(__max_, STRING, __STR_CMP(op1,tmp) < 0)
+#define __max_time(TYPENAME) __extrem_(__max_, TYPENAME, __TIME_CMP(op1, tmp) < 0)
/* Call previously defined macro for each concerned type */
ANY_DATE(__max_time)
@@ -769,9 +770,9 @@
ANY_NBIT(__min_num)
ANY_NUM(__min_num)
-__extrem_(__min, STRING, strcmp((char*)&op1.body,(char*)&tmp.body) > 0)
-
-#define __min_time(TYPENAME) __extrem_(__min_, TYPENAME, tmp.tv_sec < op1.tv_sec || (tmp.tv_sec == op1.tv_sec && tmp.tv_nsec < op1.tv_nsec))
+__extrem_(__min, STRING, __STR_CMP(op1,tmp) > 0)
+
+#define __min_time(TYPENAME) __extrem_(__min_, TYPENAME, __TIME_CMP(op1, tmp) > 0)
/* Call previously defined macro for each concerned type */
ANY_DATE(__min_time)
@@ -829,8 +830,8 @@
}
#define __compare_num(fname, TYPENAME, TEST) __compare_(fname, TYPENAME, op1 TEST tmp )
-#define __compare_time(fname, TYPENAME, TEST) __compare_(fname, TYPENAME, op1.tv_sec TEST tmp.tv_sec || (op1.tv_sec == tmp.tv_sec && op1.tv_nsec TEST tmp.tv_nsec))
-#define __compare_string(fname, TEST) __compare_(fname, STRING, strcmp((char*)&op1.body, (char*)&tmp.body) TEST 0 )
+#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/stage4/generate_cc/il_code_gen.c Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/il_code_gen.c Sat Jul 07 11:34:21 2007 +0200
@@ -313,7 +313,7 @@
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")real_to_time(");
+ s4o.print(")__real_to_time(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -506,9 +506,9 @@
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
+ s4o.print(")__real_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
return NULL;
}
@@ -520,9 +520,9 @@
break;
/****
- *REAL_TO_WSTRING
- */
- case function_real_to_wstring :
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
{
symbol_c *last_type_symbol = NULL;
@@ -536,26 +536,26 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_wstring*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
+ 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;
@@ -569,103 +569,683 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
+ 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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__real_to_time(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -680,24 +1260,669 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -712,24 +1937,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -744,24 +2582,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -776,24 +3227,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -808,24 +3872,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -840,24 +4517,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -872,24 +5162,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -904,89 +5807,1843 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_ulint_to_udint*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_BOOL
+ */
+ case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_SINT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_bool_to_sint*/
+ break;
+
+/****
+ *BOOL_TO_INT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_bool_to_int*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__int_to_time(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1001,24 +7658,637 @@
ERROR;
}
- }/*function_lreal_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_byte_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1033,24 +8303,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -1065,24 +8948,637 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -1097,12057 +9593,2340 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lword_to_dword*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__string_to_bit(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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_BOOL
+ */
+ case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_WSTRING
- */
- case function_lreal_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__date_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_real(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_sint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_BOOL
+ */
+ case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_WSTRING
- */
- case function_sint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_sint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__tod_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_real(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_int_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_BOOL
+ */
+ case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_WSTRING
- */
- case function_int_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_int_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_dint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_WSTRING
- */
- case function_dint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_dint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_lint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_WSTRING
- */
- case function_lint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_lint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_usint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_WSTRING
- */
- case function_usint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_usint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_uint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_WSTRING
- */
- case function_uint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_uint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_udint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_WSTRING
- */
- case function_udint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_udint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_ulint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_WSTRING
- */
- case function_ulint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_ulint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *TIME_TO_BOOL
- */
- case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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_WSTRING
- */
- case function_time_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_SINT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_sint*/
- break;
-
-/****
- *BOOL_TO_INT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_int*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_WSTRING
- */
- case function_bool_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_byte_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WSTRING
- */
- case function_byte_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_byte_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_word_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_WSTRING
- */
- case function_word_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_word_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_dword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_WSTRING
- */
- case function_dword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_dword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_lword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_WSTRING
- */
- case function_lword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_lword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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;
-
-/****
- *WSTRING_TO_REAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_real*/
- break;
-
-/****
- *WSTRING_TO_LREAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lreal*/
- break;
-
-/****
- *WSTRING_TO_SINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_sint*/
- break;
-
-/****
- *WSTRING_TO_INT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_int*/
- break;
-
-/****
- *WSTRING_TO_DINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dint*/
- break;
-
-/****
- *WSTRING_TO_LINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lint*/
- break;
-
-/****
- *WSTRING_TO_USINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_usint*/
- break;
-
-/****
- *WSTRING_TO_UINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_uint*/
- break;
-
-/****
- *WSTRING_TO_UDINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_udint*/
- break;
-
-/****
- *WSTRING_TO_ULINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_ulint*/
- break;
-
-/****
- *WSTRING_TO_TIME
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_time*/
- break;
-
-/****
- *WSTRING_TO_BOOL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_bool*/
- break;
-
-/****
- *WSTRING_TO_BYTE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_byte*/
- break;
-
-/****
- *WSTRING_TO_WORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_word*/
- break;
-
-/****
- *WSTRING_TO_DWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dword*/
- break;
-
-/****
- *WSTRING_TO_LWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lword*/
- break;
-
-/****
- *WSTRING_TO_DATE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_date*/
- break;
-
-/****
- *WSTRING_TO_TOD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_tod*/
- break;
-
-/****
- *WSTRING_TO_DT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *DATE_TO_BOOL
- */
- case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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_date_to_string*/
- break;
-
-/****
- *DATE_TO_WSTRING
- */
- case function_date_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_date_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *TOD_TO_BOOL
- */
- case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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_tod_to_string*/
- break;
-
-/****
- *TOD_TO_WSTRING
- */
- case function_tod_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_tod_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *DT_TO_BOOL
- */
- case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")time_to_string(");
+ s4o.print(")__dt_to_string(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13161,39 +11940,6 @@
break;
/****
- *DT_TO_WSTRING
- */
- case function_dt_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = &this->default_variable_name;
-
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_dt_to_wstring*/
- break;
-
-/****
*TRUNC
*/
case function_trunc :
@@ -13224,138 +11970,6 @@
break;
/****
- *BCD_TO_SINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_sint*/
- break;
-
-/****
- *BCD_TO_INT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_int*/
- break;
-
-/****
- *BCD_TO_DINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_dint*/
- break;
-
-/****
- *BCD_TO_LINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_lint*/
- break;
-
-/****
*BCD_TO_USINT
*/
case function_bcd_to_usint :
@@ -13369,13 +11983,13 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13402,13 +12016,13 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13435,13 +12049,13 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13468,13 +12082,13 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13488,257 +12102,125 @@
break;
/****
- *SINT_TO_BCD
- */
- case function_sint_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bcd*/
- break;
-
-/****
- *INT_TO_BCD
- */
- case function_int_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bcd*/
- break;
-
-/****
- *DINT_TO_BCD
- */
- case function_dint_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bcd*/
- break;
-
-/****
- *LINT_TO_BCD
- */
- case function_lint_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__uint_to_bcd(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13769,7 +12251,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__date_and_time_to_time_of_day(&");
+ s4o.print("__date_and_time_to_time_of_day(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -13800,7 +12282,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("__date_and_time_to_time_of_day(&");
+ s4o.print("__date_and_time_to_date(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14246,9 +12728,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14278,9 +12760,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14310,9 +12792,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14420,9 +12902,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_mul(&");
+ s4o.print("__time_mul(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14504,9 +12986,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14536,9 +13018,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14549,9 +13031,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14581,9 +13063,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14594,9 +13076,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14626,9 +13108,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14710,9 +13192,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_div(&");
+ s4o.print("__time_div(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14814,9 +13296,9 @@
{
symbol_c * return_type_symbol = last_type_symbol;
- s4o.print("pow(&");
+ s4o.print("pow(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14977,7 +13459,7 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -14995,9 +13477,9 @@
{
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__ror(sizeof(");
+ s4o.print("__ror_");
IN_type_symbol->accept(*this);
- s4o.print("), &");
+ s4o.print("(");
IN_param_value->accept(*this);
s4o.print(", ");
N_param_value->accept(*this);
@@ -15031,7 +13513,7 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -15049,9 +13531,9 @@
{
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__rol(sizeof(");
+ s4o.print("__rol_");
IN_type_symbol->accept(*this);
- s4o.print("), &");
+ s4o.print("(");
IN_param_value->accept(*this);
s4o.print(", ");
N_param_value->accept(*this);
@@ -16279,7 +14761,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__len(&");
+ s4o.print("__len(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16324,7 +14806,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__left(&");
+ s4o.print("__left(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -16376,7 +14858,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__right(&");
+ s4o.print("__right(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -16442,7 +14924,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__mid(&");
+ s4o.print("__mid(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -16501,9 +14983,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16627,9 +15109,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__insert(&");
+ s4o.print("__insert(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(", ");
P_param_value->accept(*this);
@@ -16700,7 +15182,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__delete(&");
+ s4o.print("__delete(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -16787,9 +15269,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__replace(&");
+ s4o.print("__replace(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -16853,9 +15335,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__find(&");
+ s4o.print("__find(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
--- a/stage4/generate_cc/search_expression_type.cc Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/search_expression_type.cc Sat Jul 07 11:34:21 2007 +0200
@@ -127,8 +127,7 @@
return is_real_type(type_symbol) || is_integer_type(type_symbol);
}
- bool is_binary_type(symbol_c *type_symbol) {
- if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;}
+ bool is_nbinary_type(symbol_c *type_symbol) {
if (typeid(*type_symbol) == typeid(byte_type_name_c)) {return true;}
if (typeid(*type_symbol) == typeid(word_type_name_c)) {return true;}
if (typeid(*type_symbol) == typeid(dword_type_name_c)) {return true;}
@@ -136,6 +135,11 @@
if (typeid(*type_symbol) == typeid(constant_int_type_name_c)) {return true;}
return false;
}
+
+ bool is_binary_type(symbol_c *type_symbol) {
+ if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;}
+ return is_nbinary_type(type_symbol);
+ }
bool is_same_type(symbol_c *first_type, symbol_c *second_type) {
if (typeid(*first_type) == typeid(*second_type)) {return true;}
--- a/stage4/generate_cc/search_type_code.c Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/search_type_code.c Sat Jul 07 11:34:21 2007 +0200
@@ -525,9 +525,9 @@
break;
/****
- *REAL_TO_WSTRING
- */
- case function_real_to_wstring :
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
{
symbol_c *last_type_symbol = NULL;
@@ -545,21 +545,21 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_wstring*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
+ 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;
@@ -577,6 +577,582 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
+ 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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
return return_type_symbol;
@@ -585,28 +1161,28 @@
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -617,28 +1193,28 @@
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -649,28 +1225,28 @@
ERROR;
}
- }/*function_real_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lreal_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -681,28 +1257,668 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -713,28 +1929,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -745,28 +2569,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -777,28 +3209,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -809,28 +3849,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -841,28 +4489,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -873,28 +5129,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -905,28 +5769,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_ulint_to_udint*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -937,28 +6409,540 @@
ERROR;
}
- }/*function_lreal_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_BOOL
+ */
+ case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_SINT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_sint*/
+ break;
+
+/****
+ *BOOL_TO_INT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_int*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -969,28 +6953,636 @@
ERROR;
}
- }/*function_lreal_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_bool_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1001,28 +7593,636 @@
ERROR;
}
- }/*function_lreal_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_byte_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1033,28 +8233,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -1065,28 +8873,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -1097,28 +9513,636 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lword_to_dword*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -1129,28 +10153,604 @@
ERROR;
}
- }/*function_lreal_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_string_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_BOOL
+ */
+ case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -1161,156 +10761,28 @@
ERROR;
}
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_WSTRING
- */
- case function_lreal_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_date_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -1321,28 +10793,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -1353,28 +10825,60 @@
ERROR;
}
- }/*function_sint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -1385,28 +10889,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -1417,28 +10921,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -1449,28 +10953,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -1481,28 +10985,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -1513,28 +11017,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -1545,28 +11049,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -1577,60 +11081,28 @@
ERROR;
}
- }/*function_sint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_BOOL
+ */
+ case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1641,28 +11113,28 @@
ERROR;
}
- }/*function_sint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1673,28 +11145,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -1705,28 +11177,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -1737,28 +11209,28 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -1769,28 +11241,28 @@
ERROR;
}
- }/*function_sint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -1801,156 +11273,28 @@
ERROR;
}
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_WSTRING
- */
- case function_sint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_tod_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -1961,28 +11305,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -1993,28 +11337,28 @@
ERROR;
}
- }/*function_int_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -2025,28 +11369,60 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -2057,28 +11433,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -2089,28 +11465,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -2121,28 +11497,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -2153,28 +11529,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -2185,28 +11561,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -2217,60 +11593,28 @@
ERROR;
}
- }/*function_int_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_BOOL
+ */
+ case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -2281,28 +11625,28 @@
ERROR;
}
- }/*function_int_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -2313,28 +11657,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -2345,28 +11689,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -2377,28 +11721,28 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -2409,28 +11753,28 @@
ERROR;
}
- }/*function_int_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -2441,316 +11785,60 @@
ERROR;
}
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_WSTRING
- */
- case function_int_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*function_dt_to_string*/
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -2761,28 +11849,28 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -2793,28 +11881,28 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -2825,28 +11913,28 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -2857,10570 +11945,10 @@
ERROR;
}
- }/*function_dint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_WSTRING
- */
- case function_dint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_WSTRING
- */
- case function_lint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_WSTRING
- */
- case function_usint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_WSTRING
- */
- case function_uint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_WSTRING
- */
- case function_udint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_WSTRING
- */
- case function_ulint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_BOOL
- */
- case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_WSTRING
- */
- case function_time_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_SINT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_sint*/
- break;
-
-/****
- *BOOL_TO_INT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_int*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_WSTRING
- */
- case function_bool_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WSTRING
- */
- case function_byte_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_WSTRING
- */
- case function_word_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_WSTRING
- */
- case function_dword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_WSTRING
- */
- case function_lword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *WSTRING_TO_REAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_real*/
- break;
-
-/****
- *WSTRING_TO_LREAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lreal*/
- break;
-
-/****
- *WSTRING_TO_SINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_sint*/
- break;
-
-/****
- *WSTRING_TO_INT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_int*/
- break;
-
-/****
- *WSTRING_TO_DINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dint*/
- break;
-
-/****
- *WSTRING_TO_LINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lint*/
- break;
-
-/****
- *WSTRING_TO_USINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_usint*/
- break;
-
-/****
- *WSTRING_TO_UINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_uint*/
- break;
-
-/****
- *WSTRING_TO_UDINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_udint*/
- break;
-
-/****
- *WSTRING_TO_ULINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_ulint*/
- break;
-
-/****
- *WSTRING_TO_TIME
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_time*/
- break;
-
-/****
- *WSTRING_TO_BOOL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_bool*/
- break;
-
-/****
- *WSTRING_TO_BYTE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_byte*/
- break;
-
-/****
- *WSTRING_TO_WORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_word*/
- break;
-
-/****
- *WSTRING_TO_DWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dword*/
- break;
-
-/****
- *WSTRING_TO_LWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lword*/
- break;
-
-/****
- *WSTRING_TO_DATE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_date*/
- break;
-
-/****
- *WSTRING_TO_TOD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_tod*/
- break;
-
-/****
- *WSTRING_TO_DT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_BOOL
- */
- case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_WSTRING
- */
- case function_date_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_BOOL
- */
- case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_WSTRING
- */
- case function_tod_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_BOOL
- */
- case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_WSTRING
- */
- case function_dt_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_wstring*/
- 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_SINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_sint*/
- break;
-
-/****
- *BCD_TO_INT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_int*/
- break;
-
-/****
- *BCD_TO_DINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_dint*/
- break;
-
-/****
- *BCD_TO_LINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_lint*/
- 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_binary_type(IN_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_binary_type(IN_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_binary_type(IN_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
}/*function_bcd_to_ulint*/
break;
/****
- *SINT_TO_BCD
- */
- case function_sint_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bcd*/
- break;
-
-/****
- *INT_TO_BCD
- */
- case function_int_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bcd*/
- break;
-
-/****
- *DINT_TO_BCD
- */
- case function_dint_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bcd*/
- break;
-
-/****
- *LINT_TO_BCD
- */
- case function_lint_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bcd*/
- break;
-
-/****
*USINT_TO_BCD
*/
case function_usint_to_bcd :
@@ -14681,7 +13209,7 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -14732,7 +13260,7 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -16545,9 +15073,9 @@
break;
/****
- *REAL_TO_WSTRING
- */
- case function_real_to_wstring :
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
{
symbol_c *last_type_symbol = NULL;
@@ -16558,21 +15086,21 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_wstring*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
+ 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;
@@ -16583,6 +15111,456 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
+ 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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_real_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
return return_type_symbol;
@@ -16591,21 +15569,21 @@
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
@@ -16616,21 +15594,21 @@
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
@@ -16641,21 +15619,21 @@
ERROR;
}
- }/*function_real_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lreal_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -16666,21 +15644,521 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_sint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -16691,21 +16169,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_int_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -16716,21 +16669,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -16741,21 +17169,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -16766,21 +17669,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_usint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -16791,21 +18169,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_uint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -16816,21 +18669,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_udint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -16841,21 +19169,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_ulint_to_udint*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_ulint_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -16866,21 +19669,421 @@
ERROR;
}
- }/*function_lreal_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_BOOL
+ */
+ case function_time_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lreal*/
+ break;
+
+/****
+ *BOOL_TO_SINT
+ */
+ case function_bool_to_sint :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_sint*/
+ break;
+
+/****
+ *BOOL_TO_INT
+ */
+ case function_bool_to_int :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_int*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -16891,21 +20094,496 @@
ERROR;
}
- }/*function_lreal_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_bool_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
+ return return_type_symbol;
+
+ }
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -16916,21 +20594,496 @@
ERROR;
}
- }/*function_lreal_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_byte_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_byte_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -16941,21 +21094,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_word_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -16966,21 +21594,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dword_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -16991,21 +22094,496 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lword_to_dword*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lword_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_ulint*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -17016,21 +22594,471 @@
ERROR;
}
- }/*function_lreal_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_string_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_ulint*/
+ break;
+
+/****
+ *DATE_TO_BOOL
+ */
+ case function_date_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
+ return return_type_symbol;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -17041,121 +23069,21 @@
ERROR;
}
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_WSTRING
- */
- case function_lreal_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_date_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -17166,21 +23094,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -17191,21 +23119,46 @@
ERROR;
}
- }/*function_sint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -17216,21 +23169,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -17241,21 +23194,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -17266,21 +23219,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -17291,21 +23244,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -17316,21 +23269,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -17341,21 +23294,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -17366,46 +23319,21 @@
ERROR;
}
- }/*function_sint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_BOOL
+ */
+ case function_tod_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -17416,21 +23344,21 @@
ERROR;
}
- }/*function_sint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -17441,21 +23369,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -17466,21 +23394,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -17491,21 +23419,21 @@
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -17516,21 +23444,21 @@
ERROR;
}
- }/*function_sint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ }/*function_tod_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -17541,121 +23469,21 @@
ERROR;
}
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_WSTRING
- */
- case function_sint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_tod_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -17666,21 +23494,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
@@ -17691,21 +23519,21 @@
ERROR;
}
- }/*function_int_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -17716,21 +23544,46 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -17741,21 +23594,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -17766,21 +23619,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -17791,21 +23644,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -17816,21 +23669,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -17841,21 +23694,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -17866,46 +23719,21 @@
ERROR;
}
- }/*function_int_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_BOOL
+ */
+ case function_dt_to_bool :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -17916,21 +23744,21 @@
ERROR;
}
- }/*function_int_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -17941,21 +23769,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -17966,21 +23794,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -17991,21 +23819,21 @@
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
@@ -18016,21 +23844,21 @@
ERROR;
}
- }/*function_int_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ }/*function_dt_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
@@ -18041,246 +23869,46 @@
ERROR;
}
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_WSTRING
- */
- case function_int_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*function_dt_to_string*/
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -18291,21 +23919,21 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -18316,21 +23944,21 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -18341,21 +23969,21 @@
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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
@@ -18366,8260 +23994,10 @@
ERROR;
}
- }/*function_dint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_WSTRING
- */
- case function_dint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_WSTRING
- */
- case function_lint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_WSTRING
- */
- case function_usint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_WSTRING
- */
- case function_uint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_WSTRING
- */
- case function_udint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_udint*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_WSTRING
- */
- case function_ulint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_ulint*/
- break;
-
-/****
- *TIME_TO_BOOL
- */
- case function_time_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_string*/
- break;
-
-/****
- *TIME_TO_WSTRING
- */
- case function_time_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_time_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lreal*/
- break;
-
-/****
- *BOOL_TO_SINT
- */
- case function_bool_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_sint*/
- break;
-
-/****
- *BOOL_TO_INT
- */
- case function_bool_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_int*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_WSTRING
- */
- case function_bool_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WSTRING
- */
- case function_byte_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_WSTRING
- */
- case function_word_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_WSTRING
- */
- case function_dword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dword*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_WSTRING
- */
- case function_lword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_dt*/
- break;
-
-/****
- *WSTRING_TO_REAL
- */
- case function_wstring_to_real :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_real*/
- break;
-
-/****
- *WSTRING_TO_LREAL
- */
- case function_wstring_to_lreal :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lreal*/
- break;
-
-/****
- *WSTRING_TO_SINT
- */
- case function_wstring_to_sint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_sint*/
- break;
-
-/****
- *WSTRING_TO_INT
- */
- case function_wstring_to_int :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_int*/
- break;
-
-/****
- *WSTRING_TO_DINT
- */
- case function_wstring_to_dint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dint*/
- break;
-
-/****
- *WSTRING_TO_LINT
- */
- case function_wstring_to_lint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lint*/
- break;
-
-/****
- *WSTRING_TO_USINT
- */
- case function_wstring_to_usint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_usint*/
- break;
-
-/****
- *WSTRING_TO_UINT
- */
- case function_wstring_to_uint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_uint*/
- break;
-
-/****
- *WSTRING_TO_UDINT
- */
- case function_wstring_to_udint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_udint*/
- break;
-
-/****
- *WSTRING_TO_ULINT
- */
- case function_wstring_to_ulint :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_ulint*/
- break;
-
-/****
- *WSTRING_TO_TIME
- */
- case function_wstring_to_time :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_time*/
- break;
-
-/****
- *WSTRING_TO_BOOL
- */
- case function_wstring_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_bool*/
- break;
-
-/****
- *WSTRING_TO_BYTE
- */
- case function_wstring_to_byte :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_byte*/
- break;
-
-/****
- *WSTRING_TO_WORD
- */
- case function_wstring_to_word :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_word*/
- break;
-
-/****
- *WSTRING_TO_DWORD
- */
- case function_wstring_to_dword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dword*/
- break;
-
-/****
- *WSTRING_TO_LWORD
- */
- case function_wstring_to_lword :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lword*/
- break;
-
-/****
- *WSTRING_TO_DATE
- */
- case function_wstring_to_date :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_date*/
- break;
-
-/****
- *WSTRING_TO_TOD
- */
- case function_wstring_to_tod :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_tod*/
- break;
-
-/****
- *WSTRING_TO_DT
- */
- case function_wstring_to_dt :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_ulint*/
- break;
-
-/****
- *DATE_TO_BOOL
- */
- case function_date_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_WSTRING
- */
- case function_date_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_date_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_ulint*/
- break;
-
-/****
- *TOD_TO_BOOL
- */
- case function_tod_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_string*/
- break;
-
-/****
- *TOD_TO_WSTRING
- */
- case function_tod_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_tod_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_ulint*/
- break;
-
-/****
- *DT_TO_BOOL
- */
- case function_dt_to_bool :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_string*/
- break;
-
-/****
- *DT_TO_WSTRING
- */
- case function_dt_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dt_to_wstring*/
- 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_SINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_sint*/
- break;
-
-/****
- *BCD_TO_INT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_int*/
- break;
-
-/****
- *BCD_TO_DINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_dint*/
- break;
-
-/****
- *BCD_TO_LINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_lint*/
- 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_binary_type(IN_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_binary_type(IN_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_binary_type(IN_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
}/*function_bcd_to_ulint*/
break;
/****
- *SINT_TO_BCD
- */
- case function_sint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bcd*/
- break;
-
-/****
- *INT_TO_BCD
- */
- case function_int_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bcd*/
- break;
-
-/****
- *DINT_TO_BCD
- */
- case function_dint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bcd*/
- break;
-
-/****
- *LINT_TO_BCD
- */
- case function_lint_to_bcd :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- return return_type_symbol;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_bcd*/
- break;
-
-/****
*USINT_TO_BCD
*/
case function_usint_to_bcd :
@@ -27691,7 +25069,7 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -27735,7 +25113,7 @@
symbol_c *IN_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
--- a/stage4/generate_cc/st_code_gen.c Sat Jul 07 11:07:26 2007 +0200
+++ b/stage4/generate_cc/st_code_gen.c Sat Jul 07 11:34:21 2007 +0200
@@ -353,7 +353,7 @@
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")real_to_time(");
+ s4o.print(")__real_to_time(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -570,9 +570,9 @@
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
+ s4o.print(")__real_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
return NULL;
}
@@ -584,9 +584,9 @@
break;
/****
- *REAL_TO_WSTRING
- */
- case function_real_to_wstring :
+ *REAL_TO_DATE
+ */
+ case function_real_to_date :
{
symbol_c *last_type_symbol = NULL;
@@ -604,26 +604,26 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_real_to_wstring*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
+ 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;
@@ -641,115 +641,767 @@
if (typeid(*last_type_symbol) == typeid(real_type_name_c))
{
+ 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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ {
+
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(real_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__real_to_time(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_lreal_to_dt*/
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
@@ -764,28 +1416,753 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
@@ -800,28 +2177,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
@@ -836,28 +2902,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
@@ -872,28 +3627,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
@@ -908,28 +4352,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
@@ -944,28 +5077,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
@@ -980,28 +5802,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
@@ -1016,101 +6527,2071 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_ulint_to_udint*/
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_time_to_ulint*/
+ break;
+
+/****
+ *TIME_TO_BOOL
+ */
+ case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_SINT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_bool_to_sint*/
+ break;
+
+/****
+ *BOOL_TO_INT
+ */
+ case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_bool_to_int*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__int_to_time(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_bool_to_time*/
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
@@ -1125,28 +8606,717 @@
ERROR;
}
- }/*function_lreal_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_byte_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
@@ -1161,28 +9331,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
@@ -1197,28 +10056,717 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
@@ -1233,13541 +10781,2624 @@
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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ }/*function_lword_to_dword*/
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
+ s4o.print(")__string_to_bit(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_string_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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_BOOL
+ */
+ case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
+ {
+
+ 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;
+
+/****
+ *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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_string*/
- break;
-
-/****
- *LREAL_TO_WSTRING
- */
- case function_lreal_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lreal_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__date_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_date_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_real(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_sint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_ulint*/
+ break;
+
+/****
+ *TOD_TO_BOOL
+ */
+ case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_WSTRING
- */
- case function_sint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
- {
-
- 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_sint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__tod_to_string(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_tod_to_string*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_real(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lreal*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
+ {
+
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_int_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_ulint*/
+ break;
+
+/****
+ *DT_TO_BOOL
+ */
+ case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_bool*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ s4o.print(")__time_to_int(");
+ IN_param_value->accept(*this);
+ s4o.print(")");
+ return NULL;
+
+ }
+
+ ERROR;
+ }
+
+ }/*function_dt_to_lword*/
+ 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
s4o.print("(");
return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_string*/
- break;
-
-/****
- *INT_TO_WSTRING
- */
- case function_int_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
- {
-
- 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_int_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_dint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_WSTRING
- */
- case function_dint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
- {
-
- 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_dint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_lint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_WSTRING
- */
- case function_lint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
- {
-
- 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_lint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_usint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_string*/
- break;
-
-/****
- *USINT_TO_WSTRING
- */
- case function_usint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_usint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- 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_usint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_uint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_string*/
- break;
-
-/****
- *UINT_TO_WSTRING
- */
- case function_uint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_uint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- 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_uint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_udint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_string*/
- break;
-
-/****
- *UDINT_TO_WSTRING
- */
- case function_udint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_udint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- 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_udint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_ulint_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_string*/
- break;
-
-/****
- *ULINT_TO_WSTRING
- */
- case function_ulint_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_ulint_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- 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_ulint_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *TIME_TO_BOOL
- */
- case function_time_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- 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_WSTRING
- */
- case function_time_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(time_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_SINT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_sint*/
- break;
-
-/****
- *BOOL_TO_INT
- */
- case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_int*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_string*/
- break;
-
-/****
- *BOOL_TO_WSTRING
- */
- case function_bool_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bool_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
- {
-
- 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_bool_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_byte_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_string*/
- break;
-
-/****
- *BYTE_TO_WSTRING
- */
- case function_byte_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_byte_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
- {
-
- 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_byte_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_word_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_string*/
- break;
-
-/****
- *WORD_TO_WSTRING
- */
- case function_word_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_word_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
- {
-
- 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_word_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_dword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_string*/
- break;
-
-/****
- *DWORD_TO_WSTRING
- */
- case function_dword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
- {
-
- 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_dword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_lword_to_time*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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;
-
-/****
- *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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_string*/
- break;
-
-/****
- *LWORD_TO_WSTRING
- */
- case function_lword_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")int_to_string(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lword_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
- {
-
- 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_lword_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lreal*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_ulint*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_bool*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_string_to_lword*/
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(string_type_name_c))
- {
-
- 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;
-
-/****
- *WSTRING_TO_REAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_real*/
- break;
-
-/****
- *WSTRING_TO_LREAL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lreal*/
- break;
-
-/****
- *WSTRING_TO_SINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_sint*/
- break;
-
-/****
- *WSTRING_TO_INT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_int*/
- break;
-
-/****
- *WSTRING_TO_DINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dint*/
- break;
-
-/****
- *WSTRING_TO_LINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lint*/
- break;
-
-/****
- *WSTRING_TO_USINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_usint*/
- break;
-
-/****
- *WSTRING_TO_UINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_uint*/
- break;
-
-/****
- *WSTRING_TO_UDINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_udint*/
- break;
-
-/****
- *WSTRING_TO_ULINT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 10)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_ulint*/
- break;
-
-/****
- *WSTRING_TO_TIME
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_time*/
- break;
-
-/****
- *WSTRING_TO_BOOL
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_bool*/
- break;
-
-/****
- *WSTRING_TO_BYTE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_byte*/
- break;
-
-/****
- *WSTRING_TO_WORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_word*/
- break;
-
-/****
- *WSTRING_TO_DWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_dword*/
- break;
-
-/****
- *WSTRING_TO_LWORD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")string_to_int(");
- IN_param_value->accept(*this);
- s4o.print(", 16)");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_wstring_to_lword*/
- break;
-
-/****
- *WSTRING_TO_DATE
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_date*/
- break;
-
-/****
- *WSTRING_TO_TOD
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_tod*/
- break;
-
-/****
- *WSTRING_TO_DT
- */
- case function_wstring_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 (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
- {
-
- 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_wstring_to_dt*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *DATE_TO_BOOL
- */
- case function_date_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- 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_date_to_string*/
- break;
-
-/****
- *DATE_TO_WSTRING
- */
- case function_date_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(date_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_date_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *TOD_TO_BOOL
- */
- case function_tod_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- 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_tod_to_string*/
- break;
-
-/****
- *TOD_TO_WSTRING
- */
- case function_tod_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_tod_to_wstring*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- 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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_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_ulint*/
- break;
-
-/****
- *DT_TO_BOOL
- */
- case function_dt_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_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_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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_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_lword*/
- 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("(");
- return_type_symbol->accept(*this);
- s4o.print(")time_to_string(");
+ s4o.print(")__dt_to_string(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -14781,43 +13412,6 @@
break;
/****
- *DT_TO_WSTRING
- */
- case function_dt_to_wstring :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- identifier_c param_name("IN");
- /* Get the value from a foo(<param_name> = <param_value>) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name);
-
- /* Get the value from a foo(<param_value>) style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next();
- symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
-
- if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::wstring_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_dt_to_wstring*/
- break;
-
-/****
*TRUNC
*/
case function_trunc :
@@ -14852,154 +13446,6 @@
break;
/****
- *BCD_TO_SINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_sint*/
- break;
-
-/****
- *BCD_TO_INT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_int*/
- break;
-
-/****
- *BCD_TO_DINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_dint*/
- break;
-
-/****
- *BCD_TO_LINT
- */
- case function_bcd_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_binary_type(IN_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_bcd_to_lint*/
- break;
-
-/****
*BCD_TO_USINT
*/
case function_bcd_to_usint :
@@ -15017,13 +13463,13 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15054,13 +13500,13 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(word_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15091,13 +13537,13 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15128,13 +13574,13 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- s4o.print("__bcd_to_something(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__bcd_to_uint(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15148,289 +13594,141 @@
break;
/****
- *SINT_TO_BCD
- */
- case function_sint_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 (typeid(*last_type_symbol) == typeid(sint_type_name_c))
+ *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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_sint_to_bcd*/
- break;
-
-/****
- *INT_TO_BCD
- */
- case function_int_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 (typeid(*last_type_symbol) == typeid(int_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_int_to_bcd*/
- break;
-
-/****
- *DINT_TO_BCD
- */
- case function_dint_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 (typeid(*last_type_symbol) == typeid(dint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_dint_to_bcd*/
- break;
-
-/****
- *LINT_TO_BCD
- */
- case function_lint_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 (typeid(*last_type_symbol) == typeid(lint_type_name_c))
+ 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
{
symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- IN_param_value->accept(*this);
- s4o.print(")");
- return NULL;
-
- }
-
- ERROR;
- }
-
- }/*function_lint_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 (typeid(*last_type_symbol) == typeid(usint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(uint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
- 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
- s4o.print("__something_to_bcd(sizeof(");
- IN_type_symbol->accept(*this);
- s4o.print("),&");
+ s4o.print("(");
+ return_type_symbol->accept(*this);
+ s4o.print(")__uint_to_bcd(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15465,7 +13763,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__date_and_time_to_time_of_day(&");
+ s4o.print("__date_and_time_to_time_of_day(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15500,7 +13798,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- s4o.print("__date_and_time_to_time_of_day(&");
+ s4o.print("__date_and_time_to_date(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -15994,9 +14292,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16026,9 +14324,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16058,9 +14356,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16172,9 +14470,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_mul(&");
+ s4o.print("__time_mul(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16260,9 +14558,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16292,9 +14590,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16305,9 +14603,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16337,9 +14635,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16350,9 +14648,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16382,9 +14680,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_sub(&");
+ s4o.print("__time_sub(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16470,9 +14768,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- s4o.print("__time_div(&");
+ s4o.print("__time_div(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16582,9 +14880,9 @@
{
symbol_c * return_type_symbol = last_type_symbol;
- s4o.print("pow(&");
+ s4o.print("pow(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -16761,7 +15059,7 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -16779,9 +15077,9 @@
{
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__ror(sizeof(");
+ s4o.print("__ror_");
IN_type_symbol->accept(*this);
- s4o.print("), &");
+ s4o.print("(");
IN_param_value->accept(*this);
s4o.print(", ");
N_param_value->accept(*this);
@@ -16819,7 +15117,7 @@
symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- if(search_expression_type->is_binary_type(IN_type_symbol))
+ if(search_expression_type->is_nbinary_type(IN_type_symbol))
{
{
@@ -16837,9 +15135,9 @@
{
symbol_c * return_type_symbol = IN_type_symbol;
- s4o.print("__rol(sizeof(");
+ s4o.print("__rol_");
IN_type_symbol->accept(*this);
- s4o.print("), &");
+ s4o.print("(");
IN_param_value->accept(*this);
s4o.print(", ");
N_param_value->accept(*this);
@@ -18131,7 +16429,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__len(&");
+ s4o.print("__len(");
IN_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -18180,7 +16478,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__left(&");
+ s4o.print("__left(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -18236,7 +16534,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__right(&");
+ s4o.print("__right(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -18306,7 +16604,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__mid(&");
+ s4o.print("__mid(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -18369,9 +16667,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- s4o.print("__time_add(&");
+ s4o.print("__time_add(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;
@@ -18499,9 +16797,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__insert(&");
+ s4o.print("__insert(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(", ");
P_param_value->accept(*this);
@@ -18576,7 +16874,7 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__delete(&");
+ s4o.print("__delete(");
IN_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -18667,9 +16965,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- s4o.print("__replace(&");
+ s4o.print("__replace(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(", ");
L_param_value->accept(*this);
@@ -18737,9 +17035,9 @@
{
symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- s4o.print("__find(&");
+ s4o.print("__find(");
IN1_param_value->accept(*this);
- s4o.print(", &");
+ s4o.print(", ");
IN2_param_value->accept(*this);
s4o.print(")");
return NULL;