50 /* Macro that expand to subtypes */ |
50 /* Macro that expand to subtypes */ |
51 /* copied from matiec/lib/create_standard_functions_txt.sh */ |
51 /* copied from matiec/lib/create_standard_functions_txt.sh */ |
52 #define __ANY(DO) __ANY_DERIVED(DO) __ANY_ELEMENTARY(DO) |
52 #define __ANY(DO) __ANY_DERIVED(DO) __ANY_ELEMENTARY(DO) |
53 #define __ANY_DERIVED(DO) |
53 #define __ANY_DERIVED(DO) |
54 #define __ANY_ELEMENTARY(DO) __ANY_MAGNITUDE(DO) __ANY_BIT(DO) __ANY_STRING(DO) __ANY_DATE(DO) |
54 #define __ANY_ELEMENTARY(DO) __ANY_MAGNITUDE(DO) __ANY_BIT(DO) __ANY_STRING(DO) __ANY_DATE(DO) |
55 #define __ANY_MAGNITUDE(DO) __ANY_NUM(DO) DO(TIME) |
55 #define __ANY_MAGNITUDE(DO) __ANY_NUM(DO) DO(time) |
56 #define __ANY_BIT(DO) __ANY_NBIT(DO) DO(bool) |
56 #define __ANY_BIT(DO) __ANY_NBIT(DO) DO(bool) |
57 #define __ANY_NBIT(DO) DO(byte) DO(word) DO(dword) DO(lword) |
57 #define __ANY_NBIT(DO) DO(byte) DO(word) DO(dword) DO(lword) |
58 //#define __ANY_STRING(DO) DO(string) DO(wstring) |
58 //#define __ANY_STRING(DO) DO(string) DO(wstring) |
59 #define __ANY_STRING(DO) DO(string) |
59 #define __ANY_STRING(DO) DO(string) |
60 #define __ANY_DATE(DO) DO(date) DO(tod) DO(dt) |
60 #define __ANY_DATE(DO) DO(date) DO(tod) DO(dt) |
65 #define __ANY_UINT(DO) DO(usint) DO(uint) DO(udint) DO(ulint) |
65 #define __ANY_UINT(DO) DO(usint) DO(uint) DO(udint) DO(ulint) |
66 |
66 |
67 #define __ANY_1(DO,P1) __ANY_DERIVED_1(DO,P1) __ANY_ELEMENTARY_1(DO,P1) |
67 #define __ANY_1(DO,P1) __ANY_DERIVED_1(DO,P1) __ANY_ELEMENTARY_1(DO,P1) |
68 #define __ANY_DERIVED_1(DO,P1) |
68 #define __ANY_DERIVED_1(DO,P1) |
69 #define __ANY_ELEMENTARY_1(DO,P1) __ANY_MAGNITUDE_1(DO,P1) __ANY_BIT_1(DO,P1) __ANY_STRING_1(DO,P1) __ANY_DATE_1(DO,P1) |
69 #define __ANY_ELEMENTARY_1(DO,P1) __ANY_MAGNITUDE_1(DO,P1) __ANY_BIT_1(DO,P1) __ANY_STRING_1(DO,P1) __ANY_DATE_1(DO,P1) |
70 #define __ANY_MAGNITUDE_1(DO,P1) __ANY_NUM_1(DO,P1) DO(TIME,P1) |
70 #define __ANY_MAGNITUDE_1(DO,P1) __ANY_NUM_1(DO,P1) DO(time,P1) |
71 #define __ANY_BIT_1(DO,P1) __ANY_NBIT_1(DO,P1) DO(BOOL,P1) |
71 #define __ANY_BIT_1(DO,P1) __ANY_NBIT_1(DO,P1) DO(bool,P1) |
72 #define __ANY_NBIT_1(DO,P1) DO(byte,P1) DO(word,P1) DO(dword,P1) DO(lword,P1) |
72 #define __ANY_NBIT_1(DO,P1) DO(byte,P1) DO(word,P1) DO(dword,P1) DO(lword,P1) |
73 // #define __ANY_STRING_1(DO,P1) DO(string,P1) DO(wstring,P1) |
73 // #define __ANY_STRING_1(DO,P1) DO(string,P1) DO(wstring,P1) |
74 #define __ANY_STRING_1(DO,P1) DO(string,P1) |
74 #define __ANY_STRING_1(DO,P1) DO(string,P1) |
75 #define __ANY_DATE_1(DO,P1) DO(date,P1) DO(tod,P1) DO(dt,P1) |
75 #define __ANY_DATE_1(DO,P1) DO(date,P1) DO(tod,P1) DO(dt,P1) |
76 #define __ANY_NUM_1(DO,P1) __ANY_REAL_1(DO,P1) __ANY_INT_1(DO,P1) |
76 #define __ANY_NUM_1(DO,P1) __ANY_REAL_1(DO,P1) __ANY_INT_1(DO,P1) |
343 #undef __xor |
343 #undef __xor |
344 |
344 |
345 { NULL, NULL, NULL, widen_entry::ok }, |
345 { NULL, NULL, NULL, widen_entry::ok }, |
346 }; |
346 }; |
347 |
347 |
|
348 /**************************************************************/ |
|
349 /**************************************************************/ |
|
350 /**************************************************************/ |
|
351 /******* *******/ |
|
352 /******* TABLE 28: Standard comparison functions *******/ |
|
353 /******* *******/ |
|
354 /**************************************************************/ |
|
355 /**************************************************************/ |
|
356 /**************************************************************/ |
|
357 /* table used by GT, GE, EQ, LE, LT, and NE operators, and equivalent ST expressions. */ |
|
358 const struct widen_entry widen_CMP_table[] = { |
|
359 #define __cmp(TYPE) \ |
|
360 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \ |
|
361 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \ |
|
362 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \ |
|
363 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safebool_type_name, widen_entry::ok }, |
|
364 __ANY_ELEMENTARY(__cmp) |
|
365 #undef __cmp |
|
366 |
|
367 { NULL, NULL, NULL, widen_entry::ok }, |
|
368 }; |
348 |
369 |
349 |
370 |
350 /* Search for a datatype inside a candidate_datatypes list. |
371 /* Search for a datatype inside a candidate_datatypes list. |
351 * Returns: position of datatype in the list, or -1 if not found. |
372 * Returns: position of datatype in the list, or -1 if not found. |
352 */ |
373 */ |