--- a/lib/create_standard_function_txt.sh Fri Nov 18 11:23:17 2011 +0100
+++ b/lib/create_standard_function_txt.sh Fri Nov 18 17:21:16 2011 +0100
@@ -427,7 +427,9 @@
/**************/
/* SUB */
/**************/
-#define __iec_(TYPENAME) __arith_static(SUB, TYPENAME)
+#define __iec_(TYPENAME)\
+__function_2p(SUB_##TYPENAME, TYPENAME, IN1, TYPENAME, IN2, TYPENAME) /* explicitly typed function */\
+__function_2p(SUB, TYPENAME, IN1, TYPENAME, IN2, TYPENAME) /* overloaded function */
__ANY_NUM(__iec_)
#undef __iec_
--- a/lib/standard_functions.txt Fri Nov 18 11:23:17 2011 +0100
+++ b/lib/standard_functions.txt Fri Nov 18 17:21:16 2011 +0100
@@ -607,32 +607,26 @@
FUNCTION MUL : UDINT VAR_INPUT IN 1 .. : UDINT; END_VAR RETURN; END_FUNCTION
FUNCTION MUL_ULINT : ULINT VAR_INPUT IN 1 .. : ULINT; END_VAR RETURN; END_FUNCTION
FUNCTION MUL : ULINT VAR_INPUT IN 1 .. : ULINT; END_VAR RETURN; END_FUNCTION
-
-
-
-
-
-
-FUNCTION SUB_REAL : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_LREAL : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_SINT : SINT VAR_INPUT IN : SINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : SINT VAR_INPUT IN : SINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_INT : INT VAR_INPUT IN : INT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : INT VAR_INPUT IN : INT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_DINT : DINT VAR_INPUT IN : DINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : DINT VAR_INPUT IN : DINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_LINT : LINT VAR_INPUT IN : LINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : LINT VAR_INPUT IN : LINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_USINT : USINT VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : USINT VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_UINT : UINT VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : UINT VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_UDINT : UDINT VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : UDINT VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB_ULINT : ULINT VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
-FUNCTION SUB : ULINT VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_REAL : REAL VAR_INPUT IN1 : REAL; IN2 : REAL; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : REAL VAR_INPUT IN1 : REAL; IN2 : REAL; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_LREAL : LREAL VAR_INPUT IN1 : LREAL; IN2 : LREAL; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : LREAL VAR_INPUT IN1 : LREAL; IN2 : LREAL; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_SINT : SINT VAR_INPUT IN1 : SINT; IN2 : SINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : SINT VAR_INPUT IN1 : SINT; IN2 : SINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_INT : INT VAR_INPUT IN1 : INT; IN2 : INT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : INT VAR_INPUT IN1 : INT; IN2 : INT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_DINT : DINT VAR_INPUT IN1 : DINT; IN2 : DINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : DINT VAR_INPUT IN1 : DINT; IN2 : DINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_LINT : LINT VAR_INPUT IN1 : LINT; IN2 : LINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : LINT VAR_INPUT IN1 : LINT; IN2 : LINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_USINT : USINT VAR_INPUT IN1 : USINT; IN2 : USINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : USINT VAR_INPUT IN1 : USINT; IN2 : USINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_UINT : UINT VAR_INPUT IN1 : UINT; IN2 : UINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : UINT VAR_INPUT IN1 : UINT; IN2 : UINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_UDINT : UDINT VAR_INPUT IN1 : UDINT; IN2 : UDINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : UDINT VAR_INPUT IN1 : UDINT; IN2 : UDINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB_ULINT : ULINT VAR_INPUT IN1 : ULINT; IN2 : ULINT; END_VAR RETURN; END_FUNCTION
+FUNCTION SUB : ULINT VAR_INPUT IN1 : ULINT; IN2 : ULINT; END_VAR RETURN; END_FUNCTION
FUNCTION DIV_REAL : REAL VAR_INPUT IN1 : REAL; IN2 : REAL; END_VAR RETURN; END_FUNCTION
FUNCTION DIV : REAL VAR_INPUT IN1 : REAL; IN2 : REAL; END_VAR RETURN; END_FUNCTION
FUNCTION DIV_LREAL : LREAL VAR_INPUT IN1 : LREAL; IN2 : LREAL; END_VAR RETURN; END_FUNCTION